Skip to content

Instantly share code, notes, and snippets.

@kad
Last active March 21, 2025 17:06
Show Gist options
  • Select an option

  • Save kad/85a778e0b63fb023defa7887b4521179 to your computer and use it in GitHub Desktop.

Select an option

Save kad/85a778e0b63fb023defa7887b4521179 to your computer and use it in GitHub Desktop.
Create ArchLinux ARM bootstrap image for RPi
#!/bin/bash
mkdir aarch64
mount --bind aarch64 aarch64
pacstrap -c -K -M aarch64 base archlinuxarm-keyring dhcpcd \
net-tools openssh vi which \
firmware-raspberrypi linux-rpi \
iw ldns less openresolv \
wireless-regdb wireless_tools wpa_supplicant
arch-chroot aarch64 sh -c "systemctl enable systemd-networkd"
arch-chroot aarch64 sh -c "systemctl enable systemd-resolved"
arch-chroot aarch64 sh -c "systemctl enable systemd-timesyncd"
arch-chroot aarch64 sh -c "systemctl enable sshd"
arch-chroot aarch64 sh -c "useradd alarm -G wheel -m"
arch-chroot aarch64 sh -c "echo "root" | passwd -s root"
arch-chroot aarch64 sh -c "echo "alarm" | passwd -s alarm"
arch-chroot aarch64 sh -c "echo "alarm" > /etc/hostname"
rm -rf aarch64/etc/pacman.d/gnupg
rm -rf aarch64/etc/machine-id
umount aarch64
@hkfuertes
Copy link

Wow! Magic! Thank you!!! several days wasted to make wifi work on the pi02w and pi3!

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