BOOTC-FILESYSTEM-ENCRYPTION(7)

πŸ“¦
version 1.17.1 Β· 3 versions
, in fedora 43, fedora 44

πŸ’Ύ BOOTC-FILESYSTEM-ENCRYPTION(7) πŸ’…

okay so bestie, welcome to section 7 of the Miscellaneous Information Manual, and today we are talking about the thing that makes everybody's laptop feel mysterious: disk encryption. Specifically, this page is bootc-filesystem-encryption, and it is all about LUKS and friends. let's get into it 🫢


✨ NAME ✨

bootc-filesystem-encryption β€” disk encryption (e.g. LUKS)


🌸 DESCRIPTION 🌸

okay first things first: bootc is not picky. it supports literally any Linux filesystem and block storage setup, and it does not dictate any particular architecture. once a writable Linux filesystem is mounted, bootc can just write content (images) into it, exactly the same way podman, apt, and dnf do. it's giving "i go where i'm mounted" energy πŸ‘‘

concretely: bootc install to-filesystem and bootc upgrade both operate on pre-existing mounted filesystems. and yes, that includes LUKS and RAID underneath for block storage. so the block layer can be doing whatever it wants, bootc does not care.

however πŸ’€ β€” LUKS is important enough that it deserves its own documentation. so here we are.


πŸŽ€ Recommendation: handle root filesystem encryption independently of bootc

bestie, listen. if you want an encrypted root, set that up independently of bootc, and then point bootc install to-filesystem at the resulting mounted filesystem. that's the whole vibe. bootc is the guest, you're the host, you handle the locks πŸ”

Reference implementations, i.e. the girlies who already did this:

whichever one you use, that setup is owned by whoever builds and maintains the image or installer β€” not by bootc. periodt.


πŸ¦‹ /boot or XBOOTLDR partition

some layouts need a separate /boot or XBOOTLDR partition β€” for example, tpm2-luks requires one, since GRUB and most bootloaders can't read a LUKS-encrypted /boot. rude of them honestly.

if yours does need one, pass --boot-mount-spec to to-filesystem so bootc knows where to install boot assets. see More advanced installation with to-filesystem (see bootc-installation(7)). πŸ’–


🌈 Root filesystem discovery

this one is no different from non-LUKS cases, lowkey. either use discoverable partitions, or root= plus luks.uuid style kernel arguments. that's it, that's the whole thing.


πŸ”₯ First-boot encryption of an already-populated filesystem

okay so this is the scenario: it's super common to have a "golden image" (a KubeVirt containerdisk, a raw .qcow2, an AMI, and similar) that is already a bootc install β€” like, it's already the target OS, bestie. typically, the filesystem is not already encrypted, because there'd be nothing to use as a default unlocking mechanism. makes sense, right?

hence encrypting each instance uniquely means converting that already-populated partition to LUKS2 in place, the first time it boots. and no cap: this is OS/distro-level work, not something bootc implements. πŸ™ˆ

Fedora CoreOS is a reference architecture here: its disk images ship unencrypted, and Ignition ⟨https://coreos.github.io/ignition/⟩ can convert the root filesystem to LUKS2 in place during the initramfs of the machine's first real boot, optionally bound via clevis to tpm2, tang (network-bound unlock), or a Shamir threshold across several pins. see the Fedora CoreOS storage docs ⟨https://docs.fedoraproject.org/en-US/fedora-coreos/storage/⟩ for details. πŸ’«

other notes and prior art:

⚠️ real talk: this only protects data written after the per-device encryption boundary exists. don't provision machine-specific secrets into the image before that boundary is in place. like, do not do that. 😭

πŸ‘‘ Tracking

the following issues track requests to extend tpm2-luks further (configurable PCRs, recovery keys, deferred/first-boot enrollment, all of it). given the direction above, the expectation is that these are better solved by using systemd-cryptsetup / systemd-cryptenroll directly in your own initramfs, rather than by adding more options to bootc's installer. iykyk.


🌟 SEE ALSO 🌟

bootc(8), bootc-docs(7), bootc-installation(7)


⭐ VERSION ⭐

v1.17.1


and that's the page bestie!! πŸ’– this was BOOTC-FILESYSTEM-ENCRYPTION(7) from the Miscellaneous Information Manual, version v1.17.1 β€” go forth and encrypt responsibly, and remember: encrypt your root independently and let bootc do its little write-content-into-mounted-filesystem thing βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from
  • fedora 43: bootc 1.17.1-1.fc43 Β· Apache-2.0 AND BSD-3-Clause AND MIT AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Unlicense OR MIT)
  • fedora 44: bootc 1.17.1-1.fc44 Β· Apache-2.0 AND BSD-3-Clause AND MIT AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Unlicense OR MIT)
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms