Unable to chainload OS X Clover bootloader from GRUB

11,776

You MUST pay attention to your boot mode: BIOS/CSM/legacy or EFI/UEFI.

The last I checked, Chimera was strictly a BIOS-mode boot loader. Because GRUB can't change from EFI-mode to BIOS-mode (or vice-versa), this implies that your GRUB is (or at least was) also installed in BIOS mode. If you've switched GRUB from BIOS-mode to EFI-mode, that's a critical detail.

Clover, OTOH, is more complex. Its core is as an EFI-mode boot manager that launches OS X's EFI-mode boot loader; however, Clover includes a complete EFI implementation that runs like a BIOS-mode boot loader -- essentially, an EFI that runs as software on a BIOS-mode computer, rather than as firmware. Thus, Clover can run on either BIOS-mode computers or on EFI-based computers. If you've made no changes to GRUB, you will be able to launch Clover from GRUB only if you've also installed Clover's BIOS-mode EFI "emulator" software; and then you'll need to launch Clover much as you had been launching Chameleon. Your first couple of Clover examples (the ones that referenced bootx64.efi) would work on an EFI-based computer running an EFI-mode version of GRUB, but will not work if you're using a BIOS-mode computer. Your final example (with the chainloader +1 line) is for a BIOS-mode boot, and so might work if you've installed Clover's BIOS-mode components.

Stepping back a bit, you may want to examine your other OS components, as well as your computer's capabilities. If your computer was introduced in mid-2011 or later, it's probably EFI-based; but if it's older, it's probably a BIOS-only machine. Ubuntu is easy to switch between boot modes, providing you know how to install suitable boot loaders for each mode. Windows is a little trickier, since it ties its partition table type to its boot mode -- Windows boots in BIOS mode only from MBR disks and in EFI mode only from GPT disks. (I've heard of some exceptions to this rule, but they're pretty exotic.) Thus, switching the Windows boot mode requires changing the partition table and installing a new boot loader.

