Skip to content

image-builder: honor repart.d partition definitions from the bootc container #99

Open

Description

@cgwalters-bot

From cgwalters' review of cgwalters-forge/image-builder#1: instead of hardcoding layout choices (e.g. ESP size for UKI images) in image-builder, honor systemd-repart repart.d definitions shipped in the bootc container. Related: bootc-dev/bootc#2314

Activity

  1. locked as resolved and limited conversation to collaborators on Oct 18, 2026
  2. cgwalters-bot commented on Oct 22, 2026

    @cgwalters-bot
    CollaboratorAuthor

    ❌ dispatch failed (agent, check, apply: failure/skipped/skipped; the agent's exit state: 1).

  3. cgwalters-bot commented on Oct 22, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Conclusion: still wanted, not started, and it needs the operator's decision on the approach before an implement run. Nothing in image-builder reads repart.d yet, and the design is being argued upstream in osbuild/image-builder#2738 (opened by cgwalters on 2 Oct, six days after this item), where the maintainer proposes a different mechanism than this item's wording implies. Triage as of 21 Oct 2026.

    What exists today

    • The PR this came from, cgwalters-forge/image-builder#1, went upstream as osbuild/image-builder#2719 and merged 28 Sep. It kept the default 501 MiB ESP on purpose and deferred the size to the container, i.e. to this item.
    • bootc-dev/bootc#2314 merged 1 Oct. bootc install to-disk now runs systemd-repart when the container has repart.d/*.conf under /etc, /run, /usr/local/lib or /usr/lib, injects a root definition if none is shipped, and falls back to sfdisk otherwise (bootc-installation.7.md, "systemd-repart"; code in crates/lib/src/install/baseline.rs). So the container side is in place.
    • image-builder main (f43ddf4, 21 Oct): the only mention of repart is an alignment comment in pkg/disk/partition_table.go. The bootc base table comes from the container's /usr/lib/bootc-image-builder/disk.yaml (pkg/bib/osinfo/osinfo.go) or the built-in YAML, in basePartitionTable and genPartitionTable of pkg/distro/defs/bootc_imagetype.go. pkg/osbuild has no wrapper for osbuild's org.osbuild.systemd-repart stage (osbuild#2189, #2460), so partitioning with repart from a manifest needs that first.
    • Upstream #2738 (cgwalters and supakeen, 2 to 3 Oct). Agreed so far: it must be opt-in, because Fedora ships repart.d for root growth so mere presence cannot be the trigger; disk.yaml wins over repart.d, which wins over the built-in layout; start with the root filesystem type and the ESP. Not agreed: the mechanism. supakeen proposes letting systemd-repart create the disk image and deploying with to-filesystem onto it (mounted via systemd-dissect), and notes fstab or mount units are then a problem on BIOS, where gpt-auto does not mount the ESP. cgwalters' last word there: "we still need to define coherent semantics". The parent epic #15 also says it waits on operator text.

    Decision for cgwalters

    Which first PR, if any, to send upstream while #2738 is open. Option A, narrow mapping: read the container's repart.d, take the Type=esp size and the Type=root Format= and size, and apply them to image-builder's own partition table behind an opt-in flag, only when the container has no disk.yaml. It fits one PR and is testable with a unit test on a fake root tree plus a boot test of a UKI image shipping a 2G ESP definition, but it is a reimplementation of a slice of repart.d semantics that the maintainer may see as a half-measure. Option B, the mechanism supakeen sketched: a Go wrapper for the osbuild systemd-repart stage, then a bootc pipeline that partitions with repart and deploys with to-filesystem, which overlaps the bootc install mount work in cgwalters-forge/image-builder#7. That is two or three PRs and should wait for the semantics to be settled on #2738. Option C: hold this item, pointing at #2738, until the design converges upstream. My recommendation is to settle the mechanism on #2738 first; if you want movement now, A is the only piece that fits one PR, and a job plan for it can follow once you pick.

    Generated by dispatch · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions