Skip to content

Base image layout requirements for installations using --composefs-backend #2237

Closed

Description

@jmpolom

The documentation for the composefs backend doesn't explain how to structure an image that will be compatible with bootc to install an image using said backend (instead of ostree). There should be some description of what needs to land where (ex: kernel images) in the image to ensure bootc can install it, and it boots.

The lone example in the composefs docs does not appear to describe a base image build. Though, it does appear the image layout is likely not entirely the same as ostree. A script from bootcrew might be the best suggestion yet at what is required to build a compatible image.

Documentation should be available to enable early base image build trials with this new backend.

Activity

  1. added
    triaged
    area/composefs
    on Jun 10, 2026
  2. cgwalters commented on Jun 17, 2026

    @cgwalters
    Member

    Thanks for filing this issue! PR in #2257 which should clarify things (and I found a bug when doing it) - any review appreciated.

  3. jmpolom commented on Jun 18, 2026

    @jmpolom
    Author

    Suggest an addition describing how to perform (today) post bootc install deployment specification configuration. Ex: dropping some files into the /etc directory for the newly installed system. Currently with ostree one can ostree admin --sysroot=/target --print-current-dir to get a path. What is the bootc equivalent?

  4. jmpolom commented on Jun 22, 2026

    @jmpolom
    Author

    Looks like having RUN bootupctl backend generate-update-metadata in a Containerfile that builds the target composefs compatible image is required or else the subsequent installation will fail when the image gets installed (example) podman run --rm --privileged --pid=host -v /var/lib/containers:/var/lib/containers -v ./:/out --security-opt label=type:unconfined_t localhost/bootc-composefs-test:latest bootc install to-disk --via-loopback /out/disk.img --filesystem ext4 --wipe --composefs-backend --bootloader grub.

    Example failure output:

    > mkfs.fat /dev/loop0p1 -n EFI-SYSTEM
    Bootloader: grub
    Installing bootloader via bootupd
    error: boot data installation failed: Failed to find EFI update metadata
    error: Installing to disk: Setting up composefs boot: Installing bootloader: Failed to run command: Command {
        program: "bootupctl",
        args: [
            "bootupctl",
            "backend",
            "install",
            "--write-uuid",
            "--filesystem",
            "/run/bootc/mounts/rootfs",
            "/run/bootc/mounts/rootfs",
        ],
        create_pidfd: false,
    }
    

    Worse, it appears the bootupctl backend and all descendent sub-commands are "hidden" and not documented in the help output from bootupctl (this is a bug in and of itself as hidden flags are fundamentally user hostile). I'm not honestly clear where this is documented but it appears to me this functionality of bootupd is documented nowhere as the docs/ directory in the bootupd repo has no useful information (see: https://github.com/coreos/bootupd/tree/main/doc).

    At a minimum this needs to get wrapped up into any documentation bootc has for using the composefs backend with existing build tools (ie: podman build and Containerfiles).

    However I will add that this guidance does appear to (mostly) work. So good on that.

  5. cgwalters commented on Jun 22, 2026

    @cgwalters
    Member

    Suggest an addition describing how to perform (today) post bootc install deployment specification configuration. Ex: dropping some files into the /etc directory for the newly installed system. Currently with ostree one can ostree admin --sysroot=/target --print-current-dir to get a path. What is the bootc equivalent?

    Let's use #542 for that - while some of these things do relate to each other, I think this issue as originally filed was pretty tightly scoped to "mechanics of container image content".

    but it appears to me this functionality of bootupd is documented nowhere as the docs/ directory in the bootupd repo has no useful information (see: https://github.com/coreos/bootupd/tree/main/doc).

    Thanks, this is also valid, I filed coreos/bootupd#1119

    Note that today you can also use systemd-boot with the composefs backend.

  6. jmpolom commented on Jun 22, 2026

    @jmpolom
    Author

    Note that today you can also use systemd-boot with the composefs backend.

    I was able to get that working but using an image built with RUN bootupctl backend generate-update-metadata, should it work without having to generate metadata during the container build process?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/composefstriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions