Open Source › LamBoot filesystem crates
LamBoot's filesystem crates
Fourteen no_std Rust readers for the filesystems Linux boots from, written so a Secure Boot bootloader doesn't have to load GPL drivers.
Replacing the drivers a signed bootloader can't ship
Until 2026 LamBoot read most Linux filesystems through about a dozen prebuilt UEFI filesystem driver binaries from the EfiFs (GPL-3.0) and rEFInd (GPL-2.0) projects. Three things ruled them out at once. Debian's free-software guidelines and Fedora's packaging rules reject a prebuilt .efi blob that isn't built from source in the archive. Microsoft doesn't sign GPLv3 code for Secure Boot, and loading a separate UEFI driver binary removes the ShimLock protocol that shim 15.8 relies on. And GPL binaries sit badly beside a permissively licensed loader. These crates replace those drivers with readers compiled into LamBoot itself.
Packaging
Debian and Fedora build everything from source in their archives. A prebuilt .efi driver can't be shipped; a crate can be built, and all fourteen now are, as Debian packages.
Secure Boot
Microsoft doesn't sign GPLv3 code, and loading a separate UEFI driver binary removes shim 15.8's ShimLock protocol. A reader compiled into the loader is part of one signed binary, and nothing extra is loaded.
Safety
Each reader is memory-safe Rust with no write path (lamfat, the ESP's library, is the one that writes), tested against images the format's own tools and the Linux kernel wrote. Anything a reader doesn't support is refused with a typed error, never misread.
Fourteen crates, one per format
| Crate | Reads | Version | License | Rust | Required deps | Links |
|---|---|---|---|---|---|---|
| lamxfs | XFS | 0.1.3 | MIT OR Apache-2.0 | 1.85 | crc |
crates.io · docs.rs · Debian |
| lambutter | btrfs | 0.5.0 | MIT OR Apache-2.0 | 1.87 | bitflags, crc +3 optional |
crates.io · docs.rs · Debian |
| lamlvm | LVM2 | 0.1.3 | MIT | 1.85 | embedded-io, nom, serde, snafu, tracing |
crates.io · docs.rs · Debian |
| lamzfs | ZFS | 0.1.4 | MIT | 1.87 | None +5 optional | crates.io · docs.rs · Debian |
| lamexfat | exFAT | 0.1.2 | (MIT OR Apache-2.0) AND Apache-2.0 | 1.85 | None | crates.io · docs.rs · Debian |
| lamfat | FAT12, FAT16, FAT32 | 0.4.3 | MIT | 1.71 | bitflags, log +1 optional |
crates.io · docs.rs · Debian |
| lamfold | Media filesystem substrate | 0.1.5 | MIT OR Apache-2.0 | 1.87 | zerocopy +6 optional |
crates.io · docs.rs · Debian |
| lamfold-iso | ISO 9660 | 0.1.2 | MIT OR Apache-2.0 | 1.87 | lamfold |
crates.io · docs.rs · Debian |
| lamfold-udf | UDF | 0.1.1 | MIT OR Apache-2.0 | 1.87 | lamfold |
crates.io · docs.rs · Debian |
| lamfold-squash | SquashFS | 0.1.1 | MIT OR Apache-2.0 | 1.87 | lamfold |
crates.io · docs.rs · Debian |
| lamfold-erofs | EROFS | 0.1.3 | MIT OR Apache-2.0 | 1.87 | lamfold |
crates.io · docs.rs · Debian |
| lamfold-cramfs | cramfs | 0.1.0 | MIT OR Apache-2.0 | 1.87 | lamfold |
crates.io · docs.rs · Debian |
| lamfold-romfs | romfs | 0.1.1 | MIT OR Apache-2.0 | 1.87 | lamfold |
crates.io · docs.rs · Debian |
| lamfold-cpio | cpio and initramfs | 0.1.2 | MIT OR Apache-2.0 | 1.87 | lamfold, cpio_reader |
crates.io · docs.rs · Debian |
Versions are the latest on crates.io and are checked against it on every deploy of this site. "Rust" is each crate's declared minimum Rust version.
The disk filesystems: one crate and one repository each
The filesystems a Linux system's /boot and root live on. Each crate takes a block device as a one-method trait and reads it without changing a byte.
lamxfs
XFSv0.1.3 · MIT OR Apache-2.0
Read-only XFS, v4 and v5, with in-memory log replay after an unclean shutdown.
Requires crc
lamxfs →lambutter
btrfsv0.5.0 · MIT OR Apache-2.0
Read-only btrfs on SINGLE, DUP and RAID1 profiles, with subvolumes and zstd, zlib and LZO.
Requires bitflags, crc; 3 optional
lambutter →lamlvm
LVM2v0.1.3 · MIT
Read-only LVM2 logical volumes as plain byte streams, for any filesystem reader on top.
Requires embedded-io, nom, serde, snafu, tracing
lamlvm →lamzfs
ZFSv0.1.4 · MIT
Read-only ZFS pools (single disk, mirror, RAID-Z1) for root-on-ZFS boot pools.
No required dependencies; 5 optional
lamzfs →lamexfat
exFATv0.1.2 · (MIT OR Apache-2.0) AND Apache-2.0
Read-only exFAT for SD cards and USB sticks, including files over 4 GiB. No dependencies.
No required dependencies
lamexfat →lamfat
FAT12, FAT16, FAT32v0.4.3 · MIT
Read and write FAT12, FAT16 and FAT32, the ESP's filesystem: rust-fatfs, republished.
Requires bitflags, log; 1 optional
lamfat →lamfold: one substrate, seven format frontends
The formats of installers, live images, initramfs and immutable OS images. Every frontend depends on the lamfold substrate alone, which carries the codecs, the block cache, the bounded parser and fs-verity checking for all of them. They compose: LamBoot reads the SquashFS root inside an ISO stored on an XFS partition.
lamfold
Media filesystem substratev0.1.5
The substrate under seven read-only media formats: codecs, block cache, bounded parsing, fs-verity.
lamfold-iso
ISO 9660v0.1.2
ISO 9660 with Rock Ridge, Joliet, El Torito and zisofs.
lamfold-udf
UDFv0.1.1
UDF (ECMA-167, OSTA UDF 1.02 to 2.01).
lamfold-squash
SquashFSv0.1.1
SquashFS 4.0 with gzip, xz, zstd, lz4 and lzo: the root inside a live ISO.
lamfold-erofs
EROFSv0.1.3
EROFS, compressed and uncompressed, with fs-verity checks on every data block.
lamfold-cramfs
cramfsv0.1.0
cramfs, the per-page-zlib format for embedded firmware and rescue images.
lamfold-romfs
romfsv0.1.1
Linux romfs, the minimal uncompressed format for tiny embedded and early-boot images.
lamfold-cpio
cpio and initramfsv0.1.2
cpio archives and whole initramfs chains, compressed members included, read as a tree.
What each crate depends on, and what it doesn't
Small dependency trees were a design goal: Each dependency is code inside a boot path that has to be audited, packaged and kept current. These are the normal (build-time library) dependencies of each crate's latest release, as crates.io records them. Optional ones come in only with the feature named.
| Crate | Always | Optional (feature) | What it avoids |
|---|---|---|---|
| lamxfs | crc 3.2 |
None | The GPL XFS UEFI driver and the Linux kernel. Its one dependency is crc. |
| lambutter | bitflags 2.6crc 3.2 |
ruzstd (zstd)miniz_oxide (zlib)lzokay (lzo) |
The GPL btrfs UEFI driver, std and any async runtime. Codecs are opt-in, so a build without them depends on bitflags and crc alone. |
| lamlvm | embedded-io 0.6nom 7.1serde 1.0snafu 0.9tracing 0.1 |
None | The lvm2 userspace tools and device-mapper. All five dependencies build without std. |
| lamzfs | None | lz4_flex (lz4)ruzstd (zstd)miniz_oxide (gzip)sha2 (sha512)blake3 (blake3) |
The OpenZFS kernel module, a GPL UEFI driver and std. With its features off it has no dependencies; lzjb and mirror support are its own code. |
| lamexfat | None | None | Every dependency: The crate depends on nothing, not even for checksums or Unicode case folding. |
| lamfat | bitflags 2log 0.4 |
chrono (timestamps (off by default)) |
A userspace filesystem stack. Its default tree is bitflags and log; chrono is opt-in. |
| lamfold | zerocopy 0.8.27 |
miniz_oxide (codec-deflate)lz4_flex (codec-lz4)ruzstd (codec-zstd)lzma-rust2 (codec-xz)lzokay (codec-lzo)sha2 (verify) |
GPL decompressors and filesystem code. Every codec is a permissive Rust crate, and with its features off only zerocopy remains. |
| lamfold-iso | lamfold 0.1.5 |
None | GPL ISO 9660 drivers. Its only dependency is the lamfold substrate. |
| lamfold-udf | lamfold 0.1.5 |
None | Everything but the lamfold substrate. |
| lamfold-squash | lamfold 0.1.5 |
None | Everything but the lamfold substrate; the compressors are the substrate's permissive codecs. |
| lamfold-erofs | lamfold 0.1.5 |
None | Everything but the lamfold substrate. |
| lamfold-cramfs | lamfold 0.1 |
None | The GPL-2 kernel driver. Its only dependency is the lamfold substrate. |
| lamfold-romfs | lamfold 0.1.5 |
None | Everything but the lamfold substrate. |
| lamfold-cpio | lamfold 0.1.5cpio_reader 0.1.2 |
None | Unpacking to disk or a shell: It reads in memory, under a cap. |
ext4 comes from upstream
LamBoot reads ext4 through the upstream ext4-view crate, the model the lamxfs and lambutter APIs follow. ext4-view on GitHub.
All fourteen are in Debian
Each crate is packaged in Debian unstable and testing as librust-<crate>-dev, from source package rust-<crate>. Each crate's page links its Debian tracker entry.
Built for LamBoot, usable anywhere
LamBoot compiles these readers in, so it reads your real /boot on XFS, btrfs, ZFS or LVM under Secure Boot. Anything else that can't link std, from recovery tools to embedded firmware, can use them the same way.
Contributing
Issues and pull requests are welcome on each crate's repository. A change to a read path should come with a fixture written by the format's own tools or the kernel, the same oracle the existing tests use.