@@ -1111,33 +1111,6 @@ void install_refind() noexcept {
1111
1111
gucc::utils::exec (fmt::format (FMT_COMPILE (" sed -i 's|root=.* |root={} |g' /mnt/boot/refind_linux.conf" ), mapper_name));
1112
1112
gucc::utils::exec (" sed -i '/Boot with minimal options/d' /mnt/boot/refind_linux.conf" );
1113
1113
}
1114
- // Figure out microcode
1115
- const auto & rootsubvol = gucc::utils::exec (R"( findmnt -o TARGET,SOURCE | awk '/\/mnt / {print $2}' | grep -o '\[.*\]' | cut -d '[' -f2 | cut -d ']' -f1 | sed 's/^\///')" );
1116
- const auto & ucode = gucc::utils::exec (fmt::format (FMT_COMPILE (" arch-chroot {} pacman -Qqs ucode 2>>/tmp/cachyos-install.log" ), mountpoint));
1117
- if (utils::to_int (gucc::utils::exec (fmt::format (FMT_COMPILE (" echo {} | wc -l" ), ucode))) > 1 ) {
1118
- // set microcode
1119
- if (gucc::utils::exec_checked (" findmnt -o TARGET,SOURCE | grep -q '/mnt/boot '" )) {
1120
- // there is a separate boot, path to microcode is at partition root
1121
- gucc::utils::exec (R"( sed -i 's|"$| initrd=/intel-ucode.img initrd=/amd-ucode.img initrd=/initramfs-%v.img"|g' /mnt/boot/refind_linux.conf)" );
1122
- } else if (!rootsubvol.empty ()) {
1123
- // Initramfs is on the root partition and root is on btrfs subvolume
1124
- gucc::utils::exec (fmt::format (FMT_COMPILE (" sed -i 's|\" $| initrd={0}/boot/intel-ucode.img initrd={0}/boot/amd-ucode.img initrd={0}/boot/initramfs-%v.img\" |g' /mnt/boot/refind_linux.conf" ), rootsubvol));
1125
- } else {
1126
- // Initramfs is on the root partition
1127
- gucc::utils::exec (R"( sed -i 's|"$| initrd=/boot/intel-ucode.img initrd=/boot/amd-ucode.img initrd=/boot/initramfs-%v.img"|g' /mnt/boot/refind_linux.conf)" );
1128
- }
1129
- } else {
1130
- if (gucc::utils::exec_checked (" findmnt -o TARGET,SOURCE | grep -q '/mnt/boot '" )) {
1131
- // there is a separate boot, path to microcode is at partition root
1132
- gucc::utils::exec (fmt::format (FMT_COMPILE (" sed -i 's|\" $| initrd=/{}.img initrd=/initramfs-%v.img\" |g' /mnt/boot/refind_linux.conf" ), ucode));
1133
- } else if (!rootsubvol.empty ()) {
1134
- // Initramfs is on the root partition and root is on btrfs subvolume
1135
- gucc::utils::exec (fmt::format (FMT_COMPILE (" sed -i 's|\" $| initrd={0}/boot/{1}.img initrd={0}/boot/initramfs-%v.img\" |g' /mnt/boot/refind_linux.conf" ), rootsubvol, ucode));
1136
- } else {
1137
- // Initramfs is on the root partition
1138
- gucc::utils::exec (fmt::format (FMT_COMPILE (" sed -i 's|\" $| initrd=/boot/{}.img initrd=/boot/initramfs-%v.img\" |g' /mnt/boot/refind_linux.conf" ), ucode));
1139
- }
1140
- }
1141
1114
1142
1115
spdlog::info (" Created rEFInd config:" );
1143
1116
const auto & refind_conf_content = gucc::file_utils::read_whole_file (fmt::format (FMT_COMPILE (" {}/boot/refind_linux.conf" ), mountpoint));
0 commit comments