Install Arch Linux ARM for Raspberry Pi (aarch64) using a cross-arch pacstrap
$ bin/setupenv.sh
$ bin/build.sh
The image and root SSH key will be created in build/
$ sudo arch-chroot /mnt
$ bin/teardown.sh
Check with lsblk
that the mounts and loop device are deactivated.
Edit bin/write-usb.sh
and set DEVICE
to the USB block device you want to write to.
Run the script to write the image and expand the root partition:
$ bin/write-usb.sh
Insert the USB into the Raspberry Pi and connect ethernet and power.
The Pi will connect using DHCP and be available via mDNS. (.local)
The SSH server will be running and you may connect using the ssh key generated during the build.
$ ssh -i build/arch-key [email protected]
Create a user in the wheel group. This makes them a sudoer.
$ useradd -mG wheel <USER>
$ passwd <USER>
The dotfiles in /etc/skel will be copied into the user's home directory.
There are many things to do with a Raspberry Pi running Arch Linux ARM. I hope you have fun.
You can compress the image for distribution with the following:
$ sudo xz build/arch-arm.img --keep --verbose -T 0