Repository navigation
v0.11.0 — boot-test in a VM + install gate
Answer to "can't we test in QEMU before rebooting?" — yes. Now built in.
`autokernel boot-test` smoke-tests the freshly-built kernel in a VM in 5-15 seconds, BEFORE `autokernel install --execute` lets you touch `/boot`.
How it works
Two methods, picked automatically:
| Method | Setup | What it tests |
|---|---|---|
| virtme-ng (preferred) | `pip install virtme-ng` | Boots against the host's read-only / over virtio-fs. Reaches userspace. |
| QEMU kernel-only (fallback) | `apt install qemu-system-x86` (or distro equiv) | Boots with no rootfs; success = kernel reaches the VFS-mount stage without an earlier panic. |
A passing test writes `/boot-test.json` with the bzImage's SHA-256. `autokernel install --execute` then refuses to proceed unless a passing record exists. Override with `--skip-boot-test` if you've verified some other way.
What this addresses
The most common failure mode of building a custom kernel is "it doesn't boot." Without boot-test, you find out by rebooting your machine. With boot-test, you find out in seconds, on the host, with no risk to `/boot`.
```
$ autokernel boot-test /tmp/snap --kernel-source ~/linux-source
✓ PASS reason: boot reached VFS mount stage with no earlier panic
method: qemu (kernel-only)
duration: 4.2s
record: /tmp/snap/boot-test.json
$ autokernel install /tmp/snap --execute --kernel-entry "Linux 6.13.5"
✓ boot-test on record (2026-05-08, method=qemu)
✓ kernel installed
```
Tests
543 total, ~4s. 30 new tests cover the QEMU/virtme planner, serial-output verdict logic, install-gate composition.
Roadmap
- systemd watchdog for auto-promoting after N successful boots
- systemd-boot / rEFInd support for `install`
- Local LLM auto-detection (ollama)
- Userspace package recompilation (separate decision)