On Wed, May 1, 2019 at 3:49 PM ToddAndMargo via users <users@xxxxxxxxxxxxxxxxxxxxxxx> wrote: > > Hi All, > > I have a Fedora 30 flash drive set up for dual booting > from Legacy or UEFI. It boots beautifully from UEFI. > (It also have a bios_grub partition). > > It booted perfectly from both under Fedora 29. > > Now when booting from legacy, it go into "System Setup". > If you press system Setup, I get a "/grub/core-system" > type error > > > Remaking grub.cfg, I get > > # grub2-mkconfig -o /boot/grub2/grub.cfg > Generating grub configuration file ... > Adding boot menu entry for EFI firmware configuration > done > > Uhhhhh.. I wanted legacy, not EFI. > > What am I missing? The grub2-mkconfig script detects EFI and creates a "System setup" menu entry so the user can get into firmware setup (functionally the same thing as an F key at boot time to get into what some people call 'BIOS setup' but that's confusing to say on a UEFI system which doesn't really have BIOS, hence "System setup"). Anyway,, the "System setup" menu entry runs a GRUB command which tells EFI boot services to open firmware setup. It can only work in UEFI mode. When the firmware has "legacy" enabled, the CSM is loaded first, and presents a faux-BIOS to GRUB, and there is no EFI boot services and that's probably why the "System setup" command is failing. Once "legacy" is enabled in your firmware, you'll have to use the Fn key to get into your firmware setup in order to disable legacy and get back to UEFI native booting. > Install the legacy BIOS boot loader: > > Boot into fedora on UEFI > > only installs 3 files > # dnf reinstall grub2-pc > > create the BIOS .cfg file > # grub2-mkconfig -o /boot/grub2/grub.cfg > > Note: if this complains, you forgot to create the partition above > # grub2-install --removable --recheck --target=i386-pc > --boot-directory=/boot /dev/sda With the exception of the "System setup" menu entry, I think the same grub.cfg and the BLS snippets should all work fine without any modification for either BIOS or UEFI bootloader. I haven't tested it, but off hand I'm not aware of any UEFI or BIOS specific aspects that would prevent it, all the specifics are in the bootloader itself. Just in case it's not obvious, GRUB BIOS is not the same set of binaries as GRUB UEFI. The GRUB code executed after the POST is firmware specific. On UEFI, the GRUB packages for EFI install the proper binary on the EFI System volume as EFI/fedora/grubx64.efi whereas on BIOS the RPM only installs a user space 'grub2-install' command that you have to run manually to actually install the bootloader. But since GRUB BIOS and GRUB UEFI bootloader binaries live in different locations, they can co-exist. I haven't checked recently but it used to be the case that 'grub2-install' was BIOS or UEFI specific, normally you wouldn't even have 'grub2-install' on a UEFI computer because running it causes problems (it creates a custom local machine only grubx64.efi, and it's not Fedora signed, so it can't boot in Secure Boot and sometimes can't boot everywhere, blah blah blah). And that's why there's long been advice, don't run grub2-install on a UEFI system, the proper grubx64.efi is built in the Fedora build system, and is in the proper RPM for UEFI systems, and it's installed and kept up to date on the EFI System volume automatically. Whereas on BIOS systems, that's not the case, you still have to manually run 'grub2-install' to get the RPM version of the bootloader binaries actually installed into their proper locations. Anyway, it's pretty esoteric stuff. -- Chris Murphy _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx