Ubuntu – REFIt – rEFInd – Grub2…what is the “right way” for Ubuntu 14.10 on a Mac:

grub2refindrefituefi

Can someone please help me to understand the “right way” (if there is such a thing) to run Ubuntu on an EFI computer (specifically a 2012 iMac — I have Ubuntu 14.10 installed on this iMac, on partition /sda5).

I initially installed rEFIt. It didn't work perfectly, so I later tried to replace it with rEFInd (though I think my removal of rEFIt was incomplete). And of course I had Grub installed on the Ubuntu partition.

I don't remember the sequence of these installs. I think I installed rEFIt on the Mac side, then installed Ubuntu (with Grub) on the /sda5 partition. . . then later “upgraded” to rEFInd by installing it on the Ubuntu side (but it might have been on the Mac side).

When I booted the Mac, for a long while, it would boot into Grub2 – where I would select my Ubuntu install. Then, not sure what happened, but it started booting into rEFInd. In rEFInd, I would select the Ubuntu icon and it would then boot into Grub2. Essentially, I had two different boot managers that I had to use in sequence.

Anyway, I had this working for a long time until after a major crash. After the crash, every time I booted into rEFInd and selected ANY OS (including LiveUSBs), it would initially load but then the screen would eventually go blank and just stop there. Nothing appeared to happen. So I then removed reFIND and installed reFIt. Now the Mac boots into rEFIt, and I when I select the Ubuntu icon, it goes to Grub2. But the Grub screen is not entirely clear, just a little pixelated.

This caused me to wonder: should I have to use two boot managers?

Is it possible/preferable to either:

1. boot directly into Grub2, with no intermediary; or
2. boot into rEFIt (or rEFInd) and not have to then go to Grub?

Thanks for any erudition on this matter. I just don't get it.

Best Answer

Both your #1 and #2 options are possible; however, if you don't understand the Mac's native EFI-mode booting and how the Mac implements BIOS/legacy booting, you're likely to make a hash of things in setting it up. My suspicion is that you installed Ubuntu in BIOS/legacy mode with a BIOS-mode version of GRUB, which means that GRUB will be unable to launch OS X (or maybe it'll manage, but that path is very flaky in my experience). If I'm right, you'll want to install either an EFI version of GRUB or rEFInd to do as you want. Installing from OS X is preferable, although the Mactel tools to which LiveWireBT can theoretically make this more reliable in Linux. (I have limited experience with these tools myself, though, so I can't comment on them in detail.) My pages on hybrid MBRs and EFI boot loaders for Linux will help bring you up to speed, but be prepared to spend some time on the reading. Sorry, but I know of no good shortcut for this. A brains-off step-by-step guide might work, but is more likely to lead you astray because of assumptions the author makes that don't apply to your system.

The rEFInd documentation is pretty extensive. Be aware there have been significant changes in rEFInd's Mac support recently. In particular, version 0.8.4 and later now install to the EFI System Partition (ESP) by default, which is necessary to work with the way Yosemite is set up by default. This change has caused some confusion among users, though.

Full disclosure: I maintain rEFInd, so I'm not unbiased.