Tidy up pxe flow
This commit is contained in:
+17
-5
@@ -11,10 +11,16 @@ Flow for a PXE-only host:
|
||||
|
||||
```
|
||||
firmware PXE (PXEClient) --TFTP--> snponly.efi (iPXE)
|
||||
iPXE re-DHCPs (user-class "iPXE") --> handed boot.ipxe (TFTP)
|
||||
iPXE autoboot DHCP (user-class "iPXE") --> handed boot.ipxe (TFTP)
|
||||
boot.ipxe: imgfetch UKI over HTTP -> imgargs <real cmdline> -> boot
|
||||
```
|
||||
|
||||
> **Requires PortFast/edge on the switch port** (see the gotchas below). iPXE's
|
||||
> autoboot opens the NIC, which bounces the PHY; without PortFast the switch's STP
|
||||
> forwarding delay (~30 s) drops iPXE's DHCP and the boot fails. PortFast removes
|
||||
> the delay. (The earlier `autoexec.ipxe` + `ifopen` + DHCP-retry workaround was
|
||||
> removed once PortFast was identified as the real fix.)
|
||||
|
||||
`boot.ipxe` is **rendered at container start** by the dnsmasq entrypoint; only the
|
||||
iPXE binary (`snponly.efi`) is supplied here. The script exists because of a sharp
|
||||
edge:
|
||||
@@ -107,10 +113,16 @@ Hard-won findings from bringing up the first PXE-only physical host:
|
||||
~30 s to every boot — PortFast removes the delay entirely.
|
||||
- **iPXE aborts the script on any unguarded command failure** (→ iPXE exits → the
|
||||
firmware restarts the whole PXE process, looking like "it doesn't retry"). Every
|
||||
fallible step in `boot.ipxe`/`autoexec.ipxe` is therefore `||`-guarded.
|
||||
- **`autoexec.ipxe`** (rendered by the dnsmasq entrypoint) is fetched + run at
|
||||
iPXE startup, *replacing* the default autoboot; that's where the `ifopen` +
|
||||
DHCP-retry + `imgargs <real cmdline>` chain lives.
|
||||
fallible step in `boot.ipxe` is therefore `||`-guarded.
|
||||
- **`boot.ipxe`** (rendered by the dnsmasq entrypoint, served as the `tag:ipxe`
|
||||
DHCP bootfile) does `dhcp` + `imgfetch` UKI + `imgargs <real cmdline>` + `boot`.
|
||||
The cmdline injection is needed only because **Secure Boot is OFF** (the stub
|
||||
takes the loader's cmdline); under Secure Boot it's a no-op and `boot.ipxe`
|
||||
could collapse to a plain `chain` of the UKI.
|
||||
- **Removed STP-era workaround:** an `autoexec.ipxe` that ran `ifopen net0` + a
|
||||
DHCP-retry loop before autoboot was used to wait out STP. It's gone now that
|
||||
**PortFast is the fix** — if you ever run on a switch you can't set PortFast on,
|
||||
that ifopen+retry approach (in git history) is the fallback.
|
||||
|
||||
## Note
|
||||
|
||||
|
||||
Reference in New Issue
Block a user