bootc-composefs - Man Page

composefs backend

Description

bootc has two storage backends. The default is ostree ⟨https://github.com/ostreedev/ostree⟩, and the composefs backend uses composefs-rs ⟨https://github.com/composefs/composefs-rs⟩ instead of ostree to store and manage deployments. Both are supported and covered by the project's stability guarantees ⟨https://github.com/bootc-dev/bootc/blob/main/RELEASES.md#stability-guarantees⟩​. In particular, the project is committed to upgrading every composefs system installed since bootc 1.16.0 in place.

The composefs backend is required for sealed images (see bootc-sealed-images(7)), and the image determines which backend bootc install uses; see Understanding bootc install (see bootc-installation(7)). Its on-disk layout is described in Filesystem: sysroot (see bootc-sysroot(7)).

Overview

The composefs backend has two independent integrity controls:

EROFS formats

composefs-rs can encode the EROFS image for a root filesystem in two formats, which produce different digests for the same content:

The composefs.digest= kernel argument names the format along with the digest, for example composefs.digest=v1-sha512-12:<digest>, so it is unambiguous. The older bare composefs=<digest> argument is not: released UKIs carry either a V1 or a V2 digest there (see below), so bootc tries both.

By default bootc container ukify computes both digests and writes the V1 composefs.digest= argument followed by a bare composefs= argument with the V2 digest, for older clients. --erofs-version=v2 writes only the bare V2 argument.

Each argument names one exact image. Staging fails unless every digest in the UKI matches an image bootc generated for that container image. At boot, bootc's initramfs tries the arguments in order and moves on to the next one if an image is missing, but an image that fails fs-verity checks stops the boot. bootc never substitutes a different digest.

Existing repositories keep the format configuration recorded in their metadata; opening one with a newer bootc doesn't convert it.

The bare composefs= argument

Released UKIs have used the bare composefs=<digest> argument for different formats:

  • bootc 1.16.0 through 1.16.2 predate format versioning and use the original composefs-rs encoding that V2 descends from.
  • bootc 1.16.3 writes a V2 digest.
  • bootc 1.16.4 through 1.16.13 write a V1 digest: the switch to the V1 format shipped before the composefs.digest= argument did.
  • Releases after 1.16.13 write V2 there again, after an explicit V1 argument.

So bootc accepts a bare composefs= digest that matches either a V1 or a V2 image, and only enforces the format for composefs.digest=​.

Upgrading from bootc 1.16

When you update bootc in an image, regenerate the initramfs before generating the UKI​. The initramfs contains bootc's own mount logic, and keeping an old initramfs with a newer bootc is not supported.

For a sealed deployment, sign the new UKI with a key the existing machine trusts. If the deployment was built with --allow-missing-verity, keep that flag. Then publish the image and run bootc upgrade as usual.

What happens next depends on the bootc version doing the staging. A client that only understands composefs=, such as 1.16.0, stages the V2 fallback; the new initramfs boots it, and the next upgrade (now staged by the new bootc) moves the system to V1. bootc 1.16.4 and later already understand composefs.digest= and stage V1 directly.

The 1.16.0 path is covered by the test-49-composefs-1-16-bridge TMT test for both sealed and --allow-missing-verity UKIs, including rollback and garbage collection. Upgrades of UKI installs from other releases are not yet tested.

Supported configurations

The following are supported with the composefs backend:

On CentOS Stream 9, only sealed UKIs are tested; traditional kernel installs require newer dracut and systemd features. Its dracut also doesn't install setup-root-conf.toml into the initramfs automatically.

Experimental parts

These remain experimental ⟨https://github.com/bootc-dev/bootc/blob/main/RELEASES.md#stability-guarantees⟩ and may change or be removed:

Limitations

For building and testing bootc itself with the composefs backend, see CONTRIBUTING.md ⟨https://github.com/bootc-dev/bootc/blob/main/CONTRIBUTING.md⟩​.

Known issues

The composefs backend is stable; upgrades and core functionality is supported. These are some of the more prominent known issues.

Future work

Additional Resources

See Also

bootc(8), bootc-boot-failure-detection(7), bootc-bootloaders(7), bootc-docs(7), bootc-experimental-install-reset(7), bootc-experimental-unified-storage(7), bootc-filesystem(7), bootc-install-mount(8), bootc-installation(7), bootc-sealed-images(7), bootc-setup-root-conf(5), bootc-sysroot(7), bootc-upgrades(7)

Version

v1.17.1