How to Install and Dual-Boot Ubuntu on Mac

Dual-booting macOS and Ubuntu requires a little adventurousness, but it’s not too difficult. There can be some problems with the bootloader, though, so we’ll need to deal with that. It’s not too hard to install (and dual-boot) Ubuntu on a Mac.

As a warning, it’s way more efficient to run Ubuntu on a virtual machine using VMWare. If for some reason this doesn’t work for you, dual booting should be your second option. Just a warning: some hardware functionality might never work right under Ubuntu. Macs can be weird under Linux, so only proceed if you possess the patience and technical know-how for troubleshooting.

Before you begin, back up your Mac. This is not optional.

1. Download the current Ubuntu LTS installer from the Canonical website. As of publication, that version is Ubuntu 16.04.4 LTS.

dual-boot-ubuntu-on-mac-download-1

2. Donate to support Ubuntu, or click “Not Now” to go directly to the download page.

dual-boot-ubuntu-on-mac-download-2

We will use a USB drive for this example. The drive must be at least 2 GB and empty.

Formatting the Drive

1. Insert your USB into your Mac.

2. Open Disk Utility from “Application/Utilities.” Select your USB drive in the sidebar.

dual-boot-ubuntu-on-mac-disk-utility-1

3. Click “Erase” in the menu bar to format the drive.

dual-boot-ubuntu-on-mac-disk-utility-2

4. In the next screen, set the format to “MS-DOS (FAT)” and the scheme to “GUID Partition Map.”

dual-boot-ubuntu-on-mac-disk-utility-3

5. Click “Erase” and wait for the formatting process to complete.

dual-boot-ubuntu-on-mac-disk-utility-4

If you have trouble with formatting, try doing the same thing with Terminal.

Writing the Image

We will use Etcher to write the Ubuntu install image to disk.

1. Download and install Etcher.

dual-boot-ubuntu-on-mac-etcher-1a

2. Open Etcher. Click “Select Image” and choose the Ubuntu ISO file.

dual-boot-ubuntu-on-mac-etcher-2

dual-boot-ubuntu-on-mac-etcher-3

4. Click “Select Drive” and choose your USB drive.

dual-boot-ubuntu-on-mac-etcher-5

dual-boot-ubuntu-on-mac-etcher-4

5. Click “Flash!” to write the image to your USB drive.

dual-boot-ubuntu-on-mac-etcher-6

dual-boot-ubuntu-on-mac-etcher-7

rEFInd will be our bootloader for both Ubuntu and macOS.

Installing rEFInd

1. Download rEFInd’s binary package.

2. Unzip the downloaded file.

3. Open Terminal from “/Applications/Utilities/Terminal.”

4. Drag the “refind-installer” file onto the Terminal icon to run the script.

dual-boot-ubuntu-on-mac-refind-05-copy

You may need to disable System Integrity Protection (SIP) before proceeding or install rEFInd from the recovery partition. To do so:

  • Reboot your Mac. When the startup screen shows up, press and hold the Command + R until the Apple logo appears on your screen.
  • Once it finishes loading and brings you to Recovery Mode, click “Utilities -> Terminal.”
  • In the Terminal window, type in csrutil disable and press Enter.
  • Restart your Mac.

dual-boot-ubuntu-on-mac-refind-02

5. Reboot your Mac to ensure rEFInd is operational.

dual-boot-ubuntu-on-mac-ubuntu-installer-01

Resizing the Boot Partition with Disk Utility

If we want to dual boot macOS and Ubuntu from the same hard drive, we’ll need to make a partition for Ubuntu with Disk Utility.

1. Open Disk Utility from the “/Applications/Utilities” folder.

2. Select your boot disk in the sidebar and click the “Partition” button.

dual-boot-ubuntu-on-mac-disk-utility-05

3. Click “Partition” in the dialog box to confirm.

dual-boot-ubuntu-on-mac-disk-utility-06

4. Click the “+” button to add a partition

dual-boot-ubuntu-on-mac-disk-utility-07

5. Set the size and name. Choose “MS-DOS (FAT)” for your partition type. This will be erased by the Ubuntu installer.

dual-boot-ubuntu-on-mac-disk-utility-08

6. Click “Apply,” then “Partition” to execute.

dual-boot-ubuntu-on-mac-disk-utility-09

If you encounter trouble, you may need to either use Terminal to partition the drive instead or clear Time Machine snapshots.

With all that accomplished, we are finally ready to install Ubuntu on our Mac! Unfortunately, high-quality screenshots were not available for these steps.

Booting from the USB

1. Reboot your Mac.

2. Select your USB drive in rEFInd to boot from it.

dual-boot-ubuntu-on-mac-ubuntu-installer-021

Running the Ubuntu Installer

1. Connect to your wireless network (if you can) and choose to install third-party software.

2. At the installation selection screen, choose “Something Else” from the bottom.

dual-boot-ubuntu-on-mac-ubuntu-installer-12a

3. Select the partition you created earlier. Click the “–” button to delete it.

dual-boot-ubuntu-on-mac-ubuntu-installer-13a

4. With the free space selected, click the “+” to create a new partition.

dual-boot-ubuntu-on-mac-ubuntu-installer-14a

5. Set the size to 4000 MB and “Use as” to “swap.”

dual-boot-ubuntu-on-mac-ubuntu-installer-15a

6. Create another new partition with the “+” button. Use all the available free space. Set “Use as” to “Ext4 journaling file system.” Set the mount point to “/.”

dual-boot-ubuntu-on-mac-ubuntu-installer-16a

7. Choose the ext4 partition under “device for bootloader installation.”

dual-boot-ubuntu-on-mac-ubuntu-installer-19a

8. Click through the remaining steps to create your user and finish the installation.

Upon completion, your Mac will likely boot into Ubuntu automatically. If so, the GRUB bootloader has taken over: we need to reassert rEFInd’s control. Follow the instructions in this guide to use efibootmgr from within Ubuntu to solve the problem.

There might be a shortcut, though. If you only have rEFInd and Ubuntu installed, this Ubuntu Terminal command should set you right. However, circumstances vary, so don’t just run it blindly:

You likely need to install additional drivers and software specifically for your Mac model. The best advice is to search out appropriate drivers and software changes for your hardware in particular.

Leave a Reply

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.