Ubuntu on a Macbook Pro Mid 2019 (MacBookPro15,1)

Posted on 15 February 2022 in Technology

Apple's T2 Security Chip gets itself in the way as much as possible when attempting to install Linux on a Mid 2019 Macbook Pro and a lot of the available documentation for Linux-on-the-mac online is pre-T2. After quite a bit of back and forth and eventually finding the right resources I managed to get Ubuntu installed on my MacBook Pro with everything working... except the microphone.

Initial Success and Failure

Getting started with this process was a bit of a minefield. The first resource I came across was How to Install and Dual-Boot Linux and macOS, an extremely detailed and useful documentation piece with one minor caveat (that I didn't take heed of initially):

As of right now, you cannot install Linux on the internal SSD of a newer MacBook Pro or Mac Pro (2018 or later). You can still install on an external drive, however.

Despite the warning I did manage to eventually cobble together a working base Ubuntu install using Ubuntu 20.04, a bootable USB-C drive (notably: not a USB-A adapter), and rEFInd. In the end I had a functional Ubuntu installation on the same internal SSD as my macOS install but none of the peripherals (keyboard, trackpad, speakers, touchbar, wireless, etc.) worked and Ubuntu was unable to find drivers for them. This failure/success finally led me down the proper path of seeking out a T2-supported version of Linux.

Getting it Done Right (on a T2 MacBook)

This process is mostly a mashing of various guides and notes about specific conditions for the MacBook Pro Mid 2019 (MacBookPro15,1). I've cited sources throughout the text am mostly just interested in organizing this proces all in one place.

1. Create Bootable Media

A USB-C device may be necessary for this process. Using a regular USB-A device through an adapter might not be supported for bootable media.

  1. Download the zip files from the latest release of mbp-ubuntu (the livecd.zip file and any other livecd.zX files).
  2. Join the zip files together: cat livecd.z* > livecd_full.zip.
  3. And unzip them: unzip livecd_full.zip.
  4. Create a bootable device from the resulting ISO image (e.g., with a program like Etcher).

2. Prepare Your Hard Drive

  1. Open the Disk Utility application (located in /Applications/Utilities).
  2. Select the internal Apple SSD entry in the left pane.
  3. Click the Partition button.
  4. Create a new partition (not volume) of at least 32GB with "MS-DOS (Fat)" as the format. This is where Ubuntu will be installed so choose a size appropriate for what you want to do with the system. See Partition a physical disk in Disk Utility on Mac for additional guidance on this process.

If the option to add a partition is not available it may be because additional disk space is being used by snapshots. Follow the steps below to free up this space and try to create the new partition again.

  1. Open the Disk Utility application (located in /Applications/Utilities).
  2. Select the primary volume group in the left pane (probably named "Macintosh HD").
  3. Select View > Show APFS Snapshots from the menu bar.
  4. Select all the snapshots and click the delete icon (-).
  5. Return to the partition options (see above) and try again.

3. Boot the Bootable Media

  1. Boot in to macOS Recovery mode and open the Startup Security Utility (see About Startup Security Utility on a Mac with the Apple T2 Security Chip).
  2. Select "No Security" in Secure Boot.
  3. Select "Allow booting from external and removable media" in Allowed Boot Modes.
  4. Close the Startup Security Utility.
  5. Insert the bootable media created previously directly in to a USB-C port.
  6. Restart in to the Startup Disk Manager (see Change your Mac startup disk).
  7. Select and continue from the bootable media labeled "EFI Boot". There may be more than one option with the same label -- try the last first and if it does not work just repeat the previous step and try another one.
  8. When prompted select the Ubuntu Live environment and use the kernel with suffix "hwe-bigsur".

4. Install Ubuntu!

  1. In the Ubuntu Live environment click the "Install Ubuntu" application on the desktop.
  2. Set install options as desired.
  3. On the "Installation Type" step choose "Something else" and click Continue.
  4. Select the partition created previously (the current type should be "fat32" and the device should be something like /dev/nvme0n1p3). Be very careful to select the correct partition here as the next steps will erase it for the Ubuntu install.
  5. Click delete partition (-).
  6. Select the "free space" entry created by the partition removal.
  7. Click add partition (+), set the size to 1024MB, the type to "ext4" and the mount point to /boot.
  8. Select the "free space" entry again.
  9. Click add partition (+), set the size to all the remaining space, the type to "ext4" and the mount point to root (/).
  10. Select the /boot partition for "Device for bootloader installation".
  11. Continue the installation, shutting down the computer and removing the bootable media after completion.
  12. Start in to the Startup Disk Manager (see Change your Mac startup disk) again.
  13. Select the new EFI Boot option.

You should now be booted in to Ubuntu with a mostly functional system!

5. Getting Wifi Working

  1. Follow the Pre installation steps and Installation > The easy way instructions from the T2 Ubuntu Kernel repo.
  2. Follow the Setting up steps from the t2linux wiki.

6. Celebrate!

That's it! Everything (except the microphone...) should now be working in Ubuntu -- even the touchbar! The t2linux wiki also has an audio guide with some options that may get the microphone working but I was not able to get it functional from information in that guide (or anywhere else). I'll update this space if I ever do have success!

Pretty much all of the information compiled for this post stems in one way or another from the wonderful marcosfad/mbp-ubuntu repo. Pop in there and contribute to the maintainers of that repo if this guide was helpful in any way.