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 bcachefs instead of ext4 so you can get data checksumming, subvolumes, and compression.
- 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 bcachefs filesystem (you will need
bcachefs-tools
):
bcachefs format --compression=zstd /dev/sdX2
mkdir /mnt/sdcard-root
mount /dev/sdX2 /mnt/sdcard-root
- 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
- Chroot into the filesystem and update to get the latest kernel which supports bcachefs
mount --bind /dev /mnt/sdcard-root/dev
mount --bind /sys /mnt/sdcard-root/sys
mount --bind /proc /mnt/sdcard-root/proc
mount --bind /run /mnt/sdcard-root/run
chroot /mnt/sdcard-root
pacman-key --init
pacman-key --populate archlinuxarm
pacman -Syu
exit
umount /mnt/sdcard-root/{dev,run,sys,proc}
- 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
.
Note: we ignore the instruction from the official Arch install of changing mmcblk0
to mmcblk1
.