Fix grub for users, that use old-school BIOS boot.

On a machine that is UEFI capable, but boots in old-school BIOS mode, the system is rendered unbootable if you do not update grub.
This commit is contained in:
komitov 2022-02-18 14:23:36 +02:00 committed by GitHub
parent f3fe6d768a
commit 836e33885a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -1212,6 +1212,9 @@ efi_check () {
elif [[ -d /sys/firmware/efi/ ]]; then
declare -g update_efi
update_efi=true
else
declare -g update_bios
update_bios=true
fi
}
@ -1305,6 +1308,8 @@ fi
if [[ $update_efi && $convert_to_rocky ]]; then
fix_efi
elif [[ $update_bios && $convert_to_rocky ]]; then
grub2-mkconfig -o /boot/grub2/grub.cfg
fi
printf '\n\n\n'