Appendix: BOOMSTICK
Reinstalling Linux on a headless PC or a Raspberry Pi with the
official installer is a tedious affair. Before the target machine
will accept a remote login, there is a handful of chores to be done
by hand, every single time: write the ISO to a stick, borrow a
monitor and keyboard, type a WiFi passphrase into iwctl, set a root
password or paste in an authorized key, get onto the same network as
the target, and clear the machine’s stale entry out of
known_hosts.
BOOMSTICK does all of those chores for you, once, at your desk. You write the image to a USB stick, drop your WiFi, WireGuard and SSH settings onto it, and from then on you plug it in, power on, and SSH in from wherever you are. It is what the rest of this book assumes you booted the target machine from.
What’s on the stick
BOOMSTICK is the stock Arch Linux installer – archiso’s releng
profile – with a few additions layered on top:
- WiFi, optionally: iwd joins your networks automatically, with wired ethernet preferred when both are available.
- WireGuard, optionally:
wg-quick@wg0brings up a tunnel to your own server at boot, retrying until the endpoint’s DNS name resolves, so the stick has the same address on any network. - SSH: sshd lets you in as root with your
authorized_keys, which is the one thing you must supply. Password login is never permitted. - A stable identity: the hostname is always
arch-iso, and the stick generates its SSH host keys on first boot and keeps them. - A boot webhook, optionally, which notifies you (via ntfy, for example) with the stick’s LAN, public and WireGuard addresses once it is up.
One image boots both x86_64 PCs (UEFI only) and the Raspberry Pi 5, so a single stick in your bag covers every machine in this book.
The image is generic; the stick is yours
The image itself contains no secrets, so you can build it once, and
so can anyone else. Your WiFi passwords, WireGuard key, SSH keys and
webhook URL go into an archiso-config/ directory on the stick’s
FAT32 partition, which you fill in after writing the image. That
partition is readable from any computer, so you edit those files with
whatever editor you like, and the live system reads them again on
every boot.
The secrets on the stick are stored in plain text, readable by any computer it is plugged into. Anyone holding it can join your WiFi and your VPN. Keep it in your possession, and give each stick its own WireGuard key so that you can revoke a lost one without touching the others.
The rest of this appendix goes through it in order, beginning with Build the image.