diff --git a/modules/pxe-infra/default.nix b/modules/pxe-infra/default.nix index ba1d99b..f0ee83c 100644 --- a/modules/pxe-infra/default.nix +++ b/modules/pxe-infra/default.nix @@ -39,6 +39,14 @@ "d ${config.pxe-infra.artifacts.root}/tftpboot 0755 root root - -" "L+ ${config.pxe-infra.artifacts.root}/tftpboot/${config.pxe-infra.bootloader.ipxeBinary} - - - - /etc/static/pxe-infra/tftpboot/${config.pxe-infra.bootloader.ipxeBinary}" "L+ ${config.pxe-infra.artifacts.root}/http/boot.ipxe - - - - /etc/static/pxe-infra/http/boot.ipxe" + # autoexec.ipxe — chains to the HTTP-served boot.ipxe. iPXE + # in UEFI mode looks for `autoexec.ipxe` on the same TFTP + # server it was loaded from. The actual file is produced by + # ipxe.nix via pkgs.writeText and dropped under + # /etc/static/pxe-infra/tftpboot/; this rule symlinks it into + # the served root. See ipxe.nix and + # .agent/notes/T10-diagnostic-2026-10-14.md. + "L+ ${config.pxe-infra.artifacts.root}/tftpboot/autoexec.ipxe - - - - /etc/static/pxe-infra/tftpboot/autoexec.ipxe" ]; }; } diff --git a/modules/pxe-infra/ipxe.nix b/modules/pxe-infra/ipxe.nix index f6614e5..83af8ee 100644 --- a/modules/pxe-infra/ipxe.nix +++ b/modules/pxe-infra/ipxe.nix @@ -56,5 +56,21 @@ initrd ''${boot-url}/initramfs-virt boot ''; + # autoexec.ipxe — iPXE on UEFI looks for `autoexec.ipxe` on the + # same TFTP server it was loaded from, and runs it as the boot + # script. Without it, the iPXE instance that replaced the + # firmware PXE ROM has nothing to chain to and ends up in + # "No more network devices" -> #GP (T10). This is a one-liner + # that bridges to the HTTP-served boot.ipxe. + # + # Discovered 2026-10-14 via the H1 reproduction in + # .agent/notes/T10-diagnostic-2026-10-14.md (pxe-infra-automation + # repo): the RIP at 0x7EC9456F was a different crash site + # than the previously-recorded 0x7EE8A5FC -- iPXE was dying + # before even reaching boot.ipxe. + environment.etc."pxe-infra/tftpboot/autoexec.ipxe".source = + pkgs.writeText "autoexec.ipxe" '''#!ipxe +chain http://${config.pxe-infra.bridge.address}/boot.ipxe +'''; }; }