Install ubuntu 18.04 on mac mini 2018

Solution 1:

After struggling with this for many hours I thought I'd provide an updated write-up for installing Ubuntu 20.04 on a Mac mini 2018 running macOS Catalina.

The most important sources turned out to be a great answer here that also covers installing Windows, but lacks information about installing on newer Macs with a T2 chip. Another source is this Reddit post which, however, is more complicated than necessary IMO. So here goes:

Preparations

For the installation, you're going to need a bootable USB stick and a partition on your Mac's internal drive or an external drive where the final installation shall reside.

  1. Follow the instructions in the link above for creating the boot stick.
  2. For the Linux partition, open Disk Utility, select the hard drive where you want to install Ubuntu and click "Partition". You are going to need at least 25 GB - I chose to allocate 50 GB which is enough for my use case.
  3. Select your new partition and click "Erase". Choose some name like "UBUNTU", Format "MS-DOS (FAT)" and Scheme "GUID Partition Map".

Boot and Install Ubuntu

  1. Disable the T2 Boot Security: Reboot and hold Command+R. Start the "Startup Security Utility". Select "No Security" and "Allow Booting from External Drive".
  2. Reboot your Mac and hold the Option key while it is starting. Select the "EFI Drive" - that is the boot stick you just created. You're presented with various options of which you'll choose the first one "Ubuntu".
  3. In the dialog that will appear, select "Try Ubuntu" to enter a live session.
  4. Now comes the part that took me forever to figure out: launch the Ubuntu installer via terminal with the command ubiquity -b. This way the installer won't try to install the GRUB boot manager which always failed for me. A warning will appear, that deprecated modules are being used. This seems to be due to ubiquity's implementation and can be ignored. Just wait for the installer window to appear and then proceed (this can take a few seconds).
  5. When asked where to install, select "Something Different". Highlight the previously created partition (the 50 GB one in my case) and click "Change". Select ext4 formatting, click the checkbox that you want the partition to be formatted and enter "/" (without quotes) as "Mount point".
  6. If you're on an external drive, be sure to select the right partition in the drop down menu (not just the drive). Then continue the installation.

Install rEFInd

Installing Ubuntu without its boot manager GRUB means that you cannot easily start it by holding Option when booting your Mac. That's why you'll install rEFInd which replaces the default boot manager of your Mac.

  1. Enter your Mac's recovery options by restaring and holding command+R. There, open a terminal and execute csrutil disable. Do not forget turning this back on again later!
  2. Boot back into macOS by restarting. You may have to hold Option and select your Macintosh-HD drive.
  3. Download from the link above.
  4. Open a new Terminal, drag "refind-install" into your terminal window and execute it by pressing Enter.
  5. Now you repeat step 1, this time typing csrutilenable.

Done

Everything should work fine now. When you turn on your Mac, you're presented with the rEFInd screen where you can select which OS to boot. Have fun!

Notes

  • It seems some driver issues that previously existed (e.g. Bluetooth, affecting Magic Keyboard & Mouse) have been sorted out in the latest version of Ubuntu. One problem I did encounter was that scrolling on my Magic Mouse 2 didn't work. For that, consult this post.
  • As noted by David Anderson (see comments below), it is important to install Ubuntu first and rEFInd second.

Solution 2:

I successfully installed 19.04 on the Mac Mini 2018. Had to add kernel params noapic efi=noruntime to USB Live Media to boot into live mode. Then I installed it onto an external USB-C drive and also added the aforementioned params to the GRUB config.

Now I can boot Ubuntu 19.04 from the external USB-C drive, but without some drivers (e.g. bluetooth and audio are not working).