20 lines
529 B
Bash
20 lines
529 B
Bash
#!/usr/bin/env bash -e
|
|
|
|
nix-build --out-link /tmp/netboot ./ipxe.nix
|
|
|
|
n=$(realpath /tmp/netboot)
|
|
init=$(grep -ohP 'init=\S+' $n/netboot.ipxe)
|
|
|
|
# Start the PXE server.
|
|
# These ports need to be open in your firewall:
|
|
# UDP: 67, 69
|
|
# TCP: 64172
|
|
docker run --rm \
|
|
-v /etc/ssl/certs:/etc/ssl/certs:ro \
|
|
-v /nix/store:/nix/store:ro \
|
|
--net=host \
|
|
pixiecore/pixiecore:master \
|
|
boot $n/bzImage $n/initrd \
|
|
--cmdline "$init loglevel=4" \
|
|
-d --dhcp-no-bind --port 64172 --status-port 64172
|