Installing Gentoo Linux on a T2 Mac¶
Install Procedure¶
-
Follow the Pre-installation steps.
- Since there is not yet a T2 Gentoo Installation ISO, you will need to use a different ISO. We recommend the T2-Ubuntu ISO if you want a graphical environment, or the T2-Archiso if you don't want to have to copy Wi-Fi firmware to the livecd.
- If you chose the Ubuntu ISO, follow the Wi-Fi Guide once booted.
-
Connect to the internet using NetworkManager in the Ubuntu ISO, or using
iwctl
in the Arch ISO. -
You will need to reformat your partitions, except for the EFI partition. The other partitions will need to reformatted as described in the Gentoo Handbook. For 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. -
Follow the Gentoo Handbook from Installing stage3 until Kernel Configuration and Compilation.
-
Setup the T2 Gentoo overlay:
-
Install
dev-vcs/git
andapp-eselect/eselect-repository
, then enable and sync the overlay:
-
-
Install the T2 Gentoo kernel:
-
The T2 overlay provides a Distribution Kernel for T2 Macs. To install it, run
emerge -av sys-kernel/t2gentoo-kernel
. -
Alternatively, you can use the kernel sources and manually compile. With this method, the update process is not automated, and manual configuration is necessary. However,
sys-kernel/t2gentoo-sources
tends to get new kernel versions faster thensys-kernel/t2gentoo-kernel
. To install it, run:emerge -av sys-kernel/t2gentoo-sources
. After installing the kernel sources, runeselect kernel set 1
to point/usr/src/linux
to the correct path, then follow the directions in the Manual Configuration section of the handbook. If you decide to manually configure your kernel, make sure the following options are set:CONFIG_APPLE_BCE=m CONFIG_APPLE_GMUX=m CONFIG_IRQ_REMAP=y CONFIG_HID_APPLE_IBRIDGE=m CONFIG_HID_APPLE=m CONFIG_HID_APPLE_MAGIC_BACKLIGHT=m CONFIG_HID_APPLE_TOUCHBAR=m CONFIG_HID_SENSOR_ALS=m CONFIG_SND_PCM=m # For WiFi CONFIG_BRCMFMAC=m # For Bluetooth CONFIG_BT_BCM=m CONFIG_BT_HCIBCM4377=m CONFIG_BT_HCIUART_BCM=y CONFIG_BT_HCIUART=m
-
-
Install Wi-Fi firmware for T2 Macs:
-
The T2 overlay provides a package for T2 Wi-Fi firmware. To install it, run:
-
-
Follow the Gentoo Handbook from Configuring the System up to Configuring the bootloader
-
Install the bootloader:
- Choose a bootloader (other than LILO) from the Configuring the bootloader section of the Gentoo Handbook.
- Add
intel_iommu=on iommu=pt pcie_ports=compat
to the kernel parameters. Refer to the Gentoo Wiki article for your bootloader of choice for instructions on how to do this.
-
Exit the
chroot
(Control-d, orexit
) and reboot. You should now be able to select Gentoo from the macOS startup manager by holding option at boot. Congratulations, you should now have a working Gentoo installation! For your next steps, read through the rest of the Gentoo Handbook and consider installing a desktop environment such as GNOME, KDE, or Xfce.