As of 2024-08-05 the installation instructions to install Arch Linux ARM on pi 4 doesn't work.
This is my version, with the added bonus of using btrfs instead of ext4 so you can get data checksumming, subvolumes, and compression.
If you want bcachefs flavour of these instructions click here.
- Start cfdisk to partition the drive:
cfdisk /dev/sdX
. - Create a
dos
partition table (my understanding isgpt
doesn't work at this time). - Press
New
, Partition Size512M
, pressprimary
, and set type toc W95 FAT32 (LBA)
. - Select "Free Space", and press
New
, use the suggested size which is remainder of space, pressprimary
, and type should already be set to Linux. - Press
Write
and confirm the prompt. - Create and mount the FAT filesystem:
mkfs.vfat /dev/sdX1
mkdir /mnt/sdcard-boot
mount /dev/sdX1 /mnt/sdcard-boot
- Create and mount the btrfs filesystem (you will need
btrfs-progs
):
mkfs.btrfs /dev/sdX2
mkdir /mnt/sdcard-root
mount /dev/sdX2 /mnt/sdcard-root
btrfs property set /mnt/sdcard-root compression zstd # (optional)
- Download and extract the root filesystem (as root, not via sudo):
wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-aarch64-latest.tar.gz
bsdtar -C /mnt/sdcard-root -vxpf ArchLinuxARM-rpi-aarch64-latest.tar.gz
sync
- Patch the bootloader (this deviates from the instructions); you will need
uboot-tools
-- see last post in this forum post and also this post
(nano/vim/whatever) /mnt/sdcard-root/boot/boot.txt # find the `booti` lines and change `${fdt_addr_r}` to `${fdt_addr}`
( cd /mnt/sdcard-root/boot; mkimage -A arm -T script -O linux -d boot.txt boot.scr; )
- Move boot files to the first partition:
mv /mnt/sdcard-root/boot/* /mnt/sdcard-boot/
sync
- Unmount the two partitions:
umount /mnt/sdcard-root /mnt/sdcard-boot
- Insert the SD card into the Raspberry Pi, connect ethernet, and apply 5V power.
- Use the serial console or SSH to the IP address given to the board by your router.
- Login as the default user
alarm
with the passwordalarm
. - The default
root
password isroot
.
- Initialize the pacman keyring and populate the Arch Linux ARM package signing keys:
pacman-key --init
pacman-key --populate archlinuxarm
Note: we ignore the instruction from the official Arch install of changing mmcblk0
to mmcblk1
.