From 5f8986ae86114ddfcc1ff636b48bb5a745cec1af Mon Sep 17 00:00:00 2001 From: oqyude Date: Tue, 13 Oct 2026 03:42:25 +0300 Subject: [PATCH] fix(pxe-infra): use imgfetch+boot instead of sanboot in boot.ipxe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- modules/pxe-infra/ipxe.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/pxe-infra/ipxe.nix b/modules/pxe-infra/ipxe.nix index 5173328..7cf7cfb 100644 --- a/modules/pxe-infra/ipxe.nix +++ b/modules/pxe-infra/ipxe.nix @@ -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 ''; }; }