Fix PXE netboot installer hanging at boot (ISO/netboot module conflict) #30

Merged
beatzaplenty merged 1 commits from worktree-fix-pxe-netboot-hang into main 2026-07-21 22:20:04 +00:00
Owner

Summary

The netboot build (.#pxe, served by pxe-boot) composed ./modules/installer/iso.nix (pulls in nixpkgs installation-cd-minimal.nix) together with nixpkgs own netboot-minimal.nix. Both installation-cd-base.nix and netboot.nix set fileSystems."/" via the identical lib.mkImageMediaOverride (mkOverride 60) priority - genuinely conflicting root-filesystem strategies (ISO-by-label vs. netboot-tmpfs) at the same priority, and the ISO one was winning at runtime. Every PXE-booted client hung indefinitely waiting for a device that can never exist outside a real CD/USB:

A start job is running for /dev/disk/by-label/nixos-minimal-26.05-x86_64

Fix: the netboot build now imports ./modules/installer/common.nix directly instead of iso.nix, dropping the ISO module (and its conflicting fileSystems override) from the composition entirely. netboot-minimal.nixs own chain (netboot-base.nix) already imports profiles/installation-device.nix independently, so common.nixs initialHashedPassword override still applies correctly.

Test plan

  • Deployed a scratch lxc-pxe-boot on pve-test (sandbox node), pulled its built kernel/initrd, booted directly with QEMU (-kernel/-initrd, exact append line from the generated netboot.ipxe) - reproduced the hang live with full console capture before the fix.
  • Applied the fix, rebuilt .#pxe fresh, repeated the same QEMU boot - full boot to a working shell (nixos@nixos:~$) with SSH up, no hang.
  • bash scripts/codex-maintenance.sh - clean (fmt/statix pass, every host/package still evaluates - this file affects shared config so it fell back to full-tree evaluation).
  • Scratch lxc-pxe-boot container torn down on pve-test after testing.

Generated with Claude Code

## Summary The netboot build (`.#pxe`, served by `pxe-boot`) composed `./modules/installer/iso.nix` (pulls in nixpkgs `installation-cd-minimal.nix`) together with nixpkgs own `netboot-minimal.nix`. Both `installation-cd-base.nix` and `netboot.nix` set `fileSystems."/"` via the identical `lib.mkImageMediaOverride` (`mkOverride 60`) priority - genuinely conflicting root-filesystem strategies (ISO-by-label vs. netboot-tmpfs) at the same priority, and the ISO one was winning at runtime. Every PXE-booted client hung indefinitely waiting for a device that can never exist outside a real CD/USB: ``` A start job is running for /dev/disk/by-label/nixos-minimal-26.05-x86_64 ``` Fix: the netboot build now imports `./modules/installer/common.nix` directly instead of `iso.nix`, dropping the ISO module (and its conflicting fileSystems override) from the composition entirely. `netboot-minimal.nix`s own chain (`netboot-base.nix`) already imports `profiles/installation-device.nix` independently, so `common.nix`s `initialHashedPassword` override still applies correctly. ## Test plan - [x] Deployed a scratch `lxc-pxe-boot` on `pve-test` (sandbox node), pulled its built kernel/initrd, booted directly with QEMU (`-kernel`/`-initrd`, exact append line from the generated `netboot.ipxe`) - reproduced the hang live with full console capture before the fix. - [x] Applied the fix, rebuilt `.#pxe` fresh, repeated the same QEMU boot - full boot to a working shell (`nixos@nixos:~$`) with SSH up, no hang. - [x] `bash scripts/codex-maintenance.sh` - clean (fmt/statix pass, every host/package still evaluates - this file affects shared config so it fell back to full-tree evaluation). - [x] Scratch `lxc-pxe-boot` container torn down on `pve-test` after testing. Generated with Claude Code
beatzaplenty added 1 commit 2026-07-21 22:16:01 +00:00
Fix PXE netboot installer hanging at boot (ISO/netboot module conflict)
Check NixOS configurations / eval-hosts (pull_request) Successful in 11m1s
453c7b5513
The netboot build composed ./modules/installer/iso.nix (which pulls in
nixpkgs' installation-cd-minimal.nix) together with nixpkgs'
netboot-minimal.nix. Both installation-cd-base.nix and netboot.nix set
fileSystems."/" via the identical lib.mkImageMediaOverride (mkOverride
60) priority - genuinely conflicting root-filesystem strategies
(ISO-by-label vs. netboot-tmpfs) at the same priority, and the ISO one
was winning. Every netboot boot hung waiting for a device that can
never exist outside a real CD/USB:

  A start job is running for /dev/disk/by-label/nixos-minimal-...

Reproduced live: deployed a scratch lxc-pxe-boot on pve-test, pulled its
built kernel/initrd, and booted them directly with QEMU to confirm the
hang and capture full console output. netboot-minimal.nix's own chain
(netboot-base.nix) already imports profiles/installation-device.nix
independently, so common.nix's initialHashedPassword override still
applies correctly with iso.nix removed from this composition. Rebuilt
and re-booted the same way after the fix - full boot to a working shell
with SSH up, no hang.
beatzaplenty merged commit b4474cf1e1 into main 2026-07-21 22:20:04 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No labels
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: beatzaplenty/nixos#30