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

GitHub aien-dev/aienux#59 (code only)

closed derived 366840a2e692beeb #59

Imported from GitHub aien-dev/aienux#59 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base 0379b2f63963942909c234a8219d3c7a4c14cbad · Head b0d02900f18a46cee578ca9ceda09190ea395b4b

Apply it

git checkout -b patch-366840a2e692beeb 0379b2f63963942909c234a8219d3c7a4c14cbad
curl -fsSL https://interplane.io/drakestapleton/aienux/patches/366840a2e692beeb.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/aienux
59
b0d02900f18a46cee578ca9ceda09190ea395b4b
{"kind":"github-import","owner":"aien-dev","repo":"aienux","number":59,"url":"https://github.com/aien-dev/aienux/pull/59","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:36:40Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/docs/MILESTONES.md b/docs/MILESTONES.md
index 2d9e50de..912d25ee 100644
--- a/docs/MILESTONES.md
+++ b/docs/MILESTONES.md
@@ -35,7 +35,7 @@ only at M8. Status words: **done** = verified on this repository's evidence;
 | **M0** Close Config A (**partial**) | Clean reference snapshot | done | PR #12: schema 3.0.0 bundle, all repositories clean |
 | | Benchmark evidence | done | CPU baseline: Llama-3.2-1B Q4_K_M on 20 Arm cores, 256-token samples, mean decode 54.2 tokens/s |
 | | Native-boot rollback | done | First native boot returned to Linux on its own; BootNext consumed, Linux entry and kernel unchanged ([M2 evidence](../evidence/m2_first_boot_2026-09-24.md)) |
-| | Bootable recovery media | pending | The only USB stick holds a key backup, not a recovery system |
+| | Bootable recovery media | done on hardware | AIENOSRECOV boots with Secure Boot on and returns unattended (#53, [Gate 1 evidence](../evidence/gate1_machine1_selftest_2026-09-24.md)) |
 | **M1** UEFI/QEMU substrate | Automated emulator boot proof | done | PR #42 (SPCR/boot harness) and PR #44 (CI automation). Reaches EL2, discovers MADT/SPCR, reports kernel alive. (Note: distinct from TRUST-1 Gate 4 security test suite) |
 | **M2A** Spark firmware handoff | Memory map into early allocator | done on hardware | PR #10; 184 descriptors, 36 conventional regions, 0 rejected ([M2 evidence](../evidence/m2_first_boot_2026-09-24.md)) |
 | | GB10 PCI identity, BAR0, PMC_BOOT registers | built, not found on hardware | PR #11; pre-exit discovery reported `gb10: unavailable` although Linux sees it at `000f:01:00.0` |
@@ -56,14 +56,14 @@ only at M8. Status words: **done** = verified on this repository's evidence;
 **Overall gate status (2026-09-24):**
 
 ```text
-M0                     PARTIAL      snapshot PASS, benchmark PASS, rollback PASS, recovery media PENDING
+M0                     PARTIAL      snapshot PASS, benchmark PASS, rollback PASS, recovery media boots on Machine 1; Config A recovery_procedure stays documented_only until restore (Gate 1 items 12-14) is exercised
 M1 (QEMU substrate)    PASS         automated QEMU boot in CI (PR #42, #44)
 M2                     PASS         first native Spark boot
 Machine 1 core         PASS         core operational baseline recorded (PR #41)
 TRUST-1 Gate 0         DECLARED     baseline recorded (PR #46); independent key access pending attended proof
-TRUST-1 Gate 1         TOOLING PASS RAM-only recovery builder + QEMU zero-disk proof; physical USB boot pending
+TRUST-1 Gate 1         PARTIAL      stick boots on Machine 1 with Secure Boot on, inspects SB/PCRs/disks, returns (items 1-5, 7, 8, 15, 16 PASS; 6 partial); items 9-14 + artifact round trip pending
 TRUST-1 Gate 4         TOOLING PASS swTPM + soak + fault injection (PR #48); 100-boot campaign pending
-NEXT HARD GATE:        Physical Gate 1 USB boot on Spark -> Gate 2 TPM campaign -> Gate 3 owner keys -> M3
+NEXT HARD GATE:        Gate 0 key proof (decrypt on MacBook) + Gate 1 items 9-14 -> Gate 2 TPM campaign -> Gate 3 owner keys -> M3
 ```
 
 Public roadmap and contributor entry points: [ROADMAP.md](../ROADMAP.md).
diff --git a/evidence/gate1_machine1_selftest_2026-09-24.md b/evidence/gate1_machine1_selftest_2026-09-24.md
new file mode 100644
index 00000000..aa82223e
--- /dev/null
+++ b/evidence/gate1_machine1_selftest_2026-09-24.md
@@ -0,0 +1,86 @@
+# TRUST-1 Gate 1: recovery stick boots on Machine 1 (2026-09-24)
+
+Result: **partial PASS on hardware.** The dedicated recovery stick boots on
+Machine 1 with Secure Boot on, runs entirely from RAM, finds the keyboard,
+the stick and the internal NVMe, reads Secure Boot state and TPM PCRs, saves
+its report, and returns to Linux on its own. The unlock, reinstall and
+restore items (9 to 14) and the test-artifact round trip are not done yet.
+
+## What ran
+
+- Media: `AIENOSRECOV` (1 GB USB stick, USB serial 5D0344B4, vfat UUID
+  3511-E686, GPT PARTUUID f227357c-1e80-4fd0-a55e-2efbef1dd25c), written by
+  `scripts/build_recovery_media.sh` at main 0379b2f (#53). This is the former
+  ATLAS_RECOV stick; the operator authorized wiping it on 2026-09-24.
+- Trigger: `aienos-selftest-once` flag on the stick, `efibootmgr -n 0004`,
+  `shutdown -r` at 08:07:31 CDT. No keyboard input.
+- Boot chain: firmware -> `EFI/BOOT/BOOTAA64.EFI` (Ubuntu shim, identical to
+  the internal `EFI/ubuntu/shimaa64.efi`) -> signed GRUB -> signed kernel
+  7.0.0-1019-nvidia -> RAM initrd.
+
+| File on the stick | SHA-256 |
+|---|---|
+| `EFI/BOOT/BOOTAA64.EFI` | `706f15b9578f780a2fddda8ee0806cd15b59124692cc297db320414a5a40fe44` |
+| `EFI/BOOT/grubaa64.efi` | `b9d9dd81845d68a1f1867b5bcf26393908a9a349e749ce8ea944a1066d9abfcc` |
+| `EFI/BOOT/mmaa64.efi` | `afc533e2ccc208cd1fa6e1e88a3d6a79faa1de5eb0f2d58eab2fdd228b0021df` |
+| `EFI/BOOT/grub.cfg`, `EFI/ubuntu/grub.cfg` | `e551c5175c8b62de98cf6fbffb11c8702d451c751060062b92eff8123c9b7b91` |
+| `aienos-recovery/vmlinuz` | `ddd5a25c2326fbfdf7e03809c614fafe5a953416bbb1b80f9c2258f7260e44e3` |
+| `aienos-recovery/initrd.img` | `d04ede86813c347a41ec7f24674c3a07555fae5719c0202c0361b5c0b3f2b390` |
+
+## Evidence
+
+- Report written by the recovery environment to the stick, copied verbatim:
+  [gate1_machine1_selftest_report_2026-09-24.txt](gate1_machine1_selftest_report_2026-09-24.txt)
+  (SHA-256 `3a4a6deb894e61527557968c3591fbfb31029779921d428921235caca7b89486`).
+- Operator photograph of the Machine 1 screen at 13:09:48Z showing the same
+  report and the self-test countdown. Kept offline because phone photos carry
+  location metadata; SHA-256
+  `01f77ba2a06620de2ceaab9d196b1948d3063f907a67f65ef69222fa39e0dfa6`.
+- After return: `BootCurrent: 0001`, BootNext consumed, BootOrder unchanged
+  (`0001,0003,0004`), flag removed from the stick, `mokutil --sb-state`
+  enabled, `atlas-private-storage` active.
+
+## Gate 1 acceptance (TRUST-1 plan, all with Secure Boot on)
+
+| # | Test | Result |
+|---|---|---|
+| 1 | Firmware accepts recovery image | PASS: `BootCurrent: 0004` inside the recovery report |
+| 2 | Starts without internal Linux | PASS: RAM root, internal NVMe never mounted |
+| 3 | No network required | PASS: the image has no network configuration or network tools |
+| 4 | No model required | PASS |
+| 5 | No Cortex required | PASS |
+| 6 | Identifies NVMe and encrypted volumes | PARTIAL: NVMe and partitions identified; the gocryptfs private store lives inside the ext4 root and is not identified |
+| 7 | Inspects Secure Boot state | PASS: `Secure Boot: enabled`, lockdown `integrity` |
+| 8 | Inspects PCRs | PASS: PCR 0 and 7 equal the Gate 0 baseline values |
+| 9 | Shows AIENOS A/B slots and manifests | PENDING: A/B slots do not exist yet |
+| 10 | Verifies signatures/hashes | PENDING |
+| 11 | Independent recovery only when authorized | PENDING |
+| 12 | Mounts recovered storage safely | PENDING |
+| 13 | Reinstalls known-good loader/slot | PENDING |
+| 14 | Restores documented boot config | PENDING (boot entries are read; efivarfs is mounted read-only) |
+| 15 | Returns to known-good Linux | PASS: restarted unattended, Linux default boot |
+| 16 | No destructive overwrite | PASS: the only write was the report and flag removal on the stick |
+| - | Test-artifact round trip | PENDING |
+| - | Keyboard | PASS for detection (HP Wired Desktop 320K and Logitech devices bound); typing not exercised in this unattended run |
+
+## Findings
+
+- **First attempt failed with "Secure Boot Violation".** A firmware boot entry
+  `Boot0000 "AIENOS"` had been created outside Linux pointing directly at
+  `\aienos-recovery\vmlinuz`, bypassing shim; the firmware db does not trust
+  the Ubuntu kernel signature directly. The stick itself was not at fault.
+  The entry was deleted with operator approval.
+- **Existing Linux boot race.** On this boot and the previous normal boot,
+  the first `atlas-private-storage` unseal failed with TPM error 0x128
+  (`TPM_RC_PCR_CHANGED`) and the automatic retry succeeded. It predates the
+  recovery boot; PCR 7 is unchanged.
+- **Tooling defects fixed in #53:** no kernel modules in the initrd (no USB,
+  keyboard or NVMe), shell on the unreachable serial console, and `/bin/blkid`
+  silently missing from the initrd (the earlier Gate 1 receipt lists it).
+
+## Offline key custody (Gate 0 follow-up)
+
+`atlas-forge-state-luks-recovery-key.txt.age` (age recipient tag `+4nykQ`,
+the operator's MacBook SSH key) now exists as ciphertext on Machine 1 and on
+the operator MacBook. Decryption has still not been exercised; Gate 0's
+independent-access proof remains open.
diff --git a/evidence/gate1_machine1_selftest_report_2026-09-24.txt b/evidence/gate1_machine1_selftest_report_2026-09-24.txt
new file mode 100755
index 00000000..368fddef
--- /dev/null
+++ b/evidence/gate1_machine1_selftest_report_2026-09-24.txt
@@ -0,0 +1,40 @@
+============================================================
+AIENOS Standalone Hardware Recovery Core
+Root filesystem: 100% RAM disk (Self-contained)
+Internal NVMe status: UNMOUNTED
+============================================================
+
+Secure Boot: enabled
+Kernel lockdown: none [integrity] confidentiality
+Kernel modules loaded: 16/16
+Input devices: 7
+  Power Button
+  Lid Switch
+  Sleep Button
+  Logitech M510
+  Chicony  HP Wired Desktop 320K Keyboard
+  Chicony  HP Wired Desktop 320K Keyboard Consumer Control
+  Chicony  HP Wired Desktop 320K Keyboard System Control
+Kernel: 7.0.0-1019-nvidia  Clock (UTC): 2026-09-24T13:09:45Z
+TPM PCR 0 (sha256): 3D458CFE55CC03EA1F443F1562BEEC8DF51C75E14A9FCF9A7234A13F198E7969
+TPM PCR 7 (sha256): D76B3540204A6CE15763B17036028603ADF9774A03D91BFDA2792D8E91CF3046
+
+Block device topology:
+NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
+sda           8:0    1  960M  0 disk 
+`-sda1        8:1    1  958M  0 part 
+nvme0n1     259:0    0  3.7T  0 disk 
+|-nvme0n1p1 259:1    0  298M  0 part 
+`-nvme0n1p2 259:2    0  3.7T  0 part 
+  /dev/sda1: DEVNAME=/dev/sda1 LABEL=AIENOSRECOV UUID=3511-E686 TYPE=vfat 
+  /dev/nvme0n1p1: DEVNAME=/dev/nvme0n1p1 LABEL=EFI UUID=9DA2-3597 TYPE=vfat 
+  /dev/nvme0n1p2: DEVNAME=/dev/nvme0n1p2 LABEL=root UUID=d27bfd26-ff30-400e-9eca-9cdf73de9406 TYPE=ext4 
+
+Firmware boot entries:
+  BootCurrent: 0004
+  Timeout: 1 seconds
+  BootOrder: 0001,0003,0004
+  Boot0001* ubuntu	HD(1,GPT,7c2b24e9-0ceb-4ad7-a401-9bf3c92c26ee,0x800,0x95000)/File(\EFI\ubuntu\shimaa64.efi) File(.)
+  Boot0003* UEFI: PXE IPv4 Realtek PCIe 10 GBE Family Controller	PcieRoot(0x7)/Pci(0x0,0x0)/Pci(0x0,0x0)/MAC(4cbb472bb87b,0)/IPv4(0.0.0.00.0.0.0,0,0)0000424f
+  Boot0004* UEFI: USB USB Hard Drive, Partition 1	VenHw(0d51905b-b77e-452a-a2c0-eca0cc8d514a,0000b91d0000000000)/USB(1,0)/USB(1,0)/HD(1,GPT,f227357c-1e80-4fd0-a55e-2efbef1dd25c,0x800,0x1df000)0000424f
+