Installing Linux on a Mac Mini
I recently came into possession of a number of old Mac Minis, circa 2012-2014. These we well-specced for their day, with 16 GB of RAM, 1 TB hard drives, and multi-core processors, but they’re past end-of-life with Apple. What to do with them?
The obvious solution was to stage them with Linux and try to repurpose them - in my case, as build machines for CS 346.
Although this is usually as simple as creating a bootable USB stick and letting the installer handle the installation, there were enough odd little hiccups that I thought it was worth documenting the process.
- Apple Mac Mini 2012-2014
- 16 GB RAM, 1 TB HDD (not SSD)
- Realtek wireless 802.11c
Creating the bootable USB Key
- Download an image for Ubuntu Desktop. I downloaded
Ubuntu 22.04.1 LTS (x86), since it was the most recent LTS at the time.
- Create a bootable USB key from the image. I used balenaEtcher.
- Insert the USB key while the machine is powered off. While holding down the
OPTkey, press the power button. The machine should power up to a boot menu, where you can select
EFI Boot(i.e. the USB key) as your boot device. Next, you are prompted to
Try or Install Ubuntufrom the boot menu.
Problems encountered during installation
On newer/supported hardware, the installer usually runs fine from this point, However, on this particular hardware, the installer consistently failed to run. Errors included:
- The “Ubuntu Live CD installer” would fail to launch, and the system would boot directly into the Live demo. From there, the “Install now” script would fail to run.
- Alternately, the installer would prompt for some information and then report “ubi-partman failed with exit code 10” (or something similar).
Following the steps below appears to address this problem.
CMD-Rwhile pressing the power button. Continue holding
CMD-Runtil the Recovery menu comes up. Turn off the firmware password if one exists, and reboot.
Hold down the
OPTkey while the system boots and you should be given the choice of
EFI Boot(which is the USB key). Select this, then select
Install or Try Ubuntufrom the boot menu.
Allow the system to boot into Ubuntu. If given the choice between
Install, you can attempt to Install. (If it proceeds, congratulations! It will likely fail). When it fails, it will drop into the
Livedemo mode. i.e. the Ubuntu desktop, running from the USB key.
GParted. There should be a 200 MB EFI Partition.
- Delete the EFI partition.
- Create a new 200GB FAT32 partition, and name
Boot. Apply this change.
- Format this partition as FAT32. Apply.
- Right-click on the partition and set flags. Enable the Boot flag on this partition. Apply.
Restart the machine, while holding down
OPTagain, and boot into the USB key (
If you are lucky, this will work and the installation will progress. NOTE: you may not get the choice between
Installduring boot, and the machine may boot directly into the “Live” demo. From there I was able to run the Install script, as long as the partition had been setup correctly.
When prompted for the type of installation, choose “Normal” or “Minimal” as appropriate (I was using Minimal). Make sure to check “Install third-party software for graphics and Wifi hardware”, so that the wifi drivers are installed [note: this can be done manually afterwards, but it’s much easier to do during the installation].
Follow the IST instructions for setting up
Make sure to use these exact settings!