Dual-Boot – Installing Bootloader Without rEFInd for El Capitan

bootdual-bootmacbook propartitioninguefi

I am trying to dual-boot El Capitan with Ubuntu MATE purely with my MacBookPro's EFI firmware and without using rEFInd or rEFIt. http://courses.cms.caltech.edu/cs171/materials/pdfs/How_to_Dual-Boot_OSX_and_Ubuntu.pdf shows how to do this without erasing and reinstalling OS X. I was following it when I ran into a problem with creating the Ubuntu Boot partition — Disk Utility would not make it smaller than 5 GB. I am not wasting 5 GB just for a boot loader. So I googled it, and found this StackExchange question (link removed) that even referenced the guide I was using. In the command line, diskutil would not shrink the partition to be small enough. So then I saw the last comment on the only answer to that question, which says that booting from a true ESP is a better option. So now I've been thinking about how I will boot Ubuntu using Mac's firmware. I have roughly thought about three different methods:

  1. Installing the bootloader on the ESP already on the Mac. I would probably use ubiquity -b in the terminal and then installing the bootloader with a process similar to this one (link removed).
  2. Doing the same thing as above, but creating a new ESP (not sure if this would even be necessary).
  3. Not messing with an ESP and using bless to make the EFI file bootable on the same partition that Ubuntu is installed in. (Will there be an EFI file?)

If I seem like I don't exactly know what I'm doing it's because I don't, which is why I am here. Would any of these options work? Is there a better option to set this up?

EDIT: Ok, I've installed Ubuntu MATE. I selected to install the boot loader on the ESP already on the Mac, and it went well. However, when I boot into the firmware, the only option that shows up is Macintosh HD. When I reboot from OS X, it will reboot to OS X. However, I can mount the ESP that I installed GRUB on and then bless it in the command line, and the Mac will reboot into Ubuntu MATE. My conclusion from this is that the firmware only allows the user to boot from a mounted volume, and I'm probably going to have to either mount my ESP in OS X or use a different partition for the boot loader (and mount that in OS X ).

EDIT 2: Solved. I just copied the grubx64.efi file in the ESP to the directory /EFI/boot/bootx64.efi in the ESP (or any fat32/efi partition) and Apple's firmware detected it. Thanks to /u/5HT-2a.

Best Answer

You don't have to use Disk Utility to make the partitions, since this is obviously the tool's limitation, why not use a different tool for partitioning such as a live CD? Arch and Ubuntu are not exactly the same when it comes to installing in UEFI. I recommend using the alternate medium to install ubuntu, select manual configuration and while installing you can set your boot partition for ubuntu to be mounted as 'boot', and the esp mounted as boot\efi. Everything about ubuntu on the esp would be under an "ubuntu" folder. Once your setup and your installation is ready you should either add an option for chain-loading ubuntu on El Capitan (but can this happen? - i have no idea about osx) or use cloverefi which is the most widely used amongst hackintosh users as far as i know. https://sourceforge.net/projects/cloverefiboot/

Related Question