Version: 0.17.0
Updated: December 2026
What is LamBoot?
LamBoot is a memory-safe UEFI bootloader written in Rust. It discovers and boots Linux kernels, Unified Kernel Images (UKIs), and other EFI applications from BLS (Boot Loader Specification) entries on the ESP. It provides a graphical boot menu, crash loop recovery, TPM measured boot, and built-in diagnostic tools, all in a single compact binary.
The binary is about 1.18 MB on x86_64 (1,234,944 bytes unsigned) and about 1.0 MB on aarch64, built from roughly 23,400 lines of Rust across 68 modules on stable Rust. It's licensed MIT OR Apache-2.0 and targets x86_64 and aarch64 UEFI.
LamBoot is designed for both bare-metal Linux systems and Proxmox/QEMU/KVM virtual machine fleets.
Key Features
- Graphical two-column boot menu with mouse and keyboard support
- BLS Type 1 entry discovery with UAPI.10 version sorting and boot counting
- Unified Kernel Image (UKI) support with PE section metadata extraction
- Preflight validation: advisory checks on every entry before you boot (see Preflight Validation)
- Crash loop detection with automatic fallback and VM snapshot awareness
- TPM 2.0 measured boot: kernel, config, and command line measured into PCRs
- Persistent boot logging: write-through during early boot, readable after the OS starts
- Loadable diagnostic modules: PCI inventory, memory test, interactive diagnostic shell
- Native filesystem reading: Reads ext4, btrfs, FAT, XFS, exFAT and ZFS natively, including on LVM, read in place by memory-safe Rust compiled into the loader, so non-FAT /boot partitions work directly. Releases carry no third-party filesystem drivers.
- Native PE loader: LamBoot loads the kernel itself rather than relying on firmware LoadImage
- Proxmox integration: VMID display, hookscript monitoring, fleet operations
- Secure Boot compatible: ShimLock verification, SBAT, signing pipeline
Boot Architecture (10 Phases)
LamBoot executes a structured 10-phase boot sequence. For the full technical description, see the Architecture Guide. In summary:
- Health assessment: check crash counter, detect VM snapshot restore
- Security and hardware detection: Secure Boot, TPM, SMBIOS, hypervisor, IOMMU
- Mount ESP: locate and mount the EFI System Partition
- Load policy: read
policy.tomlconfiguration - Load drivers: any UEFI filesystem driver you've added for a filesystem LamBoot doesn't read natively
- Enumerate volumes: discover additional partitions (XBOOTLDR, etc.)
- Discover boot entries: BLS entries, UKIs, Windows, other loaders, diagnostic tools
- Preflight validation: check each entry for potential issues
- Interactive menu: display the graphical boot menu, wait for selection
- Boot: record selection, measure into TPM, load kernel and initrd, hand off
Requirements
- Firmware: UEFI 2.0+ (OVMF for VMs, any UEFI firmware for bare metal)
- Architecture: x86_64 (primary), aarch64 (secondary)
- ESP: EFI System Partition (FAT32), typically mounted at
/boot/efi - Guest OS: Any Linux distribution with UEFI boot support. LamBoot uses the Boot Loader Specification (BLS) for entry discovery, which is supported by systemd-based distributions natively and can be set up on any Linux system.
- Installer requirements: bash 4.0+, GNU coreutils or uutils, util-linux, efibootmgr
LamBoot has been tested on Fedora 43, Debian 13 (forky/sid), Ubuntu 24.04, Arch Linux, and openSUSE Tumbleweed. Any UEFI-capable Linux distribution should work, because the installer auto-detects the distro and adapts its behavior (BLS entry generation, driver selection, initrd paths).
Quick Start
Install from Release
Download the latest release archive and run the installer:
tar xf lamboot-0.17.0-x86_64.tar.gz
cd lamboot-0.17.0
# Install to the local system (requires root)
sudo ./lamboot-install
# Verify
sudo efibootmgr | grep LamBoot
Build from Source
If building from source:
# Stable Rust. rust-toolchain.toml selects the toolchain and the UEFI
# targets, so rustup installs what is needed on the first build.
# Build all components
./build.sh
# Install from the build output
sudo tools/lamboot-install
# Or update an existing installation
sudo tools/lamboot-install --update
First Boot
- Reboot the system
- LamBoot appears if it's in the UEFI boot order (use
--set-defaultto make it first) - The boot menu shows discovered kernels on the left, tools on the right
- After the auto-boot timeout (default: 5 seconds), the first kernel boots automatically
The Boot Menu
LamBoot uses a two-column graphical menu at 1024x768 resolution:
Header
- Left: Lamco sheep logo, "LamBoot" title, version (e.g.,
v0.17.0 (x86_64)) - Right: System identity information (when available):
- VM ID: Shown as
VM 201when configured via SMBIOS OEM strings (see Configuration Guide). On Proxmox, this is auto-injected by the hookscript. On other hypervisors, set via QEMU-smbios type=11,value=lamboot.vmid=201or equivalent. - Hypervisor: Auto-detected via CPUID (KVM, Hyper-V, VMware, Xen, etc.). On bare metal, this line is absent.
- Build info: Secure Boot state, loaded filesystem driver count
- VM ID: Shown as
Left Column: Boot Entries
Linux kernels, UKIs, and EFI loaders discovered from BLS entries on the ESP. Each entry shows:
- Type badge:
Linux,EFI,Win - Name: Entry title from BLS
titlefield (e.g., "Fedora Linux 43 (6.19.9)") - Subtitle: Entry type ("Linux kernel + initrd", "Unified Kernel Image", "EFI bootloader")
- Preflight indicator:
!(warning) orX(error) if validation found issues
Right Column: Tools and Actions
- Diagnostic modules: Modules deployed to
\EFI\LamBoot\modules\(diag-shell, pci-inventory, etc.) - System actions: "Firmware Setup [F2]" and "Reboot [F12]"
Footer
- Left: Status message (auto-boot countdown, preflight warnings, navigation hints)
- Right: Keyboard shortcut reference
Keyboard Shortcuts
| Key | Action |
|---|---|
| Up / Down | Navigate entries within a column |
| Left / Right | Switch between boot entries and tools columns |
| Enter | Boot the selected entry |
| Escape | Cancel auto-boot countdown |
| F1 | Help screen |
| F2 | Reboot to firmware setup (UEFI menu) |
| F12 | Cold reboot |
Mouse is also supported: hover to highlight, click to boot. Mouse movement leaves the auto-boot timer running; only keystrokes and clicks cancel it.
Auto-Boot
By default, LamBoot waits 5 seconds, then boots the first kernel entry. This behavior is controlled by policy.toml:
default_timeout_ms: Delay in milliseconds (0 = wait forever, no auto-boot)default_entry: Entry ID to auto-boot (e.g.,bls-fedora-6.19.9)
Press Escape or any key to cancel the auto-boot countdown and select manually.
If crash loop detection triggers (see Crash Loop Recovery), auto-boot may be overridden to select a fallback entry.
Booting a Kernel
When you select a boot entry, LamBoot:
- Records the selection in NVRAM (
LamBootLastEntry) - Sets the boot state to
Booting - Writes the boot report to
\EFI\LamBoot\reports\boot.json - Appends to the audit log at
\EFI\LamBoot\reports\audit.log - Flushes the boot log to
\EFI\LamBoot\reports\boot.log - Measures into TPM (if present): kernel image → PCR 4, config → PCR 5, cmdline → PCR 12
- Decrements the boot counter (if using BLS boot counting)
- Loads and starts the kernel using the native PE loader
For Linux kernels with initrd, LamBoot registers the initrd via the LoadFile2 protocol (LINUX_EFI_INITRD_MEDIA_GUID), which is the standard mechanism since Linux kernel 5.7. Multiple initrds (e.g., microcode + main initramfs) are concatenated automatically.
Using Diagnostic Tools
LamBoot can load diagnostic modules from \EFI\LamBoot\modules\ on the ESP. These appear in the right column of the boot menu.
Available Modules
| Module | Description |
|---|---|
| Diagnostic Shell (diag-shell) | Interactive 5-screen diagnostic tool (boot vars, PCI, memory, SMBIOS, firmware) |
| PCI Device Inventory (pci-inventory) | Scans PCI bus, detects VirtIO/passthrough devices, writes JSON report |
| Quick Memory Test (mem-quick) | Reports memory stats and runs walking-ones + address pattern tests |
| NVMe Health Check (nvme-diag) | Reads each NVMe controller's SMART/Health log and shows a verdict, temperature, wear, available spare, error counts and critical-warning bits (0.17.0) |
All four modules are functional as of 0.17.0.
Using Modules
- Navigate to the right column (press Right arrow)
- Select a module and press Enter
- The module runs in text mode
- When done, press Q or the indicated key to return to the LamBoot menu
Modules return to the LamBoot menu without rebooting, so you can run multiple tools in succession.
Boot Reports
LamBoot writes diagnostic information to the ESP after every boot:
boot.json
JSON file with the complete boot context:
{
"schema_version": 1,
"lamboot_version": "0.17.0",
"lamboot_arch": "x86_64-unknown-uefi",
"timestamp": "2026-07-06T14:03:11Z",
"entry_id": "debian-6.12.0-amd64",
"entry_name": "Debian GNU/Linux",
"entry_type": "linux_legacy",
"path": "/boot/vmlinuz-6.12.0-amd64",
"verified_via": "shim_mok",
"loader": "native_pe_loader",
"system_manufacturer": "QEMU",
"system_product": "Standard PC (Q35 + ICH9, 2009)",
"fleet_id": "",
"vmid": "201",
"role": "",
"host_node": "pve2",
"os_name": "debian",
"hypervisor": "kvm",
"iommu": "",
"iommu_units": 0,
"boot_timing": { "health": 2, "discovery": 41, "menu": 118, "total": 161 }
}
schema_version goes up only when a field is renamed, removed or changes type. New fields leave it alone.
boot.log
Full boot trace with timestamps. Write-through during early boot (survives crashes), buffered during menu phase:
=== LamBoot 0.17.0 (x86_64) boot log ===
=== 2026-04-05T02:01:49 ===
[2026-04-05T02:01:49] INFO: Crash counter: 0
[2026-04-05T02:01:49] INFO: System: QEMU Standard PC (Q35 + ICH9, 2009)
[2026-04-05T02:01:49] INFO: Hypervisor: KVM
[2026-04-05T02:01:49] INFO: Loaded 4 filesystem driver(s)
[2026-04-05T02:01:49] INFO: Discovering boot entries...
[2026-04-05T02:01:49] INFO: Found 3 boot entries (7 total with tools)
[2026-04-05T02:01:49] INFO: Boot init: 0 ms
[2026-04-05T02:02:50] INFO: Selected: Fedora Linux 43 (6.19.9) (bls-fedora-6.19.9)
audit.log
Rolling log (10 KB max) of every boot with entry name and timestamp:
[2026-04-05T02:01:49] Boot: Fedora Linux 43 (6.19.9) (bls-fedora-6.19.9)
All reports are at /boot/efi/EFI/LamBoot/reports/ (accessible from the booted OS).
Crash Loop Recovery
LamBoot tracks boot success via NVRAM variables:
- On each boot attempt, the crash counter increments and the state is set to
Booting - After the OS starts successfully,
lamboot-mark-success.servicesets the state toBootedOKand resets the counter - If the counter reaches the crash threshold (default: 3), LamBoot enters crash loop mode:
- If
fallback_orderis configured, the first available fallback entry is booted - Otherwise, the menu comes up with an 8-second countdown to the first bootable entry that passed its preflight checks, so you can pick another and an unattended machine still boots
- Either way, the entry the failed boots started is set aside while another bootable entry exists, so recovery doesn't pick the one that keeps crashing. A machine with a single entry retries it.
- If
The crash threshold is configurable in policy.toml under security.crash_threshold.
Two things to know about the counter:
- A boot counts as good only once
lamboot-mark-success.servicehas run, and it runs after the system reaches its normal target. A machine restarted before that point (during a quick series of reboots, for instance) is counted as a failed boot each time, and three in a row reach the default threshold. The next good boot clears the counter. - An entry is set aside only on a system that has reported a good boot before. Where nothing marks boots good (an operating system without the service), the counter rises on every boot and says nothing about crashes, so LamBoot leaves your default entry alone there.
An Entry That Fails to Start
A kernel or UKI can fail before it boots: A missing initrd, a load error, or a kernel whose EFI stub gives up and returns. LamBoot doesn't hand that failure to the firmware, which would move on to its next boot option (another loader, a network boot, firmware setup). It recovers in the same boot, the way crash loop mode does:
- The failed entry is skipped for the rest of the boot
- If
fallback_ordernames an entry that hasn't failed, LamBoot boots it - Otherwise the menu comes up with the 8-second countdown to the next bootable entry, and a line saying which entry failed and why
- If every bootable entry has failed, the menu waits without a countdown
The crash counter keeps the failure until a boot succeeds. A kernel booted after a failure in the same boot finds the failed kernel's measurement in TPM PCR 4 as well as its own, so a secret sealed to PCR 4 won't unseal for it.
VM Snapshot Awareness
On QEMU/KVM, LamBoot reads the VM Generation ID (vmgenid). If the ID changes (indicating a snapshot restore), the crash counter is automatically reset to prevent false crash loop detection after rollback.
Updating LamBoot
sudo tools/lamboot-install --update
The update:
- Replaces the binary only if the new one is different (SHA256 check)
- Preserves the existing
policy.toml(new defaults saved aspolicy.toml.new) - Preserves boot entries and ESP layout
- Updates the install manifest
Removing LamBoot
sudo tools/lamboot-install --remove
This removes:
- The LamBoot binary from the ESP
- The UEFI boot entry
- All LamBoot files (drivers, modules, reports, policy)
- Systemd integration (mark-success service, kernel-install plugin)
The ESP itself and other bootloaders remain untouched.
Preflight Validation
Before displaying the menu, LamBoot validates each boot entry:
| Check | What it validates | Indicator |
|---|---|---|
| File exists | Kernel/EFI binary present on ESP | X (error) |
| PE header | Valid MZ signature and PE format | ! (warning) |
| Architecture | PE machine type matches current arch | ! (warning) |
| Secure Boot | Image signed (when SB is enabled) | ! (warning) |
| Initrd exists | Referenced initrd files present | ! (warning) |
| Root parameter | root= present in kernel options | ! (warning) |
| Filesystem driver | Driver available for non-FAT partitions | ! (warning) |
Preflight is advisory only and never blocks booting. A warning indicates a potential issue, and you can still select and boot the entry.
ESP Layout
After installation, the ESP contains:
EFI/LamBoot/
├── lambootx64.efi # Main bootloader binary
├── policy.toml # Boot policy configuration
├── .install-manifest # Tracks installed files
├── drivers/ # Empty unless you add a UEFI filesystem driver
├── modules/
│ ├── manifest.toml # Module display names
│ ├── diag-shell.efi
│ ├── pci-inventory.efi
│ └── ...
└── reports/
├── boot.json # Last boot report
├── boot.log # Boot trace log
├── audit.log # Boot history
└── pci-inventory.json # PCI scan results (from module)
See Also
- Configuration Guide: policy.toml reference, SMBIOS OEM strings, advanced options
- Proxmox Guide: VM fleet deployment, hookscript, monitoring
- Troubleshooting Guide: common problems and recovery
- Security Guide: Secure Boot, TPM, signing
- Diagnostic Modules: detailed module reference
- Install Reference: lamboot-install complete CLI reference
- LamBoot Tools: companion diagnostic and repair toolkit