Linux on Intel MacBook Air


Why?
I have two old MacBook Airs that my kids don't use any longer. The supported version of MacOS was too old to run many Mac-native apps. I thought I would bring the Macs back to life with Linux.
What?
- A MacBook new enough to turn off Secure Boot in Recovery Mode. I could do this on my 2018 A1932 MacBook Air but not on my 2014 A1466 MacBook Air
- The instructions and scripts from this site: https://github.com/t2linux/T2-Mint and/or this site: https://t2linux.org/ (I just found the second site after I finished).
- A USB stick
- A MacOS or Linux machine that can write an ISO to a USB stick
How?
Create the Custom Linux ISO
- Grab the iso.sh from here (If your machine is running MacOS or Linux). A regular Linux ISO will boot and install, but the keyboard and touchpad will not work. The custom ISO built by iso.sh will include the keyboard and touchpad drivers. Yay.
- Run the iso.sh
$ bash iso.sh
Choose the flavour of Ubuntu you wish to install:
1. Ubuntu
2. Kubuntu
3. Ubuntu Unity
Type your choice (1, 2 etc.) from the above list and press return.
2
Choose the version of Ubuntu you wish to install:
1. 24.04 LTS - Noble Numbat
2. 25.04 - Plucky Puffin
Type your choice (1 or 2) from the above list and press return.
1
Downloading Part 1 for Kubuntu 24.04 LTS - Noble Numbat
#########[snip]############################# 100.0%
Downloading Part 2 for Kubuntu 24.04 LTS - Noble Numbat
#########[snip]############################# 100.0%
Downloading Part 3 for Kubuntu 24.04 LTS - Noble Numbat
#########[snip]############################# 100.0%
Verifying sha256 checksums
ISO saved to Downloads
$ ls -lh *.iso
-rw-rw-r-- 4.5G kubuntu-24.04-6.14.4-t2-noble.iso
Burn the ISO to a USB Stick
(Plug in your USB stick and find its device name with "lsblk"
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
[snip]
sda 8:0 1 58.6G 0 disk
nvme0n1 259:0 0 465.9G 0 disk
├─nvme0n1p1 259:1 0 300M 0 part /boot/efi
└─nvme0n1p2 259:2 0 465.6G 0 part /
(Burn the ISO to the USB device)
$ sudo dd bs=4M if=./kubuntu-24.04-6.14.4-t2-noble.iso of=/dev/sda status=progress oflag=sync
4441767936 bytes (4.4 GB, 4.1 GiB) copied, 158 s, 28.1 MB/s
1064+1 records in
1064+1 records out
Disable Secure Boot
Apple's Secure Boot implementation does not allow booting anything other than macOS or Windows when it is enabled (not even shim signed GRUB). We need to disable it:
- Turn off your Mac
- Turn it on and press and hold
Command-R
until the black screen flashes - Your Mac will boot in the macOS Recovery
- Select your user and enter your password
- Now, from the menu bar choose Utilities > Startup Security Utility
- Enter again the password
- Once in Startup Security Utility:
- set Secure Boot to No Security
- set Allow Boot Media to Allow booting from external or removable media
Now you are able to boot from a Linux install ISO.
Install Linux
- Insert the USB stick into the MacBook with the MacBook turned off
- Turn on the MacBook and press the option key
- Select "EFI Boot"
- Launch Ubuntu Live from the USB stick
- Install Ubuntu
- Shutdown and remove the USB Drive.
- Boot the MacBook to Linux
Install the WiFi Drivers
The custom ISO does not include the Broadcom drivers for the built-in WiFi. You can add the drivers from the Internet or via sneakernet.
Internet Method: I cheated and used a USB WiFi adapter supported by Linux to run the command "get-apple-firmware" and chose the option "Retrieve the firmware directly from macOS". This downloads the firmware from Apple.
$ get-apple-firmware
Detected Linux
How do you want to copy the firmware to Linux?
1. Retrieve the firmware from the EFI partition.
2. Retrieve the firmware directly from macOS.
3. Download a macOS Recovery Image from Apple and extract the firmware from there.
Note: If you are choosing Option 1, then make sure you have run the same script on macOS before and chose Option 1 (Copy the firmware to the EFI partition and run the same script on Linux to retrieve it) there.
3
Checking for missing dependencies
Downloading macOS Recovery Image
Note: In order to get complete firmware files, download macOS Monterey, Ventura or Sonoma.
1. High Sierra (10.13)
2. Mojave (10.14)
3. Catalina (10.15)
4. Big Sur (11.7)
5. Monterey (12.6)
6. Ventura (13)
7. Sonoma (14) - RECOMMENDED
8. Sequoia (15)
Choose a product to download (1-8): 7
Downloading 696-08090...
Saving http://oscdn.apple.com/content/downloads/11/58/062-53943/of12aseueo2jnehp03qh5g3o17lx4139t1/RecoveryImage/BaseSystem.chunklist to ./BaseSystem.chunklist...
0.0/0.0 MB |=============================================| 100.0% downloaded
Download complete!
Saving http://oscdn.apple.com/content/downloads/11/58/062-53943/of12aseueo2jnehp03qh5g3o17lx4139t1/RecoveryImage/BaseSystem.dmg to ./BaseSystem.dmg...
753.0/753.0 MB |=============================================| 100.0% downloaded
Download complete!
Verifying image with chunklist...
Chunk 76 (3136598 bytes)
Image verification complete!
Converting image from .dmg to .img
Mounting image
Getting firmware
Reloading Wi-Fi and Bluetooth drivers
Cleaning up
Done!
Sneakernet Method: If you do not have access to a Linux-supported USB WiFi adapter, this following page has instructions on how to move the WiFi firmware from MacOS to Linux. I recommend Method 2. https://wiki.t2linux.org/guides/wifi-bluetooth/#__tabbed_1_2
(On a Mac running MacOS)
$ wget https://wiki.t2linux.org/tools/firmware.sh
$ bash firmware.sh
Detected macOS
How do you want to copy the firmware to Linux?
1. Copy the firmware to the EFI partition and run the same script on Linux to retrieve it.
2. Create a tarball of the firmware and extract it to Linux.
3. Create a Linux specific package which can be installed using a package manager.
Note: Option 2 and 3 require additional software like python3 and tools specific for your package manager. Requirements will be told as you proceed further.
2
Checking for missing dependencies
Creating a tarball of the firmware
Firmware tarball saved to Downloads!
Extract the tarball contents to /lib/firmware/brcm in Linux and run the following in the Linux terminal:
sudo modprobe -r brcmfmac_wcc
sudo modprobe -r brcmfmac
sudo modprobe brcmfmac
sudo modprobe -r hci_bcm4377
sudo modprobe hci_bcm4377
$ ls -lh firmware.tar
Permissions Size User Date Modified Name
.rw-r--r--@ 12M faucherd 10 Jul 11:24 firmware.tar
(Copy firmware.tar to a USB stick to transfer to Linux Mac)
(On your new Linux Mac)
(Insert USB stick with firmware.tar into your Linux Mac)
$ sudo tar -v -xC /lib/firmware/brcm -f /path/to/firmware.tar
(Load the new WiFi drivers)
sudo modprobe -r brcmfmac_wcc
sudo modprobe -r brcmfmac
sudo modprobe brcmfmac
sudo modprobe -r hci_bcm4377
sudo modprobe hci_bcm4377
Suspend Mode
Suspend mode is not yet supported. I adjusted to this by setting my MacBook Air to never go to sleep on battery nor on wall power. I also set the "When lid is closed" setting to "Do nothing". When I am going to be away from power for longer than a few hours, I shut down Linux.

Fun Stuff
I installed the KDE Plasma Theme "Apple-Ventura-Dark" which changed the window decorations, icons, and start button to mimic MacOS. https://store.kde.org/p/1886187/

Thank You
Thanks for taking the time to read this post. I hope this helps you give new life to an old Mac. I welcome your feedback.