Skip to content

Instantly share code, notes, and snippets.

@assapir
Last active March 26, 2026 08:57
Show Gist options
  • Select an option

  • Save assapir/bfb047ac1abc1d1adf112b7bdbdef2d5 to your computer and use it in GitHub Desktop.

Select an option

Save assapir/bfb047ac1abc1d1adf112b7bdbdef2d5 to your computer and use it in GitHub Desktop.
Installing Arch Linux aarch64 (drzee.net port) on Raspberry Pi 5

Installing Arch Linux aarch64 (drzee.net port) on Raspberry Pi 5

A guide to installing the unofficial Arch Linux aarch64 port from ports.archlinux.page on a Raspberry Pi 5.

This uses the drzee.net package repositories, which rebuild packages directly from upstream Arch Linux PKGBUILDs for aarch64.

Note: You need another Linux machine (or an existing ALARM install) to prepare the drive.

1. Partition the drive

# Replace /dev/sdX with your target drive (SD card or NVMe via USB adapter)
# THIS WILL ERASE EVERYTHING ON THE DRIVE

sgdisk -o \
  -n 1:0:+1G -t 1:0700 -c 1:boot \
  -n 2:0:0     -t 2:8300 -c 2:root \
  /dev/sdX

mkfs.fat -F32 /dev/sdX1
mkfs.ext4 /dev/sdX2

2. Mount

mount /dev/sdX2 /mnt
mkdir -p /mnt/boot
mount /dev/sdX1 /mnt/boot

3. Download and extract the bootstrap tarball

Check the tarballs directory for the latest version.

curl -LO https://arch-linux-repo.drzee.net/arch/tarballs/os/aarch64/archlinux-bootstrap-2026.03.15-aarch64.tar.zst
curl -LO https://arch-linux-repo.drzee.net/arch/tarballs/os/aarch64/archlinux-bootstrap-2026.03.15-aarch64.tar.zst.sig

# Verify the signature (requires the drzee signing key — see step 4)
# If you don't have it yet, import it first:
curl -sL https://arch-linux-repo.drzee.net/arch/extra/os/aarch64/public.key | gpg --import
gpg --verify archlinux-bootstrap-2026.03.15-aarch64.tar.zst.sig

# 'Good signature' is what matters here.
# If GPG also warns that the key is not certified or trusted,
# that's expected unless you've explicitly marked it as trusted
# in your personal keyring.

sudo tar xf archlinux-bootstrap-2026.03.15-aarch64.tar.zst -C /mnt --strip-components=1

The bootstrap comes with pacman.conf pre-configured to use the drzee repos (core, extra, forge).

4. Chroot and set up pacman keyring

sudo arch-chroot /mnt

pacman-key --init
pacman-key --populate archlinux

# Import the drzee package signing key
curl -sL https://arch-linux-repo.drzee.net/arch/extra/os/aarch64/public.key -o /tmp/drzee.key
pacman-key --add /tmp/drzee.key
pacman-key --lsign-key 0CF25682E6BA0751

5. Install RPi 5 packages

These are the RPi 5-specific packages from the [forge] repo:

pacman -Syu
pacman -S linux-rpi5 linux-firmware-rpi5 rpi5-eeprom raspberrypi-utils

The linux-rpi5 package will automatically generate /boot/config.txt and /boot/cmdline.txt on first install. It also installs DTBs and overlays to /boot. See the PKGBUILD and install script for details.

If mkinitcpio complains about a missing /etc/vconsole.conf during package installation, fix it with:

echo 'KEYMAP=us' > /etc/vconsole.conf
mkinitcpio -P

The initial package install may have already created /boot/vmlinuz-linux-rpi5 and /boot/initramfs-linux-rpi5.img, but it's still worth rerunning mkinitcpio -P so you know the initramfs was built cleanly.

6. Set a root password

Important: The bootstrap has root locked (root:* in /etc/shadow). You will not be able to log in without setting a password first:

passwd

7. Generate fstab and unmount

exit  # leave chroot

sudo sh -c 'genfstab -U /mnt > /mnt/etc/fstab'
sync
sudo umount -R /mnt

Insert the drive into your RPi 5 and power on. From here, follow the normal Arch installation guide for system configuration (locale, timezone, hostname, users, etc.). sync does not show a progress bar. The easiest rule is: wait for the command to return and only unplug after sudo umount -R /mnt finishes. If you want to watch writeback activity, you can run watch -n1 "grep -E 'Dirty|Writeback' /proc/meminfo" in another terminal and wait for the numbers to get close to zero.

Notes

  • In my testing on an RPi 5 with current EEPROM firmware, this booted without manually adding start4.elf or fixup4.dat.
  • 4K page size — the linux-rpi5 kernel uses 4KB pages, unlike ALARM's linux-rpi-16k which uses 16KB. This may affect performance.
  • Single mirror — all packages come from arch-linux-repo.drzee.net (AWS S3). There are no alternative mirrors.
  • ARMv8.2+ only — this will not work on RPi 4 or older boards.

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment