Skip to content

T2 mac

This document contains the information I gained and some lessons I learned while attempting to boot my t2 macbook air with arch linux.

Motivation

Eric gave me his old macbook air with 8gb ram and an i3 intel processor.

Naturally, I wanted to add it as a node on my k3s cluster and run jobs/services on it - perhaps even my docs page!

This will be my 4th node (alongside my old m2 mac running ubuntu, gilberts pentium inspiron, and bbbs i5 inspiron). The inspirons both run arch, because they both somehow choked on linux mint. So, I opted for an extremely minimal os without a desktop environment. Arch is the natural solution here!

Obviously, there are some concerns for enterprise due to arch's rolling release model - which causes packages to always be forced to update causing some security or stability concerns. Perhaps one day I will be jaded, but for now the minimalism excites me.

Information

I had a long a arduous time installing arch on this mac. This taught me a lot and perhaps I will put in some of my learnings/mistakes, but I will try to keep it in line with what I'd need to do if I was given another t2 mac.

First, what is a t2 mac? Before the m-series chips (released in 2020), macbooks came installed with intel chips. In 2018, macbooks shipped with 2 (!) cpus, the second one being the T2 chip. The T2 chip is meant to provide increased boot security and handle some firmware/drivers for the laptop.

Process

Roughly, just follow the docs.

Bootable USB

First things first, get bootable media onto a usb.

Unfortunately for me, the mac only had 2 usb-c ports and NOTHING else. I tried booting base arch linux on my type-a usb drive and using an adapter, but the efi screen would never show it. I ended up buying a type-c usb drive.

I eventually learned that I should use a specific linux-t2 arch installation, but that can't hurt me because I don't know how to read.

Anyways, I used the following commands from my pc:

lsblk
sudo dd if=arch.iso of=/dev/sdx bs=4M status=progress oflag=sync

The lsblk command means "list block storage", giving you all block devices (storage) which includes my type-c usb drive.

The dd command - for whatever reason - does not have an official name but theories include "data dump" and "disk destroyer".

The dd command copies raw bytes from the input file (if) to the output file (of). This differs from cp and rsync because those commands operate at the linux filesystem level. The physical bytes of the file could be different depending on if your block is ext4 or btrfs.

Macos Partition

I had messed up and nuked the macos originally, but this is not good. For linux on t2 macs, you need some macos firmware to be able to use the keyboard, wifi, and other basic functions. So, I did the basic internet recovery - which took forever, but worked.

With a fresh macos installation, I now need to now leave some space for arch.

  1. In disk utility, click the macintosh hd drive nad click partition
  2. Click the + to add a partition.
  3. Format it as exfat
  4. Give 32gb for macos, the rest of the 256gb for arch.

Secure Boot

As mentioned before, the t2 chip adds some boot security. Fortunately they're pretty easy to turn off.

  1. Restart mac
  2. Hold command + r, this puts you in macos recovery
  3. In utilities menu, click startup security utility
  4. Set secure boot to no security and allow boot media to allow booting.

Installing Arch

This is pretty simple outside of the partitions.

First I needed to make another partition (one for boot, efi and the other for everything else arch related) To do that I ran

cfdisk /dev/nvme0n1

Inside I made nvme0n1p3 1GB and nvme0n1p4 roughly 200GB

Then in make manual partition I 1. mounted p3 to /boot and made it fat32 2. and p4 to / and made it ext4

Post Installation

After installing, for whatever reason chroot has functional wifi?? and keyboard?? I still don't understand why Anyways, for some reason wlan0 shows up and I can connect to internet.

From there I need to install some packages and set some flags.

  1. https://wiki.t2linux.org/distributions/arch/installation/

Result

Yeah it just kinda worked and I added it to the cluster.