3

I have a Linux setup that I boot in UEFI mode with GRUB. I want to try out OpenBSD, which unfortunately doesn't support GPT or UEFI yet, so I partitioned a drive with a traditional MBR table and installed OpenBSD to that disk using their install CD.

I then attempt to chainload the OpenBSD bootloader in typical GRUB fashion:

menuentry "OpenBSD" {
    insmod part_msdos
    insmod chain
    set root=(hd1,4)
    chainloader +1
}

but I am met with "Invalid EFI File Path".

Is it possible to chainload a BIOS bootloader once you have first booted in EFI mode? I can fall back to selecting the drive to boot from in my motherboard's boot menu, but a GRUB menu entry would obviously be preferable.

4
  • See whether this helps - go into the BIOS and set Secure Boot off and Legacy on.
    – whs
    Mar 29, 2015 at 19:43
  • Setting legacy boot would mean booting in MBR mode instead of UEFI mode. That means I would have to change the partition table on my main drive and redo my current boot setup for Linux and Windows. You can't just "set legacy boot on".
    – Matt Kline
    Mar 29, 2015 at 19:51
  • @MattKline: There's no "MBR mode"; just "BIOS mode". It's unfortunate that Windows refuses to boot in BIOS mode from a GPT disk, but that doesn't mean BIOS implies MBR nor that UEFI implies GPT. (Linux can boot in any combination.)
    – user1686
    Mar 29, 2015 at 20:12
  • @grawity - thanks for the correction. Sorry for conflating the two.
    – Matt Kline
    Mar 29, 2015 at 20:17

2 Answers 2

3

As far as I know, no. While you can use MBR-partitioned disks within UEFI, you cannot use BIOS (MBR) format bootloaders, as they expect to run in a mostly "fresh" system, not inside the UEFI-prepared environment. So GRUB.efi doesn't even attempt to start one; it expects you to give an .efi path only.

0
4

You can't do what you want with GRUB, but you can do it in at least two other ways, at least with most UEFI-based computers:

  • You can use your firmware's built-in boot manager. Typically, you access this via a function key early in the boot process. It should present options to boot whatever EFI-mode boot programs you've installed (such as GRUB, probably via an option named after your distribution) and some others (such as options for external media, network boots, and BIOS/CSM/legacy-mode boots). The details of what appears will vary greatly from one machine to another, though.
  • You can use my rEFInd boot manager. You'll need to install this in Linux and then edit the refind.conf file: Uncomment the scanfor line and ensure that hdbios is one of the options. You might also need to uncomment the uefi_deep_legacy_scan option, but that depends on your firmware. If this generates too many options, you can trim the list by using the dont_scan_volumes option. You can try it without installing it by using the USB flash drive version, but you'll need to edit its refind.conf file.

Note that these options both depend on the firmware having a flexible Compatibility Support Module (CSM). Most modern UEFI-based systems have such a CSM, but a few (mostly older) implementations actually built UEFI atop a BIOS rather than providing a UEFI with a CSM. These older systems can't switch so easily.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.