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
Download the current Ubuntu LTS installer from the Canonical website. As of publication, that version is Ubuntu 16.04.4 LTS.
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
Insert your USB into your Mac.
Open Disk Utility from “Application/Utilities.” Select your USB drive in the sidebar.
Click “Erase” in the menu bar to format the drive.
In the next screen, set the format to “MS-DOS (FAT)” and the scheme to “GUID Partition Map.”
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.
Download and install Etcher.
Open Etcher. Click “Select Image” and choose the Ubuntu ISO file.
Click “Select Drive” and choose your USB drive.
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
- Download rEFInd’s binary package.
- Unzip the downloaded file.
- Open Terminal from “/Applications/Utilities/Terminal.”
- 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.
- 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.
Open Disk Utility from the “/Applications/Utilities” folder.
Select your boot disk in the sidebar and click the “Partition” button.
Click “Partition” in the dialog box to confirm.
Click the “+” button to add a partition
Set the size and name. Choose “MS-DOS (FAT)” for your partition type. This will be erased by the Ubuntu installer.
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
- Reboot your Mac.
- Select your USB drive in rEFInd to boot from it.
Running the Ubuntu Installer
Connect to your wireless network (if you can) and choose to install third-party software.
At the installation selection screen, choose “Something Else” from the bottom.
Select the partition you created earlier. Click the “–” button to delete it.
With the free space selected, click the “+” to create a new partition.
Set the size to 4000 MB and “Use as” to “swap.”
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 “/.”
Choose the ext4 partition under “device for bootloader installation.”
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:
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.