Skip to content

samariezas/nixcast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nixcast

Usage

  1. Prepare the OS image (zstd-compressed), have nix installed
  2. Edit config.nix file: set the correct interface for your computer.
  3. Configure your interface a static IP specified in config.nix, by default - 192.168.10.1.
  4. Run:
  • nix run ".#dhcp": dnsmasq (which serves DHCP + TFTP with ipxe),
  • nix run ".#http": HTTP server (kernel + initrd).
  1. (optional) For machines without Ethernet, prepare ISO using nix build ".#iso" -o iso-result and create live USB drives with dd 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.
  2. Netboot the rest.
  3. (optional) If the machine has multiple drives, you will be prompted to choose the correct output drive.
  4. Run nix run ".#udp-sender" -- --file <zstd-compressed-image> and press any key after confirming that all machines connected.
  5. Pray
  6. Success?

Troubleshooting

DHCP race condition after netbooting

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:

  1. CTRL-C the script.
  2. change to a different TTY (e.g. CTRL-ALT-F2).
  3. Confirm the IP address was successfully acquired.
  4. Run image_entry.

(or maybe just add a sleep to image_entry.sh?)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors