Repository navigation
lab: the probes boot the TPM and shirudo machine unless asked for the plain one - #850
Conversation
… plain one #809's goal is a shirudo machine's first login, and the decision is that a machine without shirudo is asked for, never fallen back to. Every probe now boots shirudo's machine by default: a TPM with a state of each boot's own, shirudo's initrd and lockdown, and a root with shirudo installed, at 512 MiB (spin's 128 cannot unpack the initrd, spin-stack/spin#1708). --opt machine=plain boots the machine they booted before, per run or per tree. A release cannot ship that machine, so a tree makes its own the first time an experiment boots it: the release's operator half in a guest (internal/shirudo), installed in a raw copy of the tree's base, wrapped as a qcow2 as image/build.sh wraps the release's. It is kept under the tree's shirudo/ and named in its manifest, and later boots reuse it. The lab now unpacks a release's operator half, its second tarball, when a tree starts from it. A tree that cannot make or boot the machine is refused by name before anything boots. Its kernel and initrd are hashed before the first boot, so that no measured boot hashes them. spin's handoff no longer mounts /proc and /run over the initrd's. Over them, shirudo.service in the root never ran. bootchart charts the plain machine: its sampler is the root's PID 1, which the shirudo machine starts after its initrd. Laptop, v20261127.03, 8 boots a side interleaved: cold first login 3172 ms p50 on the shirudo machine against 357 on the plain one. Restored (cached): 131 against 110. The guest says lockdown integrity, a TPM 2.0, shirudo ok and sealed, and an initrd that ran. Part of #809. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Evidence: the lab's probes on the shirudo machine, laptopLaptop (Ryzen 9 5900X, KVM), v20261127.03 with its operator half, the release's own spin-machine, ssh-first, 8 boots a siderestore-first, 5 boots a sideThe guest really boots under shirudoThese are from a lab-booted guest on spin's login path (the default): the probes' overlay, Before the handoff fix, the same guest had two tmpfs on /run (the handoff's over the initrd's). It had no /run/shirudo, Every other probe, once, on the default machine
On the shirudo machine, bootchart lost its one boot: Where the shirudo machine's cold boot goes (one boot, leads for #809's later steps)These are from the guest's journal, monotonic: The ledger of the same machine: |
Why
#809's goal is the first SSH login of a machine with a TPM that boots under shirudo, and a machine without shirudo is asked for by name, never fallen back to. This is step 2: the lab's probes boot that machine by default.
What changed
machine, isshirudoby default and takesplain. On the shirudo machineBootArgsadds--initrd,--tpm(a fresh state dir for each boot, a restore's too),--lockdown shirudoand--disk-underthe shirudo root, after every other flag. Its base is 512 MiB unless given (spin-stack/spin#1708). Tables and records saya TPM and shirudo.--opt machine=plainboots the old machine, per run or per tree.shirudo.Makeon the tree's own release. It installs the result in a raw copy of the tree's base and wraps that as a qcow2, asimage/build.shwraps the release's. The result goes inTREE/shirudo/{initrd.img,rootfs.qcow2}, and the manifest names it (shirudo, with the initrd's SHA256, checked on open). Later boots reuse it.restoreandstartget--disk-undertoo,usage's chain sits over that root, andpcrshashes the kernel and initrd before anything is measured (spin-machine boot --tpm hashes the kernel at every boot: +26 ms on the lab's clock #776's cache), so no measured boot hashes them.guest/shirudoor no operator half, or a spin-machine withoutboot --initrd/--tpm/--lockdown/--disk-under,pcrs --tpmor the probe'srestore/start --disk-under.--from release[:TAG]unpacks the release's second tarball over the first when the release publishes one (release.FetchOperator, checked by sha256 and signature as the first is).shirudo.Makefollows links, since a tree is links into its release.shirudo.servicein the root never ran on the default login path.machineoption. Its sampler is the root's PID 1, which the shirudo machine starts after its initrd, and there it lost its boot.Scope
Not here:
machine.Specandspin-machine bootdefaults (step 3), docs and goal text (step 4), the bench baseline (step 5).lab compatstays plain and says why. #848 is lived with, since the probes time the login and never read shirudo's status.Tradeoffs
The first boot of each tree pays for the operator's guest: 18 s on the laptop, and
boot:shirudobounds it at 15 min. Each tree is ~1 GiB larger. The shirudo root is a qcow2 made as the release's is, so overlays over either read the same format.Blast Radius
Every probe, the ladder and
releases measurenow boot the shirudo machine. A release tree from before v20261127.03 is refused that machine by name: in the ladder its cell says so, andmachine=plainboots it. Cold numbers jump by ~2.8 s on the laptop (below). That is the shirudo machine's real cost, and step 4 reads it.Verification
task lintpasses.task mutate: 166 refused, 0 survived.TestTheLabTalksToGitHubwithSPIN_LAB_RELEASE=1fetched the newest release with its operator half.lockdown [integrity],/dev/tpm0TPM 2.0, the initrd ran, andshirudo statusis ok with the keyring sealed and the LSM attached. Every other probe ran once on the default machine with 0 lost. Tables, the guest's answers and where the 2.8 s goes: lab: the probes boot the TPM and shirudo machine unless asked for the plain one #850 (comment).Part of #809.
🤖 Generated with Claude Code