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?

apple-mac-mini-2011-back

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.

Hardware specs:

Creating the bootable USB Key

  1. Download an image for Ubuntu Desktop. I downloaded Ubuntu 22.04.1 LTS (x86), since it was the most recent LTS at the time.
  2. Create a bootable USB key from the image. I used balenaEtcher.
  3. Insert the USB key while the machine is powered off. While holding down the OPT key, 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 Ubuntu from 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:

Following the steps below appears to address this problem.

Installation Steps

  1. Hold down CMD-R while pressing the power button. Continue holding CMD-R until the Recovery menu comes up. Turn off the firmware password if one exists, and reboot.

  2. Hold down the OPT key 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 Ubuntu from the boot menu.

  3. Allow the system to boot into Ubuntu. If given the choice between Live and Install, you can attempt to Install. (If it proceeds, congratulations! It will likely fail). When it fails, it will drop into the Live demo mode. i.e. the Ubuntu desktop, running from the USB key.

  4. Run GParted. There should be a 200 MB EFI Partition.

    1. Delete the EFI partition.
    2. Create a new 200GB FAT32 partition, and name Boot. Apply this change.
    3. Format this partition as FAT32. Apply.
    4. Right-click on the partition and set flags. Enable the Boot flag on this partition. Apply.
  5. Restart the machine, while holding down OPT again, and boot into the USB key (EFI -> Install).

    If you are lucky, this will work and the installation will progress. NOTE: you may not get the choice between Live and Install during 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.

  6. 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].

Configuring WiFi

Follow the IST instructions for setting up eduroam.

Make sure to use these exact settings!

eduroam