You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bootc PR #2521 aims to make separate /var filesystems—including LVM volumes and nested mounts such as /var/log—start with the content shipped in the container image.
Why it’s needed
Currently, bootc install to-filesystem seeds /var into bootc’s internal state directory. A separate filesystem mounted over /var or one of its subdirectories hides that content, leaving the actual volume empty.
What the draft implements
Detect filesystems already mounted under the installation target’s /var.
Populate empty mount trees from the image’s seeded /var, preserving metadata, applying SELinux labels, and syncing the filesystems.
Preserve any mount tree that already contains data, without merging into it.
Advertise an initialize-var-mounts capability through bootc container inspect, so image builders can detect support.
Extend tests for separate and nested volumes, and fix the test’s /boot UUID.
This applies to fresh to-filesystem installs; callers still arrange for those filesystems to mount at boot. It pairs with image-builder PR #2733.
Colin’s requested direction
Colin suggests changing the interface to:
Provide an explicit --var mount option.
Automatically discover and use a DPS (Discoverable Partitions Specification) “Variable Data Partition.”
Let --var= disable that automatic discovery and retain the default /var layout.
Report global capabilities through bootc --version.
Bottom line: the current draft fixes initialization of pre-mounted /var volumes; the proposed next step is for bootc to select and mount /var itself through explicit configuration or DPS discovery. Those review suggestions are not yet implemented in the draft.
Status update (2026-10-13), replacing the earlier plan in this issue's body. The --var / DPS prototype in jmarrero-forge/bootc#1 predates the current direction and would need rework, so it's paused.
Problem.bootc install to-filesystem seeds the image's /var into the stateroot (libostree prepare_deployment_var() on OSTree, bootc's own copy on composefs). Filesystems mounted at the target's /var or below stay empty and hide that content at boot. Image builders that mount separate /var volumes hit this, and so do their post-install stages and the final relabel. Upstream issues: bootc-dev/bootc#1615, #997, #336.
Current PRs
install: Initialize separately mounted /var filesystems from the image bootc-dev/bootc#2521 (draft, 5f31d979): opt-in install to-filesystem --initialize-var-mounts. It discovers filesystems mounted under the target's /var, fills each empty tree from the seeded /var (nested mounts and hardlinks handled, SELinux labeled, syncfs), leaves non-empty trees whole, refuses symlinked mountpoints, and lists the feature in bootc --version. Remaining work: title and description, DCO sign-off, and replies to the review threads.
osbuild: needs an initialize-var-mounts option on org.osbuild.bootc.install-to-filesystem. There's no upstream PR yet.
Proposed direction (to confirm on #2521). Defer the /var copy at install, then initialize the mounts from the image, so each file lands once:
install to-filesystem --defer-var (name TBD) skips seeding /var. On OSTree that needs a marker in the stateroot var now, or a libostree deploy option later.
--initialize-var-mounts copies from the image's /var into an assembled /var (the volumes bind-mounted over the stateroot var). Without --defer-var the result is the same as today.
A day-two command (e.g. bootc state initialize-var) runs the same routine on a booted system, for volumes added later.
Open decisions:
flag names (--defer-var vs --var=empty; keep --initialize-var-mounts?);
marker vs libostree option;
whether a re-run fills only empty volumes or missing files too;
who runs the second step after a deferred install;
PR structure (keep #2521 minimal, then follow-ups).
Testing still missing for #2521 revision 2, tracked in a sub-issue: a composefs install and boot, upgrade and rollback with separate /var volumes, multiple VGs, nested-mount edge cases, and the image-builder end-to-end path, all with synthetic layouts.
Activity
jmarrero commentedon Oct 2, 2026
@jmarrero-bot open code can you summarize what the PR linked is trying to accomplish?
jmarrero commentedon Oct 2, 2026
@jmarrero-bot opencode can you summarize what the PR linked is trying to accomplish?
jmarrero-bot commentedon Oct 2, 2026
@jmarrero Unknown agent
open. Usage:@jmarrero-bot <agent> <request>; agents:claude,opencodejmarrero-bot commentedon Oct 2, 2026
@jmarrero opencode result for #2 (comment)
bootc PR #2521 aims to make separate
/varfilesystems—including LVM volumes and nested mounts such as/var/log—start with the content shipped in the container image.Why it’s needed
Currently,
bootc install to-filesystemseeds/varinto bootc’s internal state directory. A separate filesystem mounted over/varor one of its subdirectories hides that content, leaving the actual volume empty.What the draft implements
/var./var, preserving metadata, applying SELinux labels, and syncing the filesystems.initialize-var-mountscapability throughbootc container inspect, so image builders can detect support./bootUUID.This applies to fresh
to-filesysteminstalls; callers still arrange for those filesystems to mount at boot. It pairs with image-builder PR #2733.Colin’s requested direction
Colin suggests changing the interface to:
--varmount option.--var=disable that automatic discovery and retain the default/varlayout.bootc --version.Bottom line: the current draft fixes initialization of pre-mounted
/varvolumes; the proposed next step is for bootc to select and mount/varitself through explicit configuration or DPS discovery. Those review suggestions are not yet implemented in the draft.bootc-bot · opencode · 25s · exit 0
jmarrero commentedon Oct 2, 2026
@jmarrero-bot can you prototype how doing Colin's suggestions would look like?
jmarrero-bot commentedon Oct 2, 2026
@jmarrero Unknown agent
can. Usage:@jmarrero-bot <agent> <request>; agents:claude,opencodejmarrero-bot commentedon Oct 13, 2026
Status update (2026-10-13), replacing the earlier plan in this issue's body. The
--var/ DPS prototype in jmarrero-forge/bootc#1 predates the current direction and would need rework, so it's paused.Problem.
bootc install to-filesystemseeds the image's/varinto the stateroot (libostreeprepare_deployment_var()on OSTree, bootc's own copy on composefs). Filesystems mounted at the target's/varor below stay empty and hide that content at boot. Image builders that mount separate/varvolumes hit this, and so do their post-install stages and the final relabel. Upstream issues: bootc-dev/bootc#1615, #997, #336.Current PRs
5f31d979): opt-ininstall to-filesystem --initialize-var-mounts. It discovers filesystems mounted under the target's/var, fills each empty tree from the seeded/var(nested mounts and hardlinks handled, SELinux labeled,syncfs), leaves non-empty trees whole, refuses symlinked mountpoints, and lists the feature inbootc --version. Remaining work: title and description, DCO sign-off, and replies to the review threads.container inspect, which #2521 no longer has. It needs updating to readbootc --version'sFeatures:list.initialize-var-mountsoption onorg.osbuild.bootc.install-to-filesystem. There's no upstream PR yet.Proposed direction (to confirm on #2521). Defer the
/varcopy at install, then initialize the mounts from the image, so each file lands once:install to-filesystem --defer-var(name TBD) skips seeding/var. On OSTree that needs a marker in the staterootvarnow, or a libostree deploy option later.--initialize-var-mountscopies from the image's/varinto an assembled/var(the volumes bind-mounted over the staterootvar). Without--defer-varthe result is the same as today.bootc state initialize-var) runs the same routine on a booted system, for volumes added later.Open decisions:
--defer-varvs--var=empty; keep--initialize-var-mounts?);Testing still missing for #2521 revision 2, tracked in a sub-issue: a composefs install and boot, upgrade and rollback with separate
/varvolumes, multiple VGs, nested-mount edge cases, and the image-builder end-to-end path, all with synthetic layouts.Generated-by: https://github.com/jmarrero-bot#llms