Repository navigation
os/v3: the install seed - the pinned medium, the autoinstall user-data and its check (engine#712) - #732
Conversation
…a and its check The first slice of the v3 build (docs/os-v3.md, engine#712), and the part that can be proven with no device: - os/v3/pin.txt: the server ISO pinned whole - ubuntu-26.04.1-live-server-amd64.iso, 2,927,861,760 bytes, sha256 cc8a95cd..., volume label 'Ubuntu-Server 26.04.1 LTS amd64' read out of the ISO's primary volume descriptor (block 16), because casper matches that label and nothing else. v3 has no snapshot timestamp to pin: the installed base is unpacked from this ISO's own pool. - os/v3/seed.sh render: writes /1bit/autoinstall.yaml and /1bit/identity (0600) from the stick's inputs - the target disk by *serial* (a stick cannot wipe a machine it was not written for), the user onebit, a keys-only ssh, the storage table (1 GiB ESP, 64 GiB root, 1BIT-DATA = the rest with preserve: true, which is also the v2 -> v3 path), the twelve stock packages, the step hooks. The password is read from a file or minted and printed once, never argv; the salt is derived from the seed's own identity, so two renders of the same inputs are byte-identical and a stick is reviewable. - os/v3/seed.sh check: validates a rendered seed - field formats, the 0600 mode, no unsubstituted placeholder, every substituted value, and the document's structure with PyYAML (not a grep) - and refuses a file:// apt source, which would outlive the stick. - os/v3/seed-selftest.sh: 31 checks, no device: a good seed is accepted, 15 bad ones are refused with the right message, and six structure regressions are caught by breaking the template on purpose. The account is onebit and not 1bit: a Linux user name starts with a letter (adduser's default NAME_REGEX is ^[a-zA-Z][a-zA-Z0-9_-]*$, measured in /etc/adduser.conf, and the installer applies the same rule), and the selftest pins that refusal.
PR Reviewer Guide 🔍(Review updated until commit 25a7fe6)Here are some key observations to aid the review process:
|
A server-ISO smoke run (2.93 GB pinned ISO, ds=nocloud;s=/cdrom/1bit/ with user-data+meta-data) drove
subiquity unattended through our seed and found three defects, all fixed here:
- match: {serial: ...} is not a curtin disk match: it answers 'matched no disk'. The config now matches
size: largest, and the serial the seed names is enforced before curtin runs, by /1bit/steps in
early-commands (the guard refuses when the serial does not land on exactly the largest disk). check
asserts 'size: largest' instead of the serial.
- flag: boot alone is not a bootloader partition: curtin stops with 'autoinstall config did not create
needed bootloader partition'. The ESP partition now carries grub_device: true as well, and check
refuses a seed without it (measured: with both, block-meta partitions the disk and all three
partitions cleanly).
- late-commands ran curtin in-target on /cdrom/1bit/postinstall, but the target chroot has no /cdrom.
postinstall now runs in the live environment - where the medium and the console are - and drives the
target itself with curtin in-target per step, which is also what makes its step lines visible on tty1
and ttyS0 while subiquity is up (#710).
selftest 32/32 (the ESP tamper case is new), shellcheck rc=0, copyright rc=0.
|
Persistent review updated to latest commit d86e034 |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
At d86e034f (os/v3/pin.txt +33, os/v3/seed.sh +444, os/v3/seed-selftest.sh +152). The first slice of os/v3, and it is the runnable kind: I ran its selftest.
$ ./os/v3/seed-selftest.sh
…
PASS check: identity mode 644
PASS check: the seed is accepted again
seed selftest: 32 pass, 0 fail
seed selftest PASS 32/32 (exit 0, no device, no root)
That is a real gate for a device-free component, and it covers the behaviour the page promises: seed.sh dies on a malformed password hash (valid_hash, crypt(3) $6$) and on a malformed disk serial (valid_serial), and the selftest's last rows exercise the --check refusals including file modes. bash -n clean on both scripts; pin.txt carries the full Apache header like the rest of the repo.
So seed.sh + pin.txt + seed-selftest.sh are in the tree, self-checking, and pass — which is also the thing #717 currently claims prematurely (see below).
One number for #717's sake: its page says seed-selftest.sh has "31 checks"; at this head the script reports 32 pass / 0 fail. Whichever is true after this merges, the page should quote the selftest's own line rather than a hand-kept count — that is exactly how the "31" drifted.
Not verified: that pin.txt's pinned server ISO matches the real artifact (it is "pinned at the first build" per the design, and the ISO is not on this box), and the rendered autoinstall user-data against a real curtin run — that is the os/v3 VM gate's job, and its phase V does not exist yet.
tprs-ready applied.
|
Persistent review updated to latest commit 8123be3 |
…nd split the firmware row Review at dd9be3d, three points, all addressed: - the page pointed at files that are not in this branch in the present tense (docs/os-v3-live-puppy-eval.md and os/v3/puppy/ -> #739; os/v3/pin.txt, seed.sh, seed-selftest.sh -> #732). They are now named with their PRs and the page says plainly that none of it is in this PR, so every sentence is true at any merge order. The '31 checks' figure was #732's file and is now 32 (it grew the ESP/grub_device case), attributed there. - the os/v3 tree table now opens by saying it is the tree this page proposes and that nothing in it lands in this PR. - the firmware row had both split packages on one revision; measured here they are not: linux-firmware-amd-misc 20260319.git217ca6e4-0ubuntu1.1 and linux-firmware-amd-graphics 20260319.git217ca6e4-0ubuntu3.1. Both places (the package-set paragraph and the measured table) now say so.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
At 8123be3, rebased after the merges ahead of it. The author patch is byte-identical to the head I reviewed (d86e034f) — patch-id from the merge base is the same before and after — so my review stands without re-reading: only main arrived in the rebase.
Nothing new to verify. Everything in my earlier verdict on this PR applies at this head unchanged, including what I noted as not-verified-by-me there.
|
Persistent review updated to latest commit 25a7fe6 |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
At 25a7fe69, rebased as the merges ahead of it landed. The author patch is byte-identical to the head I reviewed (patch-id from the merge base unchanged before and after), so only main arrived in the rebase and my review stands without re-reading.
Nothing new to verify; everything in my earlier verdict on this PR — including what I recorded there as not-verified-by-me — applies at this head unchanged.
…ngine#712) (#717) * docs: 1bit OS v3 - the installed machine is an Ubuntu 26.04 Server (engine#712) The design for #712: the live stick stays the os/mini image and becomes the autoinstall carrier; the installed machine is a headless Ubuntu 26.04 Server with our kernel, drivers, runtime, engine and Lemonade as apt packages. Covers the stick and target partition layouts, the autoinstall user-data and its nine postinstall steps, the install screen (#710), the firmware boot entry and efivarfs fix (#709), the package set with measured sizes, the pinned libhsa and the no-SVM trio (#715), the v2 -> v3 adopt-/data path, the QEMU A/R/I/B gate plus the new V phase, and the board gate. Numbers are measured on the rebuilt strixhalo box; what is not measured is listed as the build's risk list. * docs/os-v3: the board gate sentence says what is provable, and the headers package is on demand * docs/os-v3: reflow the board gate paragraph * docs/os-v3: one root size in both places, and no invented package count on the install screen * docs/os-v3: postinstall's rows are the screen's steps 3-8, so the gate's 1-9 is one list * docs/os-v3: our repo is never a persistent apt source - a file:///cdrom URI outlives the stick The seed's apt.primary is the archive (stock packages only) with curtin's offline-install fallback; postinstall installs the medium's repo through a temporary source it removes, and 1bit.gg/apt stays the installed machine's one source, as v2 has it. * docs/os-v3: the account is onebit, and the medium's pin is measured not deferred - a Linux user name starts with a letter (adduser's default NAME_REGEX is ^[a-zA-Z][a-zA-Z0-9_-]*$, measured here, and the installer applies the same rule): 1bit would be refused before the first byte is written, so the account is onebit. docs and the seed agree, and the seed refuses 1bit by name. - the server ISO is pinned for real: 26.04.1, 2,927,861,760 bytes, sha256 cc8a95cd..., volume label read out of the ISO's primary volume descriptor (the string casper matches), all in os/v3/pin.txt. It moves out of the not-measured list; what stays there is that the medium has never been booted. - the tree table says what is in the tree (pin.txt, seed.sh, seed-selftest.sh) and what is still a design. * docs/os-v3: Puppy is the plan if its gates pass; Ubuntu autoinstall is the documented fallback The owner's 2026-11-01 direction (1bit OS v3 on Puppy, live stick and frugal install, with our kernel) reframes this page rather than replacing it: the medium changes, the design does not - the same ESP chain, the same #709 boot entry, the same #710 install screen, the same seed of identity and the same package content. The Puppy evaluation (docs/os-v3-live-puppy-eval.md, os/v3/puppy/) carries the numbers and the gates; this page now says which plan is the plan and why the Ubuntu plan stays as the fallback: it needs no kernel rebuild, and its userland brings sshd, apt, efivarfs, a normal user and unattended-upgrades for free, where Puppy adds them as packages and runs as root by model. * docs/os-v3: name the PRs that carry the files this page references, and split the firmware row Review at dd9be3d, three points, all addressed: - the page pointed at files that are not in this branch in the present tense (docs/os-v3-live-puppy-eval.md and os/v3/puppy/ -> #739; os/v3/pin.txt, seed.sh, seed-selftest.sh -> #732). They are now named with their PRs and the page says plainly that none of it is in this PR, so every sentence is true at any merge order. The '31 checks' figure was #732's file and is now 32 (it grew the ESP/grub_device case), attributed there. - the os/v3 tree table now opens by saying it is the tree this page proposes and that nothing in it lands in this PR. - the firmware row had both split packages on one revision; measured here they are not: linux-firmware-amd-misc 20260319.git217ca6e4-0ubuntu1.1 and linux-firmware-amd-graphics 20260319.git217ca6e4-0ubuntu3.1. Both places (the package-set paragraph and the measured table) now say so. --------- Co-authored-by: bong-water-water-bong <[email protected]>
First slice of the
os/v3build (engine#712, design in #717): the install seed, and the part of v3that can be proven with no device — a few seconds of shell, no QEMU, no stick.
os/v3/pin.txt— the medium pinned whole:ubuntu-26.04.1-live-server-amd64.iso,2,927,861,760 bytes, sha256
cc8a95cd…, volume labelUbuntu-Server 26.04.1 LTS amd64read out of theISO's own primary volume descriptor (block 16, offset 32768+40) rather than guessed from the file name,
because casper finds its squashfs by that label and by nothing else. v3 has no snapshot timestamp to pin
the way
os/v2/pin.txtdoes: the installed base is unpacked from this ISO's own pool, so the ISO's sha256is the base pin.
os/v3/seed.sh—render,check,selftest:render <out-dir>writes the two files the stick carries in/1bit/:autoinstall.yamlandidentity(0600, key=value forpostinstallandprepare-stick.sh).re-run finds the same disk;
interactive-sections: []keeps the install unattended./booton it and no swap partition,1BIT-DATAtakes the restwith
preserve: true— which is at once the fresh-disk path and the v2 → v3/dataadoption.--mint-password(printed once), never argv. The salt is derivedfrom the seed's own identity, so two renders of the same inputs are byte-identical and a stick can
be reviewed as a diff.
checkvalidates a rendered seed: field formats, the 0600 mode, no unsubstituted placeholder, everysubstituted value, and the document's structure with PyYAML (not a grep) — including a refusal of a
file://apt source, which would outlive the stick (the trap docs: 1bit OS v3 - the installed machine is an Ubuntu 26.04 Server (engine#712) #717's review found).os/v3/seed-selftest.sh— 31 checks, no device: a good seed is accepted, 15 bad inputs are refusedwith the message that says why, and six structure regressions are caught by breaking the template on
purpose (no
preserve: true, afile://apt source, an unsubstituted placeholder, a root size theidentity does not have, a
/datathat is not1BIT-DATA, an md5 password hash).One naming decision this pins down: the account is
onebit, not1bit. A Linux user name starts witha letter —
adduser's defaultNAME_REGEXis^[a-zA-Z][a-zA-Z0-9_-]*$(measured in this box's/etc/adduser.conf) and the installer applies the same rule, so1bitis refused before the first byteis written.
seed.shrefuses it too, with that reason, and the selftest pins it. #717 carries the matchingdoc change.
Verified on strixhalo:
bash -nclean,shellcheckrc=0 (all severities),seed-selftest.sh31/31,tools/copyright.py --checkrc=0, and a real render (--mint-password, a real ed25519 key) passescheck. Not proven here: that subiquity accepts this user-data — that is QEMU phase I, the next slice(
mkstick.sh,postinstall,steps).