While installing Ubuntu on a Mac, should I install it under EFI or BIOS?

While installing Ubuntu on a Mac, should I install it under EFI or BIOS? I'm using rEFInd, trying to install Ubuntu 15.10


Most of the installation process is identical for EFI-mode versus BIOS-mode installations. They differ in three ways:

  • When booting the installer in BIOS mode, you can boot either 32- or 64-bit versions of Ubuntu, at least if you've got a 64-bit CPU. In EFI mode, you can install only 64-bit versions of Ubuntu, and that only if you've got a 64-bit EFI (which most Macs do). If you have a rare Mac with a 32-bit EFI, things get complicated.
  • If you install in EFI mode, the installer will set your EFI System Partition (ESP) to be mounted automatically at /boot/efi. If you install in BIOS mode, this won't happen. This detail can be changed manually after installation.
  • The installer will install a boot loader to match its own boot mode. (An exception is if you launch into "try before installing" mode, open a Terminal, and type synaptic -b. In this case, no boot loader will be installed.)

IMO, installing a 32-bit OS on a 64-bit CPU seldom makes sense these days. One notable exception is some fairly early Intel-based Macs, which have 32-bit EFIs. Thus, the first point is unimportant for most users. As noted earlier, an exception is if you've got one of the rare Macs with a 32-bit EFI (from roughly the first year of Intel-based Mac production).

The second point is easy to change, and so doesn't bear much consideration, provided you understand how to edit /etc/fstab. If you don't understand this topic, see this page.

The boot loader issue is the big one. To launch a BIOS-mode boot loader, Macs require that your disk use an MBR partition table or a GPT with a hybrid MBR. OS X is normally installed to GPT, which means that if you're dual-booting, you'll need a hybrid MBR to dual-boot with a BIOS-mode boot loader. Please read the link earlier in this paragraph. It describes hybrid MBRs in more detail, including why they're so DANGEROUS. For this reason alone, I strongly advise against using a BIOS-mode install of Ubuntu if you're dual-booting with OS X.

If Ubuntu is to be the only OS on the computer, though, you can use a straight-up MBR (with no GPT) and install in BIOS mode. This is likely to work better than an EFI-mode installation, but it will limit your options if you subsequently decide you want to dual-boot after all. It will also make it harder to update the computer's firmware, should that ever be necessary.

Getting back to dual-booting, if you install Ubuntu directly in EFI mode, it will try to install an EFI-mode version of GRUB. This may work fine, and may enable you to dual-boot with OS X by using GRUB's boot menu. This configuration will bypass rEFInd (unless you re-install it). I've seen reports of this configuration not working, though; the system will boot straight to either OS X or Ubuntu, making it difficult to boot the other OS.

If you want to keep using rEFInd, the safest approach is:

  1. Launch the Ubuntu installer in its "try before installing" mode. It doesn't matter if you do this in BIOS mode or in EFI mode, except for the comment about whether your ESP will be mounted automatically when you're done.
  2. Open a Terminal window.
  3. Type ubiquity -b. This will launch the Ubuntu installer. The -b option tells it to not install GRUB.
  4. Install Ubuntu regularly. Be sure to use ext4fs, not another filesystem. (If you really want to use another filesystem, you can, but that complicates matters slightly. Post back with details if you need further advice on this point.)
  5. When you're done, reboot. rEFInd should appear (if it's already installed) or the computer will boot straight to OS X (if rEFInd is not already installed).
  6. In OS X, (re-)install rEFInd. This step exists solely to ensure that the EFI filesystem driver for ext4fs is installed. You could instead install that driver manually yourself. (You could also manually install another EFI filesystem driver, if that was necessary.)

The result of this procedure is that, when you reboot, rEFInd should come up and give you the option of booting either OS X or Ubuntu. One caveat is that the Ubuntu option will require some tweaking if you use a separate /boot partition. You can boot on a one-time basis by hitting F2 or Insert twice, rather than Enter, once the Ubuntu option is selected. You can then add ro root=/dev/whatever, where /dev/whatever identifies your root (/) filesystem. Once you've booted Ubuntu, run the mkrlconf script that comes with rEFInd. This will generate a file called /boot/refind_linux.conf, which will obviate the need to make these changes.