feat(vm): rebuild live ISO from HEAD, harden run-vm.sh, open interactive VM
This commit is contained in:
parent
11c0ee0014
commit
0b41781745
4 changed files with 119 additions and 3 deletions
|
|
@ -3,6 +3,45 @@
|
|||
All notable changes are recorded here. The authoritative history is `git log`;
|
||||
this file is the curated, human-readable summary.
|
||||
|
||||
## 2026-09-26 — Live ISO rebuilt from HEAD, interactive VM open
|
||||
|
||||
- **New live ISO built from HEAD (`11c0ee0`).**
|
||||
`installer/live/phoebus-installer-amd64-20260926.iso` (1.6 GiB, SHA-256
|
||||
`250dbe9a…`, build id `20260926T041500Z`) was built with
|
||||
`PHOEBUS_REUSE_ROOTFS=1` after verifying the static `phoebus-installer`
|
||||
(`25741706…`) and `sys` (`3b331643…`) are fingerprint-fresh for HEAD. The
|
||||
Sep-24 ISO predates the stage3/boot-security hardening and is kept
|
||||
alongside, not overwritten. Filesystem-inspected (not just timestamped):
|
||||
the embedded binaries hash-match the fresh build, the provisioned Gentoo
|
||||
key carries both published fingerprints (`13EB…2910`, `D99E…2058`),
|
||||
`gpg`/`mango`/`dms`/quickshell welcome+installer UI are present, and
|
||||
`/etc/phoebus/version` + `/etc/phoebus/build` carry `0.1.0` and the build
|
||||
id.
|
||||
- **Interactive VM open for the owner.** A fresh unique 30 GiB qcow2 plus
|
||||
private OVMF vars boots the new ISO in a visible KVM/GTK window
|
||||
(`installer/tests/vm/run-vm.sh`); screenshot-verified at the branded
|
||||
welcome ("Install Phoebus OS", Live medium 0.1.0, network/UEFI/RAM/CPU
|
||||
chips). Left running, installer untouched, no passwords or model
|
||||
credentials entered.
|
||||
- **`run-vm.sh` is safer for user-facing launches:** new `--disk-name`
|
||||
(unique disk per run) and `--display` options, and a TCG fallback that
|
||||
switches `-cpu host` to `-cpu max` with a performance warning when
|
||||
`/dev/kvm` is not writable (the old `-cpu host` choice fails without
|
||||
KVM). The one `shellcheck` SC2054 warning on the QEMU array pre-existed
|
||||
at HEAD and is unchanged.
|
||||
- **Unpinned signed-DIGESTS install proof running.** `gui-driver.py
|
||||
install` boots the new ISO on a disposable disk and installs through the
|
||||
default unpinned stage3 path with the ISO-embedded fail-closed binary
|
||||
(empty `STAGE3_URL` resolves latest from Gentoo autobuilds; fixed trust
|
||||
anchor). Automated-harness `--no-ai` is test-only evidence, not the
|
||||
normal user path. Partitioning + LUKS2 + Btrfs stages already passed in
|
||||
the guest; completion and detached boot pending.
|
||||
- **Release gates stay truthful:** `gates --execute` in an unconfigured
|
||||
shell reports 0 passed / 0 failed / 6 NotRun with exact missing
|
||||
prerequisites; nothing published. Quality gates green: `cargo fmt`,
|
||||
`clippy --workspace --all-targets -- -D warnings`, `cargo test
|
||||
--workspace` 717/717, `test_vmsafety.py` 18/18, release + static builds.
|
||||
|
||||
## 2026-09-26 — Security and release-readiness: trust anchor, executable gates, strengthened rollback
|
||||
|
||||
- **Stage3 trust anchor is fixed in code.** `release_key_path()` no longer
|
||||
|
|
|
|||
|
|
@ -3,6 +3,24 @@
|
|||
Rolling note between work sessions. **Update this file before you finish**, then
|
||||
commit it. It should be short and current; use `git log` for detail.
|
||||
|
||||
- **ISO rebuild + interactive VM (2026-09-26, in progress):** new ISO
|
||||
`installer/live/phoebus-installer-amd64-20260926.iso` (1.6 GiB, SHA-256
|
||||
`250dbe9a…`, build `20260926T041500Z`, from HEAD `11c0ee0`) built via
|
||||
`PHOEBUS_REUSE_ROOTFS=1`; embedded `phoebus-installer`/`sys` hash-match
|
||||
the fresh static build, Gentoo key has both fingerprints, UI payload
|
||||
present. Interactive VM RUNNING (KVM/GTK, fresh
|
||||
`phoebus-interactive-20260926.qcow2` + private vars in
|
||||
`/var/tmp/phoebus-interactive/`, screenshot at welcome). Unpinned
|
||||
signed-DIGESTS full install RUNNING (`gui-install-20260926T040728Z-f3ae68f4`
|
||||
on `disks/unpinned-accept-1.qcow2`, guest past partitioning/LUKS/Btrfs;
|
||||
`--no-ai` is test-only). `run-vm.sh` gained `--disk-name`/`--display` +
|
||||
TCG `-cpu max` fallback. `gates --execute`: 0/0/6 NotRun, truthful, no
|
||||
publish. Quality gates green (717/717, clippy -D warnings, vmsafety
|
||||
18/18). Old Sep-24 ISO kept alongside. Next: finish unpinned
|
||||
install+detached boot, tamper refusals, recovery-entry boot, seat
|
||||
desktop, live AI, snap revision/strict, nix GC recheck — then commit docs
|
||||
evidence.
|
||||
|
||||
- **Security/readiness follow-up (2026-09-26):** trust anchor + executable
|
||||
gates + strengthened rollback PASS.
|
||||
1. **Stage3 trust anchor (fixed):** `release_key_path()` ignores
|
||||
|
|
|
|||
|
|
@ -831,6 +831,47 @@ detached boot verification with the live ISO removed.
|
|||
partial-confinement/no-op-refresh evidence stays labeled as such); NVIDIA
|
||||
needs a GPU or authorized passthrough (see below).
|
||||
|
||||
## 2026-09-26 — Live ISO rebuild from HEAD + unpinned install proof (IN PROGRESS)
|
||||
|
||||
- **Rebuilt ISO.** `installer/live/phoebus-installer-amd64-20260926.iso`
|
||||
(1.6 GiB, SHA-256
|
||||
`250dbe9ad780408a40b7b7f0757791fadcc1e4309b932e98f6059c7baf93e2e5`,
|
||||
build id `20260926T041500Z`) built from HEAD `11c0ee0` with
|
||||
`PHOEBUS_REUSE_ROOTFS=1` (cached `livefs.tar` reused for the Debian
|
||||
rootfs; payload, binaries, key and branding re-installed fresh — reuse
|
||||
does not carry stale binaries, UI or keys). The Sep-24
|
||||
(`827bf843…`) ISO predates the stage3 fail-closed + trust-anchor +
|
||||
boot-security commits and is kept alongside.
|
||||
- **Content inspection (not timestamps).** The finished squashfs was
|
||||
listed and selectively extracted: embedded
|
||||
`/usr/local/bin/phoebus-installer` (`25741706…`) and `/usr/local/bin/sys`
|
||||
(`3b331643…`) hash-match the fingerprint-fresh static build;
|
||||
`/usr/share/openpgp-keys/gentoo-release.asc` (57,698 bytes) shows both
|
||||
published fingerprints (`13EB…2910` weekly, `D99E…2058` signing) under
|
||||
`gpg --show-keys`; `/usr/bin/gpg`, `/usr/bin/mango`, `/usr/bin/dms`,
|
||||
the welcome/installer `shell.qml` configs, the install desktop entry and
|
||||
`/etc/phoebus/{version,build,live}` (`0.1.0`,
|
||||
`PHOEBUS_BUILD_ID=20260926T041500Z`) are all present.
|
||||
- **Unpinned signed-DIGESTS install (running).**
|
||||
`gui-driver.py install` run `gui-install-20260926T040728Z-f3ae68f4`
|
||||
boots the new ISO on disposable
|
||||
`disks/unpinned-accept-1.qcow2` (30 GiB) and installs with the
|
||||
ISO-embedded fail-closed binary and a served `test.conf` with **no**
|
||||
`STAGE3_URL`/`STAGE3_SHA256` (empty URL resolves latest-stage3 from
|
||||
Gentoo autobuilds; signed DIGESTS verified against the fixed provisioned
|
||||
key). Guest progress: live login passed, partitioning/LUKS2/Btrfs
|
||||
complete, install stages running. The harness `--no-ai` flag is
|
||||
**test-only** evidence and is not the normal user path (the wizard
|
||||
requires a connected model; the interactive VM below is left for the
|
||||
owner to drive by hand).
|
||||
- **Interactive VM (open).** The new ISO boots a KVM/GTK VM with a fresh
|
||||
unique disk (`phoebus-interactive-20260926.qcow2`) and private OVMF vars
|
||||
in `/var/tmp/phoebus-interactive/`; screenshot shows the Mango top bar
|
||||
and the branded welcome ("Install Phoebus OS", Live medium 0.1.0).
|
||||
- Still pending on this run: install completion + detached boot, tampered
|
||||
signature/digest/archive refusal on disposable targets, recovery-entry
|
||||
boot, seat desktop, live AI, snap revision/strict, nix GC recheck.
|
||||
|
||||
## Known remaining work
|
||||
|
||||
- The graphical session was verified with the **headless** wlroots backend
|
||||
|
|
|
|||
|
|
@ -12,10 +12,12 @@ set -euo pipefail
|
|||
|
||||
ISO=""
|
||||
DISK_SIZE="32G"
|
||||
DISK_NAME="phoebus-test"
|
||||
WORKDIR="${TMPDIR:-/tmp}/phoebus-vm"
|
||||
MEM="4096"
|
||||
CPUS="4"
|
||||
BOOT="d"
|
||||
DISPLAY_OPT="gtk"
|
||||
EXTRA=()
|
||||
|
||||
usage() {
|
||||
|
|
@ -25,9 +27,13 @@ Usage: run-vm.sh --iso PATH [options]
|
|||
Options:
|
||||
--iso PATH Live ISO to boot (required)
|
||||
--disk-size SIZE Scratch disk size (default 32G)
|
||||
--disk-name NAME Scratch disk file name inside the workdir
|
||||
(default phoebus-test; the file is NAME.qcow2, so each
|
||||
interactive or automated run can use a unique disk)
|
||||
--workdir DIR Directory for the scratch disk (default /tmp/phoebus-vm)
|
||||
--mem MiB RAM in MiB (default 4096)
|
||||
--cpus N vCPUs (default 4)
|
||||
--display OPT QEMU display (default gtk; use none for headless)
|
||||
--disk-boot Boot from the scratch disk instead of the ISO
|
||||
--help Show this help
|
||||
|
||||
|
|
@ -39,9 +45,11 @@ while (($#)); do
|
|||
case "$1" in
|
||||
--iso) shift; ISO="${1:-}" ;;
|
||||
--disk-size) shift; DISK_SIZE="${1:-}" ;;
|
||||
--disk-name) shift; DISK_NAME="${1:-}" ;;
|
||||
--workdir) shift; WORKDIR="${1:-}" ;;
|
||||
--mem) shift; MEM="${1:-}" ;;
|
||||
--cpus) shift; CPUS="${1:-}" ;;
|
||||
--display) shift; DISPLAY_OPT="${1:-}" ;;
|
||||
--disk-boot) BOOT="c" ;;
|
||||
--help|-h) usage; exit 0 ;;
|
||||
*) echo "unknown option: $1" >&2; usage; exit 2 ;;
|
||||
|
|
@ -75,7 +83,7 @@ done
|
|||
[[ -n "$OVMF_CODE" ]] || { echo "error: OVMF firmware not found" >&2; exit 1; }
|
||||
|
||||
mkdir -p "$WORKDIR"
|
||||
DISK="$WORKDIR/phoebus-test.qcow2"
|
||||
DISK="$WORKDIR/${DISK_NAME}.qcow2"
|
||||
VARS="$WORKDIR/OVMF_VARS.fd"
|
||||
|
||||
if [[ ! -f "$DISK" ]]; then
|
||||
|
|
@ -86,8 +94,17 @@ if [[ ! -f "$VARS" ]]; then
|
|||
cp "$OVMF_VARS_SRC" "$VARS"
|
||||
fi
|
||||
|
||||
# KVM needs a writable /dev/kvm; without it `-cpu host` fails under TCG, so
|
||||
# fall back to `-cpu max` and warn. TCG is roughly an order of magnitude
|
||||
# slower than KVM: the live desktop still works but the installer stages
|
||||
# (especially package compilation) take much longer.
|
||||
ACCEL=()
|
||||
if [[ -w /dev/kvm ]]; then ACCEL=(-enable-kvm); fi
|
||||
CPU="host"
|
||||
if [[ -w /dev/kvm ]]; then ACCEL=(-enable-kvm); else
|
||||
CPU="max"
|
||||
echo "warning: /dev/kvm is not writable; using TCG emulation (-cpu max)." >&2
|
||||
echo "warning: expect roughly 5-10x slower execution than with KVM." >&2
|
||||
fi
|
||||
|
||||
echo "ISO: $ISO"
|
||||
echo "Disk: $DISK"
|
||||
|
|
@ -102,7 +119,8 @@ QEMU=(qemu-system-x86_64
|
|||
"${ACCEL[@]}"
|
||||
-m "$MEM"
|
||||
-smp "$CPUS"
|
||||
-cpu host
|
||||
-cpu "$CPU"
|
||||
-display "$DISPLAY_OPT"
|
||||
-drive if=pflash,format=raw,readonly=on,file="$OVMF_CODE"
|
||||
-drive if=pflash,format=raw,file="$VARS"
|
||||
-drive file="$DISK",if=virtio,format=qcow2
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue