iso-probe
Runtime ISO discovery for a live rescue environment. Given a set of root paths (typically the AEGIS_ISOS partition mounted at /run/media/aegis-isos), finds every .iso, loop-mounts it once, extracts per-ISO boot metadata via iso-parser, and returns metadata records suitable for display in a TUI.
Part of the aegis-boot rescue environment — a signed-chain UEFI Secure Boot stick that boots any ISO.
Two-phase API
discover— scan roots, mount each ISO once, extract kernel/initrd/cmdline paths, unmount. ReturnsDiscoveredIsorecords — metadata only, no live mounts. Safe to display as a picker.prepare— given a user-selectedDiscoveredIso, re-mount the ISO and return aPreparedIsowhose absolute paths can be fed tokexec-loader::load_and_exec. Mount persists untilPreparedIsois dropped, or untilkexecreplaces the process on the success path.
Design
- Forbid unsafe. Mounting + loopback + path manipulation only. No raw syscalls.
- Sidecar verification. If
<iso>.sha256or<iso>.minisigis present next to the ISO, verifies before reporting. Usesminisign-verifyfor Ed25519 signatures andsha2for digests. - Sync-only API. Callers drive async elsewhere if they want;
pollsteris available for sync-over-async bridging.
Usage
// Illustrative shape only. Types and paths are consumer-specific;
// the real API is documented in the `discover` and `prepare` items
// below.
use iso_probe::{discover, prepare};
let discovered = discover(&["/run/media/aegis-isos"])?;
for iso in &discovered {
println!("{} ({})", iso.label, iso.verification.display_summary());
}
// Operator picks one:
let prepared = prepare(&discovered[0])?;
kexec_loader::load_and_exec(&prepared.kernel, &prepared.initrd, &prepared.cmdline)?;
See the API docs for the full surface.
Status
Pre-1.0. API is settling through real-hardware validation on the parent project's test fleet. Publishing to crates.io at 1.0. Until then, consume via the aegis-boot workspace.
License
Licensed under either of Apache-2.0 or MIT at your option.