fix(pxe-infra): use imgfetch+boot instead of sanboot in boot.ipxe

iPXE sanbooted the Alpine raw image and crashed with a #GP at RIP 0x7EE855FC, RAX=0xAF...AF — the AF pattern is the uninit-memory marker iPXE puts in block-device descriptors, which sanboot reads back. Splitting OVMF CODE+VARS did not change the RIP, which is in iPXE not OVMF, confirming the fault is on the iPXE side.

sanboot uses the legacy INT13 interface to present the URL as a disk; for a UEFI-only guest (B.6) the EFI firmware protocols are more direct. imgfetch downloads the (sparse, 159M actual) image into a memory block and boot invokes the EFI LoadImage/StartImage path on it, which is the same path the firmware would use for a normal disk boot. Removes the INT13 detour that was crashing.

Refs: docs/ARCHITECTURE.md section L4.
This commit is contained in:
oqyude committed 2026-10-13 03:42:25 +03:00
1 parent 55505fa1c5
commit 5f8986ae86
1 file changed
+5 -3
+5 -3
View File
@@ -39,11 +39,13 @@
environment.etc."pxe-infra/http/boot.ipxe".source = pkgs.writeText "boot.ipxe" ''
#!ipxe
set boot-url http://${config.pxe-infra.bridge.address}/latest
sanboot ''${boot-url}/alpine-worker.raw || goto retry
imgfetch ''${boot-url}/alpine-worker.raw
boot || goto retry
:retry
echo sanboot failed, retrying in 5s
echo boot failed, retrying in 5s
sleep 5
sanboot ''${boot-url}/alpine-worker.raw
imgfetch ''${boot-url}/alpine-worker.raw
boot
'';
};
}