Install Linux on Mac: A Dual Boot Guide

Installing Linux on a Mac: A Guide to Dual-Booting
While Apple’s Boot Camp simplifies Windows installation on a Mac, it doesn’t extend support to Linux distributions. Installing and dual-booting a Linux system, such as Ubuntu, requires a more hands-on approach.
Trying Linux Without Installation
For users who wish to experiment with Linux without committing to a full installation, a live environment offers a convenient solution. This allows you to run Linux directly from a CD or USB drive.
To boot from live media, insert the Linux installation media into your Mac. Then, restart the machine and immediately press and hold the Option key during startup.
This action will bring up the Startup Manager screen, presenting you with a selection of bootable devices. Choose the Linux media from this list to initiate the live environment.
Our Testing Process
The procedures outlined here were verified through practical application. Specifically, we successfully installed Ubuntu 14.04 LTS to validate the process and ensure accuracy.
This testing confirms the feasibility of dual-booting Linux on a Mac, providing a reliable method for users seeking to expand their operating system options.
Installing rEFInd Boot Manager
This guide details the installation of rEFInd, a boot manager designed to facilitate selection between multiple operating systems. It supports booting into Mac OS X, Linux, Windows, and other OSes. Utilizing rEFInd streamlines the dual-boot experience.
Note that rEFIt, an earlier iteration, is no longer actively maintained. rEFInd represents a modern, supported alternative built upon the foundations of rEFIt.
Considerations for Full-Disk Encryption
Systems employing full-disk encryption may encounter compatibility issues with rEFInd. Therefore, either disable full-disk encryption prior to installation, or be prepared to undertake additional configuration steps.
Downloading and Running the Installation Script
Begin by navigating to the rEFInd project page on SourceForge. Locate and click the "Download" button to obtain the most recent refind-bin-[version].zip archive.
Open the Terminal application on your Mac. This can be achieved by pressing Command + Space to invoke Spotlight, typing "Terminal," and then pressing Enter.
From the downloaded zip file, drag and drop the install.sh script directly into the open Terminal window. Press Enter to execute the script.
Verification and Initial Boot
After the script completes, perform a complete shutdown of your Mac – ensure it's not merely a restart. Then, power on your computer.
Upon startup, the rEFInd boot manager screen should now be visible, presenting you with a menu of available operating systems.
Mac Partitioning for Dual Booting
The next step involves adjusting the size of your macOS partition to accommodate the Linux distribution you intend to install. Initiate Disk Utility from within macOS by pressing Command + Space, typing "Disk Utility," and then pressing Enter.
Within Disk Utility, locate and select your Mac’s hard drive from the left-hand panel. Subsequently, click the "Partition" option situated on the right side of the window.
Resizing the macOS Partition
You will now need to reduce the size of the existing macOS partition to create unallocated space for Linux. The amount of space allocated to Linux is dependent on your needs.
While Ubuntu’s minimum system requirements specify 5 GB, allocating approximately 20 GB is a more practical and comfortable choice.
Adjust the partition size by dragging the handle on the partition volume or by directly entering the desired final size. Confirm the changes by clicking the "Partition" button.
It is important to note that you should not create a new partition at this stage. Simply leave the newly created space unallocated; it will be used during the Linux installation process.
Boot and Install Linux
To proceed, appropriate Linux installation media is required. For instance, if utilizing Ubuntu, an Ubuntu ISO file must be downloaded – specifically, the "64-bit Mac" version is recommended.
This ISO file should then be burned to a disc or, alternatively, a bootable USB drive can be created following the official instructions provided by Ubuntu.

Upon restarting your computer, the rEFInd boot manager will become visible. From this menu, the USB drive or disc containing the Linux system should be selected to initiate the boot process on your Mac.

Initiate the installation process by launching your chosen Linux distribution’s installer. Follow the on-screen prompts as you normally would during a Linux installation.
When prompted, ensure that the option to "Install Ubuntu alongside Mac OS X" is chosen, preventing the overwriting of your existing Mac OS X installation. The remainder of the installation should proceed without issue.

After installation, each computer startup will present a choice between Mac OS X and Linux via the rEFInd boot manager.

It's important to note that certain hardware components may not function flawlessly under Linux, depending on your specific Mac model.
This functionality is influenced by the Linux version used, its recency, and the particular Mac hardware configuration. Should issues arise, online searches utilizing your Mac’s model, year, and the Linux distribution’s name and version are recommended.
Frequently, other users will have encountered and documented solutions to similar problems, providing guides for optimal functionality.
Removing Linux and rEFInd from Your Mac
This guide details the process of removing Linux from a Mac that was set up for dual booting. It also covers the removal of the rEFInd boot manager. For those looking to completely restore their Mac, reinstalling macOS from scratch is a related option.
Deleting Linux Partitions
If you wish to eliminate Linux and revert to a single-OS setup, the removal of its partitions is the first step. Boot into your macOS environment.
Open the Disk Utility application. Locate and delete all partitions associated with your Linux installation.
Alternatively, you can boot from your Linux USB installation media. Utilize the GParted partition manager, available within Linux, to remove the Linux partitions.
Reclaiming Disk Space
Following the deletion of the Linux partitions, the space they occupied remains unallocated. To utilize this space, expand your macOS partition.
Within Disk Utility in macOS, you can enlarge the existing macOS partition to encompass the previously used space.
Reinstalling macOS
If Linux was installed as the sole operating system, replacing macOS entirely, a macOS reinstall is necessary. This will restore your Mac to its original operating system.
Uninstalling rEFInd
The rEFInd boot manager facilitates the booting of multiple operating systems. Removing it is optional.
If desired, follow the official uninstallation instructions provided by the rEFInd project. Your Mac will function correctly even with rEFInd remaining installed after Linux is removed.
rEFInd Considerations
While not essential, omitting rEFInd requires additional configuration to ensure proper Linux booting on a Mac. Apple provides streamlined installation support for Windows via Boot Camp, but no such convenience exists for Linux.
Image Credit: Brandon Nguyen on Flickr