I was able to easily pxe boot using a computer already running NixOS, docker and pixiecore. Note It needs some RAM. A VM with 1GB wasn’t enough.
cd nigxpkgs
git checkout release-18.09
nix-build -A netboot.x86_64-linux nixos/release.nix
# figure out the "init" param using:
cat result/netboot.ipxe
# start the pxe server
docker run --rm \
-v /etc/ssl/certs:/etc/ssl/certs:ro \
-v /nix/store:/nix/store:ro \
-v $(pwd)/result:/image \
--net=host \
pixiecore/pixiecore:master boot \
/image/bzImage /image/initrd \
--cmdline "init=/nix/store/zl3gqcymdwphxm4ksdw5fd302mvr6a19-nixos-system-nixos-18.09beta-20598.gfedcba/init loglevel=4" \
-d --dhcp-no-bind --port 9100 --status-port 9100
-d --dhcp-no-bind --port 9100 --status-port 9100
Is probably not needed.
Note: You need to allow some ports in your firewall:
- UDP: 67 and 69
- TCP: 9100 (like in my case)