Update pxe boot flow
This commit is contained in:
@@ -626,6 +626,24 @@ smoke test.
|
||||
Secure Boot on targets. Until then the loud unsigned warning must stay.
|
||||
**Key generation + enrolment procedure: [secure-boot-keys.md](secure-boot-keys.md)**
|
||||
(the PK/KEK/db trio; `db` = `sb_key`/`sb_cert`, PK/KEK stay offline).
|
||||
- **PXE-only iPXE fallback — BENCH-VERIFIED on the EliteBook 820 G4 (2026-06-20).**
|
||||
Firmware without UEFI HTTP boot chainloads `serving/tftp/snponly.efi` → renders
|
||||
`autoexec.ipxe` (ifopen + DHCP-retry + `imgargs <real cmdline>`) → UKI over HTTP
|
||||
→ NVMe/verity root. dnsmasq tags `pxe`/`ipxe`/`httpboot` give graceful per-client
|
||||
fallback; HTTP-boot hosts are unaffected (firmware → UKI direct). Gotchas that
|
||||
cost real time (all captured in [../serving/tftp/README.md](../serving/tftp/README.md)):
|
||||
(i) the I219-LM needs **`snponly.efi`** (native iPXE driver won't bind);
|
||||
(ii) **PortFast/edge on the switch port is REQUIRED** — iPXE's PHY bounce
|
||||
triggers STP forwarding delay that drops DHCP (this was the real blocker);
|
||||
(iii) iPXE aborts the script on any unguarded command failure (use `||`);
|
||||
(iv) Secure Boot OFF makes systemd-stub take iPXE's load options as the cmdline,
|
||||
so the entrypoint extracts the UKI's real `.cmdline` and feeds it via `imgargs`.
|
||||
- **Sign iPXE for the PXE-only fallback (Secure Boot, production).** The lab
|
||||
`snponly.efi` is **UNSIGNED** → that path needs **Secure Boot OFF**. For
|
||||
production: `sbsign` the iPXE binary with the fleet **db** key (only `db` needed —
|
||||
no MS CA / shim), so SB stays enforced firmware → iPXE → UKI; then the cmdline
|
||||
contraption becomes a no-op (the stub ignores loader cmdline under SB). See
|
||||
[secure-boot-keys.md](secure-boot-keys.md) "PXE-only hosts".
|
||||
- **Bench-verify on the secure path** (swtpm + hostapd + FreeRADIUS,
|
||||
`disable_dot1x=false`) — the items deferred this session:
|
||||
- NM port secure path: `en*` UNMANAGED + `macsec0` MANAGED/renewing, MKA
|
||||
|
||||
@@ -170,6 +170,44 @@ Caveats:
|
||||
CI-secret flow is a reasonable interim; the HSM flow is the invariant-#7 ideal
|
||||
(TODO #8).
|
||||
|
||||
## PXE-only hosts: iPXE chainload and Secure Boot
|
||||
|
||||
Firmware without UEFI HTTP boot (e.g. HP EliteBook 820 G4) falls back to PXE; the
|
||||
serving stack hands those hosts **iPXE** over TFTP (`serving/tftp/ipxe.efi`),
|
||||
which then chainloads the UKI over HTTP. dnsmasq selects per client automatically
|
||||
(HTTP-capable → UKI direct; PXE-only → iPXE → UKI), so no per-host config.
|
||||
|
||||
Secure Boot across that chain needs **only the `db` key — the one already
|
||||
enrolled for the UKI. No extra keys, no Microsoft CA, no shim** (the fleet owns
|
||||
its keys):
|
||||
|
||||
```
|
||||
firmware --(verify snponly.efi vs db)--> iPXE --(chain -> firmware LoadImage
|
||||
verifies UKI vs db)--> UKI
|
||||
```
|
||||
|
||||
- The firmware verifies the TFTP-downloaded NBP (`ipxe.efi`) against `db` →
|
||||
**the iPXE binary must be signed by `db`** (`sbsign`, same key/step as the UKI).
|
||||
Stock/unsigned iPXE is rejected under Secure Boot.
|
||||
- iPXE must load the UKI as an **EFI image** (`imgfetch` + `boot`, or `chain`) so
|
||||
the firmware's `LoadImage()` re-verifies it against `db` — do **not** use iPXE's
|
||||
`kernel`/`boot` on a raw vmlinuz, which bypasses SB.
|
||||
- **cmdline gotcha (Secure Boot OFF only):** when iPXE executes the UKI it sets the
|
||||
EFI load options to the image's cmdline, or — if empty — to the image **name**.
|
||||
With SB off systemd-stub uses the load options *as the kernel cmdline*,
|
||||
**replacing the UKI's embedded cmdline** (roothash/nvmf/...) → dracut emergency
|
||||
shell. Clearing the args does NOT help (empty → iPXE falls back to the name). The
|
||||
serving stack's rendered `boot.ipxe` therefore feeds iPXE the **real cmdline**,
|
||||
which the dnsmasq entrypoint extracts from the UKI's `.cmdline` PE section
|
||||
(`objcopy`, artifact mounted read-only) — see `serving/tftp/README.md`. **Secure
|
||||
Boot ON is immune** — the stub ignores any loader-supplied cmdline — so this is
|
||||
purely a lab/SB-off concern.
|
||||
|
||||
**Lab posture (now): iPXE signing OFF → run the iPXE path with Secure Boot OFF.**
|
||||
`serving/tftp/ipxe.efi` is unsigned. **Production upgrade:** sign it with `db`
|
||||
and Secure Boot stays enforced end-to-end (tracked in TODO #8). The HTTP-boot path
|
||||
(firmware → UKI) is unaffected and remains SB-clean regardless.
|
||||
|
||||
## Key hygiene & lifecycle
|
||||
|
||||
- **PK.key and KEK.key go offline / into an HSM and stay there.** They are only
|
||||
|
||||
Reference in New Issue
Block a user