- Prepare the OS image (zstd-compressed), have nix installed
- Edit
config.nixfile: set the correct interface for your computer. - Configure your interface a static IP specified in
config.nix, by default -192.168.10.1. - Run:
nix run ".#dhcp": dnsmasq (which serves DHCP + TFTP with ipxe),nix run ".#http": HTTP server (kernel + initrd).
- (optional) For machines without Ethernet, prepare ISO using
nix build ".#iso" -o iso-resultand create live USB drives withdd if=iso-result/iso/nixos.iso. Boot these machines with the live USB, choosing copytoram. It is safe to unplug the USB after ISO is copied to RAM, so it is easy to boot multiple machines with a single USB drive. - Netboot the rest.
- (optional) If the machine has multiple drives, you will be prompted to choose the correct output drive.
- Run
nix run ".#udp-sender" -- --file <zstd-compressed-image>and press any key after confirming that all machines connected. - Pray
- Success?
Sometimes the machines fail to acquire an IP address after booting and start listening on the loopback device.
To save time, Instead of netbooting again:
- CTRL-C the script.
- change to a different TTY (e.g. CTRL-ALT-F2).
- Confirm the IP address was successfully acquired.
- Run
image_entry.
(or maybe just add a sleep to image_entry.sh?)