Installing Arch Linux on a Mac with the T2 Chip¶
Hint
If you wish to use archinstall, there is a profile based on this guide which can be found on https://github.com/Redecorating/archinstall-mbp
You will need:
- USB drive with at least 1GB
- A way to plug it into your Mac (USB-C isn't USB-A)
- A wired internet connection (i.e. USB-C to Enternet dongle) or wifi. If you need to install via wifi, you may use this iso, which has everything needed to follow this guide and use wifi in the live environment. (There's some difference in installation process with this iso which will be described later on) It's also possible to perform an offline installation, see this (retrieve the packages from an Arch virtual machine or Docker container)
-
Making a partition for Linux.
- Open the Bootcamp installer and follow it until it asks for a Windows ISO, this will clear space for a Linux partition (by removing APFS snapshots).
- In macOS Disk Utility, make a partition, format doesn't matter, but pick the amount of space that you want for Linux. You won't be able to resize your APFS partitions from the installer, so you must make space now.
-
Creating bootable media
-
Disabling secure boot
- Follow this article's instructions.
- Once in startup security utility, turn secure boot to no security and enable external boot.
-
Booting the live environment.
- Plug the USB in to your computer.
- Boot while holding the option key, this will put you in macOS Startup Manager.
- Select the orange EFI option with arrow keys and press return/enter on it.
-
Follow the Arch Wiki guide from here up to "Format the partitions".
- The note on the Arch Wiki mentions the EFI system partition, there will be one at
/dev/nvme0n1p1
and you can use this if you don't intend to install Windows or already have it installed. If you do intend to triple boot, refer to this guide. - Mount the EFI partition that you intend to use for your bootloader on
/mnt/boot/efi
, and your other partitions on/mnt
, etc.
- The note on the Arch Wiki mentions the EFI system partition, there will be one at
-
Continue following the Arch Wiki's guide until "Install essential packages".
-
Getting the signing key:
- Run
curl -o key.asc https://dl.t2linux.org/archlinux/key.asc
to obtain the signing key for t2 linux specific packages. - If you're using wifi-enabled iso, don't run the above command and jump straight to d.
- Run
-
Add the key to pacman using
pacman-key --add key.asc
andpacman-key --lsign 7F9B8FC29F78B339
to allow the key -
Update your pacman repositories with
pacman -Syy
Note
If this command errors you are either not using the correct iso (see step 3) or don't have internet (see "You will need" at the top of this document)
-
Getting the required packages:
- Install the required packages into your new system with:
pacstrap /mnt base linux-mbp linux-mbp-headers apple-bce-dkms-git dkms linux-firmware grub efibootmgr
(omit thegrub efibootmgr
packages from this if you intend to use systemd-boot as your bootloader). - If you're using wifi-enabled iso, install the required packages into your new system with:
pacstrap /mnt base linux-t2 linux-t2-headers linux-t2-docs apple-bcm-wifi-firmware dkms linux-firmware iwd grub efibootmgr
(omit thegrub efibootmgr
packages from this if you intend to use systemd-boot as your bootloader).
- Install the required packages into your new system with:
-
Continue following the Arch Wiki's guide until you get to installing a bootloader.
-
-
In your
chroot
, unless you're using aforementioned wifi-enabled iso, install the DKMS modules for Keyboard, Trackpad, Audio and the Touchbar with this guide. Follow the Audio Config Guide too. If you're using wifi-enabled iso, only follow Audio Config Guide and jump straight to 10 and skip step 12. - Add Aunali1's repository to
/etc/pacman.conf
, by adding this:
[mbp]
Server = https://dl.t2linux.org/archlinux/$repo/$arch
-
Install a bootloader, probably Grub, but you can also use systemd-boot. Don't do both.
-
Installing Grub:
- Edit
/etc/default/grub
, you'll need to install a text editor (i.e.vim
ornano
) withpacman -S PACKAGE_NAME
for this step. - On the line with
GRUB_CMDLINE_LINUX="quiet splash"
, add the following kernel parameters:intel_iommu=on iommu=pt pcie_ports=compat
- Run
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --no-nvram --removable
. grub-mkconfig -o /boot/grub/grub.cfg
- Edit
-
Installing systemd-boot:
bootctl --path=/boot/efi --no-variables install
- You may need to mask the
systemd-boot-system-token
service, as it writes to nvram and can cause panics at boot:systemctl mask systemd-boot-system-token
. - Install a text editor (i.e.
pacman -S vim
orpacman -S nano
), and make the following edit for both/boot/efi/loader/entries/arch.conf
and/boot/efi/loader/entries/arch-fallback.conf
. - Add
intel_iommu=on iommu=pt pcie_ports=compat
to theoptions
line to add those kernel parameters.
-
-
Make nvram/efivars automatically remount as readonly, as writing to them causes a panic (deleting and reading variables, however, does not):
echo efivarfs /sys/firmware/efi/efivars efivarfs ro,remount,nofail 0 0 >> /etc/fstab
. If this doesn't work, you can instead add theefi=noruntime
kernel parameter as described when installing your bootloader (but don't use both of these fixes at the same time). - You can follow the Wi-Fi guide after rebooting into your install, if Wi-Fi isn't working after the install.
- You now will be able to select your Arch install in the macOS Startup Manager by holding option at boot.