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.


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.

  • I definitely do not understand this in the level of detail that I should. I have read your pages before, but they get pretty dense, and I have not been able to wrap my head around it. I'll just dig in and take the time to learn it properly. That said, I did install rEFInd from OSX, but I encountered the problem I mentioned with the screen going black. I'll retry with the new version (not sure what I did before) -- as I do have Yosemite. – Rsync Feb 5 '15 at 23:07
  • So I read your EFI pages. Very helpful; though I would still categorize myself as confused. One thing I learned is that my ESP is not mounted (df /boot/efi has "/dev/sda5" (my Linux partition) under Filesystem and "/" under mounted). Also, Parted does not list any "boot" partition, and in Gparted, the first partition, /dev/sda1, is listed as unallocated space. This reminds me: when I was running through these issues, I think that installing rEFIt deleted the contents of my EFI/ESP partition. I believe I can get it back by using OSX's disk utility in recovery mode. – Rsync Feb 9 '15 at 21:38
  • ALSO, my /boot/efi folder has two folders in it BOOTLOG and EFI. Inside /boot/efi/EFI are the following folders: APPLE ASUS Boot refind tools ubuntu ubuntustudio. bootx64.efi is in /boot/efi/EFI/Boot. – Rsync Feb 9 '15 at 21:38
  • Ok, so I cannot get the EFI/ESP partition back in OSX's disk utility. On the Mac side (the info reported above was in Ubuntu), it does not "see" the unformatted first partition, which in Ubuntu shows as /dev/sda1 "unallocated." OSX actually starts the partition numbering at what was /dev/sda2 in Ubuntu. So /dev/sda2 = /dev/disk0s1. I am going to try to follow this guide to recreate it. – Rsync Feb 9 '15 at 22:34
  • I created an EFI partition in the unallocated space and copied the EFI from a boot disk of OSX. That was a bit of a ride, but happily it worked (I didn't see Rod's post about an easier way to go). The Mac bootloader then didn't recognize my Ubuntu partition, so I chrooted in (from a LiveCD) and reinstalled grub. Then, I booted to OSX and FINALLY installed rEFInd. Now all works very nicely w/o grub, but the Ubuntu bootup has a lengthy splash routine that I need to learn how to skip. – Rsync Feb 10 '15 at 5:43

Booting the GRUB EFI binary directly should work. For newer Macs there shouldn't be any difference between a normal UEFI install on Windows or on a Mac. For older Macs you need to bless the GRUB EFI binary, the Mactel tools PPA provides tools to make the setup easier.

You can even boot an external Ubuntu installation, as I described in Is it still possible to install Ubuntu to an external harddrive with UEFI?, but for booting from an internal drive on a Mac you should omit the --removable option from the grub-install command. Also you don't need to create another HFS+ partition when following these instructions in your case, use the partition where the Mac EFI loaders are.

  • Thanks for the suggestion. It looks like booting the GRUB EFI binary is a little messy with an iMac. Is this the best option? If so, I will try it. – Rsync Feb 1 '15 at 2:05
  • @MBWD I don't understand what the link is trying to tell me. You need to bless the binary on older firmwares. If there is a firmware update available that doesn't require blessing, than you can skip that. Probably check with askubuntu.com/q/395879/40581. This is the best I can think of and users having more experience with Macs seem to have no problems blessing the standard EFI bootloader of the 3rd party OS they want to run on their Macs. – LiveWireBT Feb 1 '15 at 3:30

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.