How to Install and Dual-Boot Ubuntu on Mac

Spread the love

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 Ubuntu

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

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

2. Create Your Ubuntu Installation Drive

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.

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

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

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

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.

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

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

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

3. Prepping Your Drive

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.

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.

5. Reboot your Mac to ensure rEFInd is operational.

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.

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

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

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

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

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

4. Installing Ubuntu

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.

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.

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

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

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

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 “/.”

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

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

Setting Up Boot Order

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:

sudo efibootmgr -o 0000,0080

Conclusion: After Installation

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.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.
By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time. Subscribe


Alexander Fox

Alexander Fox is a tech and science writer based in Philadelphia, PA with one cat, three Macs and more USB cables than he could ever use.

Comments (19)