interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / docs / SEED0B_MACHINE1_QUALIFICATION.md

125 lines · 6271 bytes Raw Blame History Rendered
1# SEED-0B on Machine 1 (P2-9): operator procedure
2
3Status: **prepared, not run.** SEED-0B is qualified in QEMU only
4([evidence/seed0b_qemu_2026-09-25.md](../evidence/seed0b_qemu_2026-09-25.md)).
5This page is the attended procedure for the physical step. An agent must not
6run it or claim Machine 1 qualification; the operator runs it and publishes
7the evidence.
8
9The claim to prove on hardware is the same as in QEMU, with identical
10artifact bytes and ArtifactIds (ADR 0014 §8):
11
12> An externally supplied, signed Binary Artifact v0 was authenticated,
13> deterministically admitted with authority no broader than requested,
14> executed from the exact verified bytes under W^X EL0 isolation, used an
15> authorized READ capability, was denied unauthorized WRITE and forged
16> authority, was fully reclaimed, and produced a canonical admission
17> receipt. Hostile artifacts failed closed.
18
19Everything here is **TEST ONLY**: the artifact signer and the receipt signer
20are RFC 8032 test vectors. It is not a production identity ceremony, it
21enrolls no key, and it changes no trust state.
22
23## Blocking prerequisites (all required; stop if any is missing)
24
251. **TRUST-1 owner-signed boot chain** ([#40](https://github.com/aien-dev/aienux/issues/40)).
26 Native Machine 1 boots are paused by operator decision (2026-09-24):
27 turning Secure Boot off changes TPM PCR 7 and breaks the secrets sealed
28 to it. **Secure Boot was kept on at the time of this decision. Update 2026-10-01: Secure Boot is OFF for development by owner decision; the TPM stores were relocked under PCR 7 with it off (`~/handoffs/secure-boot-off/after-restart.sh`). A release image must still be signed by the TRUST-1 chain.** The qualification image must therefore
29 be signed by the owner-controlled chain TRUST-1 defines. Do not disable
30 Secure Boot, enroll the test keys, or relax any other mechanism to run
31 this step.
322. **Native-boot rollback qualification** (M0) and the one-time boot
33 discipline in [NATIVE_BOOT_ONE_TIME.md](NATIVE_BOOT_ONE_TIME.md): a
34 BootNext-only entry, BootOrder unchanged, automatic return to Linux.
353. **Recovery media and fallbacks** per
36 [RECOVERY_MEDIA_MACHINE1.md](RECOVERY_MEDIA_MACHINE1.md): the
37 `AIENOSRECOV` stick plugged in, the `ubuntu` entry, the firmware fallback
38 loader and the installed kernels present.
394. **Console capture.** Per-candidate lines and receipts go to the console
40 only (they exceed the bounded `AienosBootReportV1` record). Capture the
41 Spark UART with the rig's Pi GPIO UART path
42 ([HARDWARE_TEST_RIG.md](HARDWARE_TEST_RIG.md)); HDMI capture alone is
43 not sufficient evidence for this step.
445. **The QEMU qualification is green on the exact commit being staged**:
45 `AIENOS_STRICT=1 ./scripts/verify_all.sh` with `SEED_0B_QEMU: PASS`.
46
47## 1. Prepare the inputs (Spark, Linux, no boot changes)
48
49```bash
50git switch --detach <qualified commit>
51./scripts/seed0b_machine1_prepare.sh ~/seed0b-machine1
52```
53
54This builds, from a clean commit only:
55
56- `BOOTAA64.EFI`: `aienos-handoff --features seed0b-qualification,hardware-staging`
57 (receipts carry the `SEED-0B-MACHINE1` tier);
58- `ARTIFACTS/`: the same signed `.AIEN` bytes the QEMU run used (P26SEED,
59 the P2-5 probes and the H01–H29 matrix);
60- `ids.txt`, `expected.txt`, and `MANIFEST.sha256` (with the commit).
61
62It never touches the ESP, BootOrder/BootNext, Secure Boot, the TPM or any
63firmware variable. Check that the P26SEED ArtifactId it prints equals the
64one in the QEMU evidence.
65
66## 2. Sign the image with the TRUST-1 chain
67
68Sign `~/seed0b-machine1/BOOTAA64.EFI` with the owner-controlled AIENOS
69signing key exactly as TRUST-1 specifies, and record the signed image's
70SHA-256. The `.AIEN` files are not re-signed: their test signatures are what
71the qualification checks.
72
73## 3. Stage one boot (attended)
74
75Use the established one-time procedure, which creates a BootNext-only entry
76and leaves BootOrder unchanged, with two differences:
77
78- the staged loader is the signed SEED-0B image from step 2;
79- copy `~/seed0b-machine1/ARTIFACTS/*.AIEN` to `\EFI\AIENOS\ARTIFACTS\` on
80 the same ESP. Nothing else on the ESP changes.
81
82Record `efibootmgr` output, `mokutil --sb-state` and the TPM PCR 0–7 values
83before the boot.
84
85## 4. Boot, capture, return
86
87Start the UART capture, then reboot once. The image runs every candidate,
88prints one `artifact:` line and one `receipt:` line per candidate plus the
89`artifact_*` header and footer, and resets. BootNext is consumed, so the
90machine returns to Linux. If it does not, use the recovery media.
91
92After return, confirm BootOrder, Secure Boot state and PCR 0–7 match the
93pre-boot record, and that the Linux system is intact.
94
95## 5. Verify the captured log (Spark, Linux)
96
97```bash
98AIENOS_SEED0B_SERIAL=<captured console log> \
99AIENOS_SEED0B_INPUTS=~/seed0b-machine1 \
100AIENOS_SEED0B_EVIDENCE=evidence/seed0b_machine1_<date>.md \
101 ./scripts/qemu_artifact_test.sh
102```
103
104This mode boots nothing. It proves the staged inputs are byte-identical to a
105fresh deterministic pack and to their `MANIFEST.sha256` (no unlisted file),
106that the manifest commit, the log's `aienos_commit` and this clean checkout's
107HEAD are one commit, and that the log shows Machine 1's CPU identity (20 cores,
108Cortex-A725/X925 boot core). It then applies every qualification-boot check to
109the captured log (P26SEED allow/deny results, the matrix, frame accounting),
110and checks, signs with the TEST ONLY receipt key, and verifies every receipt.
111
112The `SEED-0B-MACHINE1` tier label alone does not prove hardware: it is a build
113feature (`hardware-staging`), so the same image booted in QEMU prints it too.
114The CPU-identity check is what rejects a QEMU log. A captured log remains
115operator-attested; TRUST-1 measured boot is what will bind it
116cryptographically. When TRUST-1 signs `BOOTAA64.EFI`, record the signed
117image's SHA-256 alongside the manifest rather than replacing the prepared file,
118or the manifest check fails. The step passes only on `SEED_0B_MACHINE1: PASS`.
119
120## 6. Publish
121
122Commit the generated evidence file with the captured log's SHA-256, the
123signed image's SHA-256, the pre/post boot state records, and the operator's
124name and date. SEED-0B PASS requires both `SEED_0B_QEMU: PASS` and
125`SEED_0B_MACHINE1: PASS` on the same artifact bytes.