1

I removed everything on my MacBook Pro, partitioned it into several small partitions, and installed Ubuntu, Windows and OS X. Grub2 sees my Windows and Ubuntu installs, but OS X doesn't show up in the Grub2 menu.

I tried os-prober and it doesn't find anything. I tried the various edits to 40_custom I've seen here and here and elsewhere, but I keep getting "hd0,[blank]" does not exist.

How can I make OS X show up on the Grub2 menu at boot?

  • As a temporary work-around, I'm Option-booting into OS X when I need to. – Carl Patenaude Poulin Sep 28 '15 at 4:30
5

An EFI-mode GRUB should be able to chainload the OS X boot loader, but the GRUB prober might not know where to find it. It's traditionally stored as /System/Library/CoreServices/boot.efi on the OS X root partition; but since Yosemite, it's typically stored on the emergency-boot disk instead, since the root filesystem now uses an LVM setup by default, which the firmware can't read. In any event, you may need to write a custom GRUB entry to get this to boot. See here for some basic information, although that doesn't give complete instructions for what you want.

If your Ubuntu installation is in BIOS/CSM/legacy mode, it may be harder, since GRUB can't redirect to an EFI-mode boot. GRUB has the ability to boot the OS X kernel directly, but that can be tricky to set up and may lose you some features in OS X. This is definitely fringe/bleeding-edge stuff, so I don't recommend you try it. If you care to do so, you can probably find instructions somewhere on the Internet, but I don't have any URLs handy.

Many Mac users prefer to use something other than GRUB as the default boot loader, relegating GRUB to secondary status or not using it at all. The traditional tool for doing this is rEFIt, but it's been abandoned for five years now. It still works, but if you use Yosemite or some other relatively recent options, you may have to jump through some extra hoops. I created a fork of rEFIt called rEFInd. It's actively maintained and will boot any of your OSes. You can try it out on a CD-R or USB flash drive before installing it to your hard disk, if you like. (The downloads page includes links to images for both types of media. rEFInd can boot Linux kernels directly, thus bypassing GRUB; or it can chainload to either an EFI-mode or a BIOS-mode GRUB. It can also chainload to the OS X boot loader and to both EFI-mode and BIOS-mode Windows boot loaders.

  • Any update on this since 2013? – Jonathan Aug 23 '17 at 20:01
  • 2
    Apple is now using a dedicated boot partition for at least some installations. (An iMac I bought a few weeks ago is so configured, for instance.) Beyond that, I haven't looked into configuring GRUB to chainload to the macOS boot loader in ages. It should still be possible, but if the Ubuntu OS-prober isn't finding it, you'll have to go digging. rEFInd should detect it automatically. I'm still maintaining that program; the most recent release was ten days ago. – Rod Smith Aug 23 '17 at 20:48
  • I tried installing your amazing rEFind tool using your PPA & apt, and it installed fine and I was able to get into rEFind but it only showed Ubuntu (I have like 5 OS's on this machine. So I went back to Grub. Grub's OS-Prober finds it fine, but it says some error about a table missing when I try it, or it just has a blank screen and seems to hang. So I tried to use grub-customizer and set up chainloaders on each partition, but those also died with the same table error. Then I used my MSI bios just to straight boot into the drive, and somehow that worked. From there I put Chameleon on a USB pen – Jonathan Aug 24 '17 at 0:46
  • 1
    @JonathanLeaders, based on your description, I suspect you've got a mix of EFI-mode and BIOS-mode OSes. If so, rEFInd would work if you uncomment the scanfor line in refind.conf and ensure that hdbios is among the options. A better solution is to install EFI-mode boot loaders for all your OSes, but that's not possible for some older OSes, like OS/2 and DOS. – Rod Smith Aug 24 '17 at 13:19
  • 1
    rEFInd detects OSes at run-time, not via GRUB's OS prober. Thus, rEFInd running pre-boot cannot use OS prober; and an install script would have a hard time figuring out what rEFInd would detect to do a comparison then. rEFInd is configured to not detect BIOS-mode OSes by default on UEFI PCs because the detection method relies on the firmware, which produces one entry per hard disk, whether or not those entries work, and so would result in useless BIOS-mode entries in many cases. Also, mixed-mode (BIOS plus EFI) booting is uncommon on UEFI PCs. – Rod Smith Aug 25 '17 at 14:49

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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