Installing qemu-user-static and binfmt-support from AUR have more trouble than it should on Arch Linux I opted on using Docker for using chroot-to-pi
https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
https://gist.github.com/htruong/7df502fb60268eeee5bca21ef3e436eb
sudo pacman -S docker
sudo systemctl start docker
FROM debian:buster-slim
WORKDIR /work
docker build -t kbeflo/chroot-to-pi .
Before continuing make sure you have already written the Raspberry Pi image to your SD card and already booted it at least once
docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb kbeflo/chroot-to-pi bash
fdisk -l
Note: Except qemu
, do not add these packages to the Dockerfile. They will not be installed properly on build
apt-get update
apt-get install -y wget qemu qemu-user-static binfmt-support
wget https://gist.githubusercontent.com/htruong/7df502fb60268eeee5bca21ef3e436eb/raw/e02726a023d57b29090dfb6485093d0f032db181/chroot-to-pi.sh
chmod +x chroot-to-pi.sh
./chroot-to-pi.sh /dev/sdX
su pi