BOOTC-SETUP-ROOT-CONF(5)
π bootc-setup-root-conf.toml β the File Formats Manual glow-up (section 5, bestie) π
okay so bestie, gather round, because this is the little config file that decides how your whole root filesystem gets mounted, and it is literally living at /usr/lib/composefs/setup-root-conf.toml. no cap.
β¨ SYNOPSIS β¨
/usr/lib/composefs/setup-root-conf.toml
πΈ DESCRIPTION πΈ
so here's the vibe: when the composefs backend is the one running the show, bootc-root-setup.service pops off in the initramfs, doing its little job of mounting the root filesystem before switch-root happens. and to know how to do that, it reads this optional TOML config file β which is the thing that controls how /, /etc, and /var get mounted. that's the whole assignment. π
if the file is not there at all? no stress. every option just takes its documented default. the defaults ate, honestly.
but here's the part that's giving main character energy: the mere presence of this file (even if it's completely empty, like emotionally unavailable but still showing up) marks the image as composefs-native. and that decides which storage backend bootc install uses:
- if the image also has no ostree
prepare-root.conf, it gets installed with the composefs backend - otherwise it goes with ostree
(see bootc-installation(7) β yes, that's a real reference, go read it.) on top of that, bootc container lint then also stops requiring the /ostree symlink, and stops requiring the ostree prepare-root.conf composefs configuration that the ostree backend needs. so basically you get to skip a whole chore list. iconic.
also, the 51bootc dracut module installs this file into the initramfs automatically whenever it's present on the host image. so image authors can just ship the file at this path in their container image and rebuild the initramfs with a plain dracut --force β no --include flags needed. no extra drama. periodt. π
π SECTIONS π
[root]
this section controls the mount of the root (/) filesystem. yeah. the big one. the whole vibe.
transient(boolean, default:false) β iftrue, the composefs root gets wrapped in a tmpfs overlay before switch-root. every single write to/gets yeeted at the next reboot. this is lowkey perfect for kiosk or lab systems where runtime modifications must NEVER persist. like, not even a little.
[etc]
this one controls how /etc gets mounted from the deployment state directory.
mount(string) β one of"none","bind"(the default),"overlay", or"transient". let's break it down because it's giving options:none(alias"root") β/etcis not remounted at all. the composefs image's/etcis used directly and it is read-only. the system sees exactly the/etcbaked into the container image, with no per-deployment state overlaid on top. π«Ά this requires that the OS and all services work without a writable/etc: SSH host keys, machine-id, NetworkManager leases, and similar files that are normally generated on first boot into the deployment's writable/etcmust either be baked into the image or generated elsewhere (e.g./var, systemd credentials). this mode is most useful in combination with[root] transient = true, where the transient overlay is already providing a writable surface over/etc. slay.bindβ/etcis bind-mounted from the deployment state directory, preserving persistent per-machine changes across reboots. this is the default ostree behaviour, bestie.overlayβ/etcis an overlayfs with the deployment state as the upper layer; writes go to state and persist across reboots.transientβ/etcis a tmpfs overlay; all runtime edits are discarded on reboot. suitable for immutable or sealed images where/etcdrift is simply not the vibe.
transient(boolean, default:false) β just shorthand formount = "transient". it gets ignored whenmountis also set. pick a lane, honestly. π
[var]
and this section controls how /var gets mounted from the deployment state directory.
mount(string) β one of"bind"(the default) or"none".bindβ/varis bind-mounted from the deployment state directory, preserving persistent per-machine data across reboots. the default. the standard. the reliable friend.none(alias"root") β/varis not remounted; the composefs image's empty/vardirectory is used. combine it withsystemd.volatile=state(see below) to get a fresh tmpfs on every single boot. π
for a fresh, ephemeral /var on every boot (think stateless or kiosk systems), use the systemd.volatile=state kernel argument. bootc-root-setup detects this karg automatically and skips the /var bind-mount, so you don't even need an explicit [var] section. she just knows. π§
the karg can be baked into the image via /usr/lib/bootc/kargs.d/:
# /usr/lib/bootc/kargs.d/50-var-volatile.toml
kargs = ["systemd.volatile=state"]
this causes systemd to mount /var as a plain tmpfs at early boot, which is fully compatible with tools like podman that use overlayfs under /var. π
β οΈ note, and this one matters: unlike/etcand/root, using overlayfs (that's the"transient"mount type from earlier releases) for/varis not supported β because it breaks podman and other tools that use overlayfs under/var/lib/containers. do not do it. i'm begging. π
π¦ EXAMPLES π¦
default (all persistent, equivalent to an absent file):
[etc]
mount = "bind"
transient /etc β suitable for sealed or integrity-verified images where runtime /etc changes should be discarded on reboot:
[etc]
transient = true
transient root with read-only /etc β / and /etc follow the composefs image exactly within the session (all writes discarded on reboot). to also make /var ephemeral, combine with systemd.volatile=state in kargs.d:
[root]
transient = true
[etc]
mount = "root"
π FILES π
/usr/lib/composefs/setup-root-conf.tomlβ the configuration file read bybootc-root-setup.service. that's her. that's the one.
π SEE ALSO π
bootc-root-setup.service(5), bootc(8)
β VERSION β
v1.17.1
okay bestie that's the whole page, you're officially educated π this was section 5 of the File Formats Manual, BOOTC-SETUP-ROOT-CONF(5), brought to you by v1.17.1 β now go mount something responsibly, mwah π
β¨
π¦ 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