/raspberry-pi-netboot

Packer template for a diskless Raspberry Pi setup over iSCSI

Primary LanguageShell

raspberry-pi-netboot - Boot your Pi off iSCSI

raspberry-pi-netboot is a Packer template for building diskless Raspberry Pi images. It's meant to be run on an ARM machine, because this is a personal project and I happen to have one. This repository also has no license because I used a lot of blog posts to put it together, so do what you want with it.

Special thanks to the following blog posts for inspiration:

Getting started

To build an image, place a .pkrvars.hcl file for an image in configs/ and run make images. Images will be written to images/<hostname>.img, where <hostname> is the value of the hostname Packer template variable.

If you don't have an ARM machine to build on and want to make use of binfmt_misc functionality in the Packer builder, edit the Makefile to remove the DONT_SETUP_QEMU environment variable declaration.

Use the scripts in scripts/ to configure the machine.

Notes

This template and the associated scripts make some specific assumptions about the deployment environment. In particular, it assumes:

  • Each machine is a Raspberry Pi 4
  • Individual machines get network information from a DHCP server instead of using static IPs
  • The TFTP server is running on the same subnet as the Raspberry Pi (this is a requirement of Raspberry Pi network booting, which uses ARP to find the server)
  • The DHCP server advertises the location of the TFTP server using DHCP option 66