Running Linux on a MacBook

There are many existing resources for installing and running Linux on Apple hardware. This guide attempts to serve as a table of contents for those resources, with additional tips and context included.

Disclaimer: every single time I have adjusted the boot process of my macbook, something horrible has at some point seemed to occur: the laptop bricked, macOS partition corrupted, etc. That being said, the situation has always been recoverable. If you mess with your boot process, expect something bad to happen but maybe don't let that stop you from experimenting.

Before installing

It's good to understand some aspects of the OS X/macOS system (hereafter "macOS") before making adjustments. Most important are firmware updates, Apple's UEFI implementation, and bless(8).

Firmware updates

The easiest (and only, AFAIK) way to update firmware is through the "Software Update" feature of macOS. For that reason, it's a good idea to retain a bootable copy of macOS, either as a partition on the same drive as Linux or on a separate drive entirely. It might also be a good idea to make a bootable macOS installer. See Apple's guide for instructions.


On startup, a macbook boots to whichever EFI entry has the highest priority. The process can be interrupted by holding a certain key combination at startup (see Mac startup key combinations) to trigger Apple's rudimentary boot manager. If you forget to hold the correct key combination at startup, the UEFI may boot an entry you did not intend, at which point you will have to reboot and try again.


The bless utility is widely reported to be buggy, which matches my experience with it. I would recommend using efibootmgr (the standard alternative on Linux) entirely.

EFI System Partition (ESP)

By default, Apple's Disk Utility hides the ESP. You can still mount it from a terminal:

diskutil list
mkdir /Volumes/efi
sudo mount -t msdos /dev/diskXsY /Volumes/efi

(where diskXsY is the ESP as ascertained by diskutil list)

Installing Linux

There are a number of ways to structure the process of booting Linux, which will include some number of the following components:

  • Apple's UEFI implementation
  • A boot manager, such as rEFInd or rEFIt
  • A boot loader, such as GRUB2
  • An initial ramdisk (to be passed, along with the kernel, to the bootloader)
  • A Linux kernel, perhaps with an EFI-stub

Your use case should dictate which structure you choose. If you plan on regularly booting to different operating systems, you should use the rEFInd boot manager (if only so that you don't have to remember to press the correct key combination at every startup). If you want a user-friendly boot process that will (probably) "just work" then you should also use rEFInd. If you're installing a popular Linux distribution as-is OOTB, you'll probably use a Linux kernel (without EFI stub) and an initial ramdisk. If you want a simple boot process with as few steps as possible, you can get away with booting an EFI kernel stub (without even an initial ramdisk) directly from Apple's UEFI.

Using the rEFInd boot manager

rEFInd has great documentation where you can find installation instructions and a detailed feature list. There are two primary ways to use rEFInd: invoke a Linux kernel bootloader (e.g. GRUB2) or load a Linux kernel EFI stub.

Invoking the GRUB2 bootloader from rEFInd

This is the "standard" way of dual-booting Linux. Installation might look like this:

  1. Install rEFInd
  2. Insert installation media of a chosen GNU/Linux distribution
  3. Reboot
  4. In the rEFInd menu, select the installation media as the boot target
  5. Follow installation instructions (at some point, the installer will automatically add a boot entry to the ESP partition)
  6. Reboot
  7. In the rEFInd menu, you can choose from the boot targets that rEFInd has found in the ESP partition

You're dual-booting!

Loading a kernel EFI stub from rEFInd

This method is very similar to the above, but may require a more manual installation process. For a how-to, see

Using Apple's boot manager

You may be able to get by without a third-party boot manager. However, on some Apple hardware, booting non-macOS operating systems from EFI may result in improper hardware initialization (see this story for an example). In such cases, it might be necessary to use rEFInd to force proper initialization (or at least to use a bootloader in BIOS compatibility mode, like GRUB2).

Again, you can invoke a bootloader or load an EFI stub.

Invoking GRUB2 from Apple's UEFI

Loading a Linux kernel with EFI stub from Apple's UEFI

This stackoverflow post has full instructions. They boil down to:

  1. Create an HFS+ partition large enough to hold a kernel stub and (optionally) initial ramdisk (which were ~6MB and ~36MB in my experience)
  2. Copy the kernel stub and initial ramdisk to the partition
  3. Rename the kernel stub so that it ends with .efi
  4. Create a new boot entry pointing to your new partition:

    efibootmgr -d /dev/sdX -p Y -c -L "Debian (EFI-Stub)" -l /vmlinuz.efi -u "root=UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ro quiet splash initrd=\initrd.img"

Note: see this stackoverflow comment by the author of rEFInd for thoughts about this boot sequence.

  • Without initial ramdisk

    The same steps apply, but you must use root=PARTUUID=... instead of root=UUID=.... See this reddit comment for an explanation.



BTC Address: bc1qlpu2c7ltxrz5fd2a977ywedlp9u4lvukvluc3d