feat: add disk encryption configuration - #1
Merged
Conversation
yeetypete
force-pushed
the
feat/bootc-encryption
branch
from
August 19, 2026 00:33
06a3012 to
85d0abd
Compare
yeetypete
force-pushed
the
feat/bootc-encryption
branch
from
August 19, 2026 01:33
85d0abd to
6a9e94a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Encrypts the root filesystem with LUKS2.
TLDR:
systemd-repart definitions in
rootfs/usr/lib/ubuntu-bootc/repart.dlay out a 1G ESP and a LUKS2 root filling the disk.install-encrypted.pyruns repart, unlocks the volume, and pointsbootc install to-filesystem --composefs-backendat it. bootc-dev/bootc#2390 recommends this setup, setting encryption up outside bootc rather than using the built in--block-setup tpm2-luks, which is TPM2 only and has no passphrase support.Details:
The root is formatted with
SYSTEMD_REPART_MKFS_OPTIONS_EXT4="-O verity"because composefs needs fs-verity and repart does not enable it by default. And bootc is handed an already open dm-crypt node, so it cannot tell the root is encrypted and the script addsrd.luks.uuid=itself.just diskbuilds an encrypted 20G image in a VM, prompting for the passphrase. Not booted yet, so the boot time prompt and the composefs root mount are untested.Later: add a TPM2 keyslot with
systemd-cryptenrollonce Secure Boot is on, and check whether discoverable partitions can replace therd.luks.uuidkarg.