Build & flash the SD โ
Single-shot from a Mac on Apple Silicon. Whole thing takes ~15 min.
What you need โ
- A Raspberry Pi Zero 2 W
- A microSD card (8GB+) labelled
pi(the bootstrap script refuses to touch any other device) - macOS with Multipass installed (
brew install multipassif not) - The
nosferatobranch of the NearTrace repo
Run โ
sh
git checkout nosferato
chmod +x infra/nosferato/bootstrap/*.sh infra/nosferato/firstboot/*.sh
infra/nosferato/bootstrap/build.shThe script:
- Verifies
/dev/disk5is the SD with labelpi. Aborts otherwise. - Spins up an arm64 Multipass VM (~2 min, only the first run).
- Inside the VM: debootstrap into a loopback ext4 image.
- Pulls Raspberry Pi firmware blobs (start.elf, fixup.dat, bcm2710-rpi-zero-2-w.dtb, kernel8.img).
- Mac side: partition the SD (256MB FAT32 + remainder).
- dd the rootfs image onto the SD's root partition.
- Mount FAT, drop config + firstboot script + firmware blobs.
- Eject.
Then โ
Slot the SD into the Pi, power it on. First boot takes ~30โ45 min (it's where systemd โ runit swap, tool install, and the nexmon build live). Don't unplug. See first boot for what to expect.