updated ipxe configuration
Check NixOS configurations / eval-hosts (push) Failing after 6m29s

This commit is contained in:
2026-06-02 18:05:39 +10:00
parent c718010a69
commit 83abba4e25
2 changed files with 43 additions and 2 deletions
+23 -1
View File
@@ -7,7 +7,9 @@ The `pxe-boot` host serves HTTP boot assets for iPXE clients.
- Hostname: `pxe-boot`
- Web service: nginx on TCP port 80
- PXE root: `/srv/pxe`
- Generated iPXE menu: `/srv/pxe/boot/menu.ipxe`
- iPXE entry script: `/srv/pxe/boot.ipxe`
- Generated iPXE menu: `/srv/pxe/menu.ipxe`
- TFTP fallback script: `/srv/pxe/boot/autoexec.ipxe`
- Boot binaries copied from the Nix `ipxe` package:
- `/srv/pxe/boot/ipxe.efi`
- `/srv/pxe/boot/undionly.kpxe`
@@ -24,6 +26,18 @@ The host creates these directories with systemd tmpfiles:
/srv/pxe/rescue
```
The HTTP iPXE chain is:
```text
undionly.kpxe or ipxe.efi
-> autoexec.ipxe from the TFTP root, when iPXE requests it
-> http://192.168.2.247/boot.ipxe
-> http://192.168.2.247/menu.ipxe
```
The same scripts are also exposed under `/boot/` for compatibility with older
checks and any DHCP option that already points there.
The generated menu currently exposes entries for:
- NixOS installer
@@ -46,7 +60,15 @@ nix eval .#nixosConfigurations.pxe-boot.config.system.build.toplevel.drvPath --r
After deployment by an operator, basic service checks are:
```bash
curl http://pxe-boot/boot.ipxe
curl http://pxe-boot/menu.ipxe
curl http://pxe-boot/boot/menu.ipxe
curl http://pxe-boot/boot/autoexec.ipxe
curl -I http://pxe-boot/boot/ipxe.efi
curl -I http://pxe-boot/boot/undionly.kpxe
```
During a successful BIOS chainload, TFTP should deliver `undionly.kpxe` once,
then nginx should log requests for `/boot.ipxe` and `/menu.ipxe`. Repeated TFTP
downloads of `undionly.kpxe` indicate the iPXE stage is still not reaching the
HTTP chain.
+20 -1
View File
@@ -2,7 +2,22 @@
let
pxeRoot = "/srv/pxe";
pxeBaseUrl = "http://pxe-boot";
pxeBaseUrl = "http://192.168.2.247";
bootIpxe = pkgs.writeText "boot.ipxe" ''
#!ipxe
dhcp
echo Booting from PXE server...
chain ${pxeBaseUrl}/menu.ipxe
'';
autoexecIpxe = pkgs.writeText "autoexec.ipxe" ''
#!ipxe
dhcp
chain ${pxeBaseUrl}/boot.ipxe
'';
menuIpxe = pkgs.writeText "menu.ipxe" ''
#!ipxe
@@ -78,6 +93,10 @@ in
"d ${pxeRoot}/nixos 0755 root root -"
"d ${pxeRoot}/ubuntu 0755 root root -"
"d ${pxeRoot}/rescue 0755 root root -"
"C+ ${pxeRoot}/boot.ipxe 0644 root root - ${bootIpxe}"
"C+ ${pxeRoot}/menu.ipxe 0644 root root - ${menuIpxe}"
"C+ ${pxeRoot}/boot/autoexec.ipxe 0644 root root - ${autoexecIpxe}"
"C+ ${pxeRoot}/boot/boot.ipxe 0644 root root - ${bootIpxe}"
"C+ ${pxeRoot}/boot/menu.ipxe 0644 root root - ${menuIpxe}"
"C+ ${pxeRoot}/boot/ipxe.efi 0644 root root - ${pkgs.ipxe}/ipxe.efi"
"C+ ${pxeRoot}/boot/undionly.kpxe 0644 root root - ${pkgs.ipxe}/undionly.kpxe"