Open Source › LamBoot filesystem crates › lamfold-erofs
lamfold-erofs
EROFS, compressed and uncompressed, with fs-verity checks on every data block.
What lamfold-erofs is for
EROFS is the forward standard for immutable images: composefs builds on it for content-addressed OS images (bootc, Silverblue) and OCI images. lamfold-erofs reads the metadata and anchors trust in the substrate's fs-verity Merkle verifier, so tampered media fails to read instead of booting.
Basis: Clean-room EROFS.
Part of lamfold: A thin frontend over the lamfold substrate (v0.1.5), which supplies its codecs, block cache, bounded parsing and integrity checks.
Add it to your crate
[dependencies]
lamfold-erofs = { version = "0.1", features = ["zstd"] }
Or cargo add lamfold-erofs. On Debian unstable or testing, the packaged crate is librust-lamfold-erofs-dev (rust-lamfold-erofs).
What it reads
| Feature | Status |
|---|---|
| Superblock, compact and extended inodes, directories, symlinks | Read |
| FLAT_PLAIN and FLAT_INLINE data | Read |
| Compressed files (full and compact indexes, big pclusters) | Read with lz4, lzma (custom lc/lp/pb too), deflate and zstd, each behind a feature |
| Block sizes from 512 bytes to 4 KiB | Read |
| Chunk-based files with a block map, holes as zeros | Read (0.1.3) |
| fs-verity | Every data block read is checked; tampered media fails with VerifyFailed |
What it refuses
- At open: fragments and all-fragments (Fedora's live images), compressed directories, the 48-bit layout, metabox, extra devices, unknown incompat features
- Per file: ztailpacking, interlaced pclusters, 8-byte chunk indexes, Linux 7.2's hole pclusters
Nothing on the list is misread: The image fails to open, or the file fails to read, with a typed error.
What it depends on, and what it doesn't
Avoids: Everything but the lamfold substrate.
Always
- lamfold 0.1.5: The substrate
Only with a feature
None.
Cargo features
| Feature | Default | What it adds |
|---|---|---|
| verity | Yes | fs-verity checks |
| lz4 | Yes | lz4 |
| lzma, deflate, zstd | No | Each further codec |
| std | Yes | std support |
How it's tested
Images from erofs-utils 1.8.6 and 1.9.4 covering every option above, including a tree of real executables, inline xattrs on a 32-byte boundary, and small blocks.
No GPL drivers in the boot path
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. The whole family · LamBoot
The lamfold stack
Disk filesystems: lamxfs · lambutter · lamlvm · lamzfs · lamexfat · lamfat