MCPcopy Index your code
hub / github.com/aegis-boot/aegis-boot

github.com/aegis-boot/aegis-boot @v0.19.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.19.3 ↗ · + Follow
2,881 symbols 7,693 edges 104 files 578 documented · 20%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
    ╔═══════════════╗
    ║   ▄███████▄   ║
    ║  ███████████  ║
    ║  ███┌───┐███  ║
    ║  ███│ ◆ │███  ║
    ║  ███│   │███  ║
    ║  ███└─▲─┘███  ║
    ║  ▀█████████▀  ║
    ║    ▀█████▀    ║
    ╚═══════════════╝

aegis-boot

Signed boot. Any ISO. Your keys.

A signed UEFI Secure Boot rescue environment that lets operators pick any ISO from a USB stick's data partition and kexec into it — without leaving the chain of trust.

License Latest Release CI OpenSSF Scorecard

Status: pre-1.0. CHANGELOG.md has the per-release detail; v1.0.0 is gated on the multi-vendor real-hardware sweep (#51).

See it in action

Three CLI demos that load instantly — no setup, no flash, no risk to any disk:

aegis-boot tour — what aegis-boot is in 30 seconds, with the 4-command path to a working stick:

aegis-boot tour — terminal walkthrough of the 4-command path

aegis-boot recommend — browse the curated catalog of 20 known-good ISOs, each marked with its Secure Boot signing chain:

aegis-boot recommend — curated catalog with per-ISO Secure Boot status

aegis-boot recommend ubuntu-24.04-live-server — drill into a single entry to see the verified-download recipe:

aegis-boot recommend ubuntu-24.04-live-server — per-ISO verify recipe

Deeper-dive demos of the destructive flash flows + the rescue-tui under QEMU + OVMF SecureBoot are tracked in #348 — those need real hardware (or a loop device) to record.

What it does

  1. Flash an aegis-boot image to a USB stick (aegis-boot flash or dd).
  2. Drop .iso files onto the AEGIS_ISOS partition.
  3. Boot the stick on any UEFI machine with Secure Boot enabled.
  4. A minimal ratatui TUI lists the ISOs; the operator selects one.
  5. kexec_file_load(2) hands off to the selected ISO's kernel.

Boot chain: UEFI firmware → shim (MS-signed) → grub (Canonical-signed) → rescue kernel → our initramfs → rescue-tui → kexec_file_load → selected ISO's kernel. Full rationale: ADR 0001.

How it differs from Ventoy / Rufus / balenaEtcher

Tool Boots arbitrary ISOs Preserves Secure Boot chain Per-ISO trust decision
aegis-boot yes yes — kernel-level signature check via KEXEC_SIG yes — operator enrolls keys per distro
Ventoy yes weakened — one shared MOK key trusts every Ventoy-booted kernel no
Rufus one ISO at a time depends on ISO; no orchestration n/a
balenaEtcher one ISO at a time depends on ISO; no orchestration n/a

aegis-boot is the right pick when you need to boot operator-supplied ISOs without disabling Secure Boot or trusting a global third-party MOK. Unsigned ISO kernels are refused with a clear error and a mokutil --import command for the specific signing key — see docs/UNSIGNED_KERNEL.md.

Quickstart — operators

Install the operator CLI:

Platform Status
Linux x86_64 Full support — flash + build, add ISOs, kexec, attest, doctor, compat
macOS (Apple Silicon, arm64) Pre-built binary shipped (#365 Phase A1). Drive detection + flash --image PATH (#229). Image building requires Linux (mkusb.sh deps); use aegis-boot fetch-image (zero-arg, auto-resolves to latest release + cosign-verifies the signed .img#235) then pipe to flash --image $(...). Binary is ad-hoc codesigned but not yet notarized (Phase A2) — brew install is unaffected; direct downloads may trip Gatekeeper on first launch, see docs/INSTALL.md § macOS (Apple Silicon).
macOS (Intel, x86_64) Deferred — maintainer decision to ship arm64 first (#365). Build from source with cargo install --path crates/aegis-cli.
Windows x86_64 Recommended: Rufus + the pre-built .img. Download the signed aegis-boot-<version>.img from GitHub Releases, open Rufus, pick the image + your USB stick, click Start. Rufus is battle-tested for USB-image writes and is already the tool Windows operators reach for. Advanced: aegis-boot compiles on Windows too (cargo install --path crates/aegis-cli) and flash --direct-install works natively via windows-rs (#419 epic closed 2026-04-24) — useful for CLI-first operators + CI automation.

Pre-built binaries ship today for Linux x86_64 and macOS arm64 (Apple Silicon). On Windows, the recommended path is Rufus + our signed .img — no need to install the aegis-boot CLI. Intel-Mac / Windows operators who want the CLI anyway can build from source (cargo install --path crates/aegis-cli).

# Cosign-verified install from the latest GitHub release.
curl -sSL https://raw.githubusercontent.com/aegis-boot/aegis-boot/main/scripts/install.sh | sh

# OR via Homebrew (macOS Apple Silicon only):
brew tap aegis-boot/aegis-boot https://github.com/aegis-boot/aegis-boot
brew install aegis-boot

# OR on NixOS / with Nix installed:
nix run github:aegis-boot/aegis-boot -- flash /dev/sdX --yes
# Or persist: nix profile install github:aegis-boot/aegis-boot

# Or pin a version: sh install.sh --version v0.15.0
# Or skip cosign (NOT recommended): sh install.sh --no-verify
# Build from source: see BUILDING.md.

Each release ships a static-musl aegis-boot-x86_64-linux binary plus its Sigstore cosign signature + certificate; the installer checks the cert is bound to this repo's release.yml workflow before installing. See docs/RELEASE_NOTES_FOOTER.md for the manual cosign verify-blob recipe.

Then the operator flow — pick one:

Fastest path — aegis-boot quickstart

# Empty stick → booted rescue with Alpine 3.20 in under 10 min (#352)
sudo aegis-boot quickstart /dev/sdc

Thin wrapper over init --profile minimal --yes --direct-install. Single signed-chain stick + Alpine 3.20 Standard (~200 MiB) ready in the rescue-tui menu. Device argument is required — no auto-detect, by deliberate design (data-loss risk on a misclassified mount). See aegis-boot quickstart.

Three-distro kit — aegis-boot init

# Empty stick → rescue-ready with 3 ISOs (~5 GiB)
sudo aegis-boot init /dev/sdc --yes

Composes doctor → flash → fetch + add for every ISO in the default panic-room profile (Alpine 3.20 + Ubuntu 24.04 Server + Rocky 9). Produces one attestation manifest spanning the whole run. See aegis-boot init for profiles and options.

Step-by-step — when you want a custom ISO set

# 0. (recommended) check host + stick health before doing anything destructive
aegis-boot doctor

# 1. browse the curated catalog — known-good signed-or-MOK-needed ISOs
aegis-boot recommend
aegis-boot recommend ubuntu-24.04-live-server   # one entry's download recipe

# 2. write aegis-boot to a USB stick (3-step guided; auto-detects removable drives)
sudo aegis-boot flash             # or: sudo aegis-boot flash /dev/sdc

# 3. add ISOs to the stick (auto-detects mount; copies sidecars too)
aegis-boot add ~/Downloads/ubuntu-24.04.2-live-server-amd64.iso
aegis-boot list                   # show what's on the stick

# 4. plug the stick into a target machine, boot from it (UEFI + SB enabled)
#    The TUI discovers ISOs, shows verification status, and kexecs on Enter.

Operator end-to-end walkthrough: docs/INSTALL.md. Common errors and their fixes: docs/TROUBLESHOOTING.md.

Quickstart — developers

cargo build --release
./scripts/build-initramfs.sh
./scripts/mkusb.sh                # produces out/aegis-boot.img

# Boot the simulated stick under QEMU + OVMF SecBoot
mkdir -p test-isos && cp ~/Downloads/*.iso test-isos/
./scripts/qemu-loaded-stick.sh -d ./test-isos -a usb -i

Full developer loop: docs/LOCAL_TESTING.md.

Components

Crate Role
aegis-cli Operator CLI — aegis-boot init, flash, add, list, doctor
iso-parser ISO media analysis — finds kernel/initrd/cmdline in distro boot configs
iso-probe Runtime discovery + sibling .sha256 / .minisig verification + installer-vs-live heuristics
kexec-loader Safe wrapper over kexec_file_load(2) with error classification
rescue-tui ratatui application the operator sees; hard-blocks kexec on hash/sig failure
aegis-fitness Repo / build / artifact health audit (9 checks)

Documentation

For operators

For contributors

Security

  • SECURITY.md — vulnerability reporting (use private advisory; 7-day ack SLA)
  • THREAT_MODEL.md — UEFI Secure Boot threat model (PK/KEK/MOK/SBAT)

Project

Runtime configuration

rescue-tui reads these environment variables (set on the kernel cmdline or in the /init script):

Variable Default Purpose
AEGIS_ISO_ROOTS /run/media:/mnt Colon-separated dirs to scan for .iso files
AEGIS_THEME default Theme: default, monochrome (serial/screen-reader), high-contrast (low-contrast framebuffers), okabe-ito (colorblind-safe, aliases: cb, colorblind), or aegis (brand). Also readable as aegis.theme=<name> on kernel cmdline.
AEGIS_AUTO_KEXEC unset Substring; first matching ISO is kexec'd without operator confirmation
AEGIS_A11Y unset 1 enables text-only mode (also auto-enabled when TERM=dumb)
AEGIS_LOG_JSON unset 1 switches tracing output to JSON for journalctl --output=json
AEGIS_STATE_DIR /var/lib/aegis-boot Where last-booted state is persisted

scripts/mkusb.sh reads: OUT_DIR, IMG, DISK_SIZE_MB (default 2048), ESP_SIZE_MB (400), DATA_LABEL (AEGIS_ISOS), DATA_FS (exfat default, also fat32 or ext4; #243), SHIM_SRC, GRUB_SRC, KERNEL_SRC, INITRD_SRC.

Build environment

  • Rust 1.95.0 (build-toolchain pin in Dockerfile.locked + rust-toolchain.toml; MSRV is 1.88, declared via rust-version in workspace Cargo.toml)
  • Ubuntu 22.04 base (Docker) or a Nix flake
  • No EDK II / UEFI toolchain — we use shim + signed distro kernels instead

License

Dual-licensed under either of:

at your option. Contributions are accepted under the same dual license; see CONTRIBUTING.md.

See NOTICE for upstream attribution of the signed Secure Boot components (shim, grub, kernel) distributed as part of aegis-boot media.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 2,313
Method 310
Class 162
Enum 89
Interface 7

Languages

Rust100%
Ruby1%

Modules by API surface

crates/rescue-tui/src/state.rs224 symbols
crates/aegis-cli/src/doctor.rs131 symbols
crates/aegis-cli/src/inventory.rs118 symbols
crates/rescue-tui/src/render.rs116 symbols
crates/aegis-wire-formats/src/lib.rs112 symbols
crates/aegis-cli/src/flash.rs106 symbols
crates/iso-parser/src/lib.rs87 symbols
crates/aegis-cli/src/update.rs79 symbols
crates/aegis-cli/src/direct_install_manifest.rs64 symbols
crates/aegis-cli/src/bug_report.rs59 symbols
crates/aegis-cli/src/direct_install.rs54 symbols
crates/aegis-cli/src/windows_direct_install/raw_write.rs53 symbols

For agents

$ claude mcp add aegis-boot \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page