Repository navigation
Description
What's the problem
A pre-seeded stick can supply the whole configuration, but the disk choice stays with a person. On the installation medium the pre-seed only fills the setup page in; the disk (the erase) is picked and confirmed in the browser. pithead-install --target takes only a raw /dev path, and no pre-seed key names a disk. /dev names reshuffle across boots, so a path is not a safe key; the disk serial is. A fleet stick (#797) that can provision everything except the disk still needs a person per machine.
This changes a documented promise on purpose. docs/appliance.md and the first-boot flow say pre-seeding covers configuration, not the erase decision. For a headless install, a serial the operator wrote on the stick becomes that decision. Everything else about erasing stays as it is.
What it impacts
- Fleet operators flashing several machines from one stick: no monitor and no browser per box. Standalone installs and the interactive picker are unchanged.
- Code:
os/installer/pithead-install,lib/pithead/10-installer-preseed.sh,lib/pithead/12-firstboot-wizard.sh,docs/appliance.md, the shell tests and one KVM leg. No browser wizard frontend (it is rebuilt under Sovereign: redesign setup token, role and essential configuration steps #2543) and no dashboard UI. - Risk: this is an erase path. A wrong match destroys a synced chain (250+ GB), so the refusals below are the substance of the work.
How I found it
Found by the 2026-08-14 repo audit. The operator's 2026-09-23 brief and a re-check against develop on 2026-10-27 agree:
--targetaccepts only a raw path.list_disksalready reads each disk's serial through lsblk, but only a human sees it (the picker); it never reaches a headless flag.- The pre-seed layer knows config, token, rig and restore files, and no disk key. A tree search finds no
target_disk_serial,disk_serialortarget-serial, and no open or merged PR touches it. - The wizard hands the installer
--yesafter a typed disk-name confirmation; the installer refuses the booted medium and any disk with mounted filesystems or swap, and--listalready omits both. - Groundwork exists: the KVM install phase has a second disk with real libvirt serials (KVM install phase has no second disk: M4's wrong-disk guard (unrelated data listed as "will be erased", left untouched) and the inventory's model/serial fields are unproven end to end #2068, PR test(os): give the KVM install phase a second disk for M4's wrong-disk guard #2212), and boot-time pre-seed legs landed with KVM: headless setup files on the stick (pithead-token.txt, pre-seeded pithead-config.json, rejection) at a real first boot #3071 (PR appliance: fix #3071, #3072, #3073 — cover headless setup and password recovery #3537).
Not confirmed: whether any disk class reports a serial that repeats across two attached disks. Virtio and some NVMe report none, which --list prints as unknown.
How important is it
Low. It matters only at fleet scale; the lean roadmap files it P4 "later, only on demand". It is not a release blocker (no security, data-loss or Tari-fork exposure), and the interactive picker already prevents a wrong-disk wipe on every install path that exists today. It is worked now because the 2026-10-27 owner decision lifts the pause on post-GA work, and the user benefit is concrete: one person provisions a rack without walking a monitor to each machine. It does not gate #797.
Acceptance criteria
- Opt-in. Only a serial file on the stick's ESP (name chosen in the PR, documented) enables a headless erase. A stick with
pithead-config.jsonand no serial file behaves exactly as today: the pre-filled page opens and waits for a person. - Selection. The file holds one or more serials, one per line, matched exactly against the
pithead-install --listinventory. The install proceeds only when exactly one attached candidate matches.pithead-installgains--target-serial <serial>that resolves to the same--targetpath, so every existing guard still runs. The file never supplies a /dev path. - Enumeration. With the two disks' /dev order swapped between two runs, the install lands on the disk with the named serial both times and the other disk is untouched.
- Refusal. Each case below erases nothing, exits non-zero with the reason and the candidate list, and the boot flow then opens the normal setup page:
- no attached disk matches;
- more than one attached disk matches;
- the serial belongs to the booted medium or to a disk with mounted filesystems or swap;
- the serial is empty,
unknown, or contains characters outside the serial alphabet (the file is operator input from a FAT volume and is never interpreted); - the pre-seeded
pithead-config.jsonis rejected.
- Data. A serial file never selects
--wipe dataor--wipe all. A reinstall onto a disk that already holds a Pithead layout keeps its /data partition. - Interactive path unchanged. The disk picker and typed disk-name confirmation behave as today and their existing tests pass.
- Docs.
docs/appliance.mddocuments the headless flow (file name, format, refusal messages) and no longer says the erase is always a person's decision; the matching claim in the first-boot flow is corrected. No explanatory code comments are added. - Proof. A tier-1 shell test with a fake lsblk covers: swapped order, no match, duplicate match,
unknown, the boot disk's serial, a mounted disk's serial, a rejected config, and success. A tier4-kvm leg with two disks carrying explicit serials, the target listed second, shows the install on the named disk, the other disk byte-for-byte untouched, and a non-matching serial leaving both untouched ("tier follows the path": a string check is not enough for installer control-plane code).
Possible solutions
- Recommended by the operator brief: add
pithead-install --target-serial <serial>that resolves through the same lsblk JSONlist_disksalready builds and dies listing the candidates on zero or several matches, then reuses--target. Teach10-installer-preseed.shto read an optional serial file from the ESP, sanitised likepreseed_token, and have the first-boot flow call the flag before it stages the wizard. No new subsystem and no new installer UI. - Settle in the PR (operator recommendations):
- own file rather than a
pithead-config.jsonfield, because the config is one shared, schema-validated document per fleet and a serial is per machine; - always refuse
unknownand empty; - land standalone before Master installer image: one stick provisions a Pithead coordinator, a RigForge rig, or both #797 (a motivator, not a blocker).
- own file rather than a
- One serial per stick serves one machine; a list is what lets one stick walk a rack. Decide the list format in the PR.
- Option if the owner wants a second guard against a stray file: require the serial file to carry an explicit erase word on its first line. It adds a step for fleet operators, so it is left to the owner.
- Rejected: matching by /dev path (reshuffles) or by model or size (not unique within a fleet).
Earlier scope, kept as evidence only (superseded 2026-10-27; do not implement from it)
What's the problem
Pre-seeding covers the whole config, but disk choice remains human-only: the installer's disk picker is interactive, and there is no headless way to name the target. The design is already written down in the appliance docs — select by disk serial, never by /dev enumeration path (which reshuffles across boots) — but nothing implements it.
Standalone installs don't care. #797 (master installer image, fleet flashing) makes this a real gap: a fleet stick that can provision everything except choose the disk still needs a human per box.
Scope: a `target_disk_serial` (or similar) key in the pre-seed config, honored by `os/installer/pithead-install`, refusing loudly when no attached disk matches. Found by the 2026-08-14 repo audit; named in docs, no prior issue.
what it impacts
Impact is not separately established in the existing report; confirm the affected users or behavior.
How I found it
Discovery details are not separately established in the existing report; preserve and verify the evidence already recorded.
how important is it
Importance has not been assessed explicitly; triage must state the priority and its reason.
acceptance criteria
Acceptance is not isolated in the existing report; the agent must identify a testable outcome before implementation.
possible solutions
No distinct solution options are recorded; investigate the existing report before choosing an approach.
Activity
docs(dev): pre-seeding is built — correct the M2 note that says it is…
pithead-developer commentedon Sep 24, 2026
Investigation brief (operator pre-read, 2026-09-23)
Still valid: yes.
pithead-install --targetstill takes only a raw /dev path (os/installer/pithead-install:150-151, :175-179); no serial-based selection exists anywhere in the tree.Root cause:
list_disks(os/installer/pithead-install:50-63) already extracts each candidate's serial via lsblk/jq for the interactive picker, but that data only reaches a human —publish_disk_inventory(lib/pithead/10-installer-preseed.sh) ships it to the wizard's browser spool, never back into a headless flag. The preseed layer only knowspithead-config.json,pithead-token.txt,pithead-rig.json,pithead-restore.enc/-pass— notarget_disk_serialkey (confirmed: notarget_disk/disk_serialstring anywhere in lib/pithead/10-installer-preseed.sh). CHANGELOG 2.0.0 ("which disk to use") and docs/appliance.md:185 both confirm disk choice is still browser-only. The issue's own body (not previously quoted) already states the intended scope precisely: "atarget_disk_serial(or similar) key in the pre-seed config, honored byos/installer/pithead-install, refusing loudly when no attached disk matches" — the investigation independently converges on the same shape.Note: the CHANGELOG's citation of #924 for "headless config-drop" is stale/wrong — GitHub issue #924 is actually a closed, unrelated bug (
setup()'s no-TTY re-run prompt). Drop that citation; the prior-art claim itself (existing preseed_token/consume_preseed_config mechanism) stands on the code alone, no issue number needed.Fix shape: add
pithead-install --target-serial <serial>that resolves via the same lsblk JSON list_disks already builds, dies loudly listing candidates on zero/multiple matches, then reuses the existing--targetpath. Teach10-installer-preseed.shto read an optional smallpithead-disk-serial.txtoff the ESP (same pattern aspreseed_token) and invoke the new flag. No new subsystem — this thread's existing serial data, wired one more hop.Evidence tier: inferred, no PR yet (confirmed via
gh pr list/gh search prs— no open or merged PR touches target_disk_serial/disk_serial/target-serial). This is an os/installer control-plane change, so per "tier follows the path" (docs/dev/testing-strategy.md:50) the PR needs a tier4-kvm job proving actual serial resolution + refusal behavior — a tier-1 string check is not enough.Rulings needed: (1) preseed key as its own file vs. a
pithead-config.jsonfield — recommend own file, mirrors the token split; (2) refuse on serial=="unknown" requests (virtio/some NVMe report none) — recommend yes, always; (3) sequence vs #797 — recommend land #979 first, standalone (#797 still open).Duplicates/blockers: none found; #797 (open, master installer image) is a motivator not a blocker; #2068 (closed) added KVM test coverage giving disks real libvirt
serial=attributes and explicitly lists #979 as a beneficiary ("this gives it a guest with serials to test against") — worth noting as fresh, directly relevant context the original brief missed, though it doesn't change scope.Triage recommendation: no milestone change — #979 is already in "v2.x - post-GA" (set at creation, confirmed via
gh issue view), which is frozen until GA per current scope rules; not a GA blocker (no security/data-loss/Tari-fork exposure), and the browser wizard's interactive disk picker already prevents a wrong-disk wipe for every install path that exists today.Verify against the code before relying on this; it was written by an investigator, not the implementer.
pithead-developer commentedon Oct 27, 2026
Carried from #797 (closed as shipped): a fleet stick can still not configure a rig without a person. An operator cannot pre-seed the rig role, pool address and worker name ahead of time. The rig pre-seed file (pithead-rig.json on the stick's boot partition) is written only by a disk install, and the first boot rejects it unless it already carries the access token the setup card would have shown. Hand-writing it is undocumented. When #979 designs the headless install path, decide whether rig pre-seeding belongs in the same change, so one stick can walk a rack of rigs with no monitor. Treat it as deferred and low priority, like the rest of this issue.
pithead-developer commentedon Nov 1, 2026
Grouped with #912, but PR #3835 does not close it: Changes the destructive installer disk selection and needs its own installer KVM proof; it shares neither the descriptor gate nor its runtime proof.. Released for its own pick.
pithead-developer commentedon Nov 1, 2026
Waiting on a transient bench_outage condition, not on another issue. tier4-kvm submit (phases=install) on b4188e3 refused twice with '503 draining: the runner is shutting down'; idempotency key 9ff6cfa6e66544739b7ed056da1627ad. The runner re-checks it (first at 2026-11-01T17:27Z, at most 5 times).
pithead-developer commentedon Nov 2, 2026
Blocked on #3844. The only failing required check is
Container bridge awk portability (Debian 12). It printsBridge awk: 45 passed, 0 failedand then make exits 1, because the base branch'stest-bridge-awkhard-codes a pass count of 9. That makes it fail ondevelop-v2.1.0itself. Issue #3844 tracks it, and the fix is open PR #3845, which hasn't merged. This diff touches no bridge or awk file, so changing it here would be a workaround in the wrong place. Finished and proven on this PR: the Shell lint and Shell tests findings are fixed, andtier4-kvminstallpassed twice on 0e1942f (jobs 3330 and 3331, evidence blocks in the PR body). Once #3845 merges, mergedevelop-v2.1.0into this branch and the check should clear. I posted the same explanation on the PR.The runner resumes this issue when that one closes.
appliance: drop the stale never-pre-seeded claims and test the setup-…
appliance: fix #979 — headless install selects the target disk by ser…
pithead-developer commentedon Nov 2, 2026
Merged in #3837.