Between all these issues, there's a lot of complexity in your triple-boot setup, and you've omitted the most important details -- namely, the partition table types and boot modes of most of your OSes (although I've inferred some of that information). This makes it difficult to offer specific advice. One point, though: Clover configuration and setup is well beyond the scope of this site. If you want to use GRUB as your primary boot manager, though, you must pay attention to your boot mode and install follow-on boot loaders in the same mode (BIOS/CSM/legacy vs. EFi/UEFI) that GRUB uses.


EDIT:

Given your new information, there are several possible ways to proceed. One is, as you suggest, to convert both Windows and Ubuntu to boot in EFI mode. Another is a hybrid setup. One way to do this would be as follows:

  1. Download a USB flash drive or CD-R version of my rEFInd boot manager and create a boot medium from it.
  2. Boot to rEFInd. It should show an option for Ubuntu, and possibly some others. (If there's an OS X option, ignore it; it won't work. If there's a Clover option, it might work.)
  3. Boot Ubuntu.
  4. Install the PPA or Debian package version of rEFInd.
  5. Edit /boot/efi/EFI/refind/refind.conf: Uncomment the scanfor line and add hdbios to the list of options.
  6. Remove the rEFInd external boot medium and reboot in EFI mode. rEFInd should come up and enable you to boot Ubuntu, and maybe Clover (and from there, OS X). There should also be one or more gray diamond-shaped icons, one of which should boot Windows.
  7. If you see just one gray icon-shaped icon and it doesn't boot Windows, you must edit refind.conf again, and uncomment the uefi_deep_legacy_scan option. Note that you may need to mount your ESP manually, or add an option to /etc/fstab to do so automatically.

You may need some more tweaking at this point, but that's the basic outline of it. In this configuration, rEFInd will enable you to boot Ubuntu (in EFI mode), Clover (in EFI mode), or Windows (in BIOS mode); and Clover should boot OS X (and may show options for Windows and/or Linux, too).

Something similar should be possible with Clover as the primary boot manager; however, with this setup, Clover will show options for OS X (in EFI mode), GRUB (in BIOS mode; or in EFI mode if you install the grub-efi package), and Windows (in BIOS mode). I don't know the exact steps you'd take to set this up. Whether you prefer Clover or rEFInd as your primary boot menu is a matter of personal preference.

Your plan to convert everything to EFI mode is also workable, but will involve more effort and slightly more risk in the short term. Once set up, you could use GRUB, Clover, or rEFInd as your primary boot manager. If you used GRUB or rEFInd as the primary boot manager, you'd still need Clover to boot OS X; and if you used Clover as the primary boot manager, you'd need to use GRUB or rEFInd to boot Ubuntu.

You could use rEFInd on a USB flash drive or CD-R to play with some of these options to see how they'd work, with negligible risk to your configuration, since you'll make no changes to your hard disk.

In sum, you've got a lot of options for how to proceed, with no clear winner in terms of ease of use or complexity -- they all should work pretty well, but you'll need two boot managers for at least one OS boot path.

Share:
11,776

Related videos on Youtube

Pol Mesalles
Author by

Pol Mesalles

Updated on September 18, 2022

Comments

  • Pol Mesalles
    Pol Mesalles over 1 year

    So I have a triple-boot setup in which I have just updated OS X (Hackintosh) to the newest version and a new bootloader (from Chimera to Clover). It looks something like this:

    • Ubuntu 14.04 LTS on /dev/sda (hd0)
    • Windows 10 Pro on /dev/sdb (hd3)
    • OS X 10.11 El Capitan on /dev/sdd (hd2), with the following partitions:
      • gpt1 for the EFI Clover bootloader (67E5-17ED is the UUID for this volume)
      • gpt2 for the main OS X disk

    Everything is working fine, and I can boot into each OS from the BIOS with no problem. However, I like to use GRUB as my main bootloader.


    Previously, by having something like this:

    menuentry "OS X 10.10" {
        insmod hfsplus
        set root=(hd2,gpt2)
        multiboot /boot
    }
    

    I was able to chainload to the Chimera bootloader from GRUB with no issues, and from there boot OS X.


    However, with the new UEFI-based Clover bootloader, no matter wheter I try:

    menuentry "OS X 10.11" {
        insmod chain
        insmod part_gpt
        set root=(hd2,gpt1)
        chainloader /efi/boot/bootx64.efi
    }
    

    or

    menuentry "OS X 10.11" {
        insmod part_gpt
        insmod search_fs_uuid
        insmod chain
        search --fs-uuid --no-floppy --set=root 67E5-17ED
        chainloader ($root)/efi/boot/bootx64.efi
    }
    

    as has been suggested here and here,

    I keep getting an invalid signature error from GRUB when I select "OS X 10.11".

    I even tried:

    menuentry "OS X 10.11" {
        insmod chain
        insmod part_gpt
        set root=(hd2,gpt2)
        chainloader +1
    }
    

    which leads to a blank screen with some random characters on the top.


    The problem appears to be the same as this. However, I have Secure Boot disabled in the BIOS preferences.

    Anyway, my question is if there's anything else I can try to chainload these bootloaders together to work like Chimera, or if there's another way to boot directly into OS X from GRUB.

    Thanks in advance,

    • TheWanderer
      TheWanderer about 8 years
      Do it the other way around (Clover by default, GRUB as an option). It worked for me.
  • Pol Mesalles
    Pol Mesalles about 8 years
    Thanks for answering! So I thought Ubuntu booted in UEFI mode because it's installed on a GPT disk; however, I just checked, and it turns out it boots in Legacy mode. Also, Windows --for some reason-- is installed on a MBR disk, so it's most certainly Legacy. That's probably the reason why I cannot cahinload Clover (UEFI) from GRUB (which I now know must be Legacy). Having seen that, next week I'll be getting a new backup disk, and then if I have time, update both Windows and Ubuntu to UEFI boot. Will let you know then if I can get it working! (with bootx64.efi)
  • Rod Smith
    Rod Smith about 8 years
    Please see my edit, above, for more suggestions.
  • Pol Mesalles
    Pol Mesalles about 8 years
    Wow... didn't know you were behind rEFInd... congratulations! I've seen it recommended in many places, especially for these kinds of multiboot setups. Still, I probably won't be using it (yet), because I'd prefer to move all systems to UEFI boot... but it's nice to know I have other options. Thanks,
  • Pol Mesalles
    Pol Mesalles about 8 years
    Alright then! It's now almost 4 AM here, but I finally got it working! Now all 3 operating systems boot into UEFI mode, and once I edited the GRUB config with the bootx64.efi line (used the first snippet I had tried), it loads Clover! Thanks for all your help, Rod!
  • Melab
    Melab almost 4 years
    Where is Clover's BIOS-mode EFI emulation software located?