Skip to content

composefs images must run bootupctl backend generate-update-metadata during build or bootloader installation will fail #2265

Open

Description

@jmpolom

Looks like having RUN bootupctl backend generate-update-metadata in a Containerfile that builds a 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.

This was also tested with --bootloader systemd which arguably had a worse failure since it was silent but still resulted in a non-bootable image as the bootloader EFI executables appeared to not get installed in the ESP.

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,
}

Generating the bootupd metadata during the image build appears to have definitively resolved this problem though.

This was mentioned in another now closed issue however it was not addressed in the updated composefs image requirements documentation.

Specifically I am unclear if this is expected and a requirement of the image to be able to be installed with bootc and subsequently booted or if something else is wrong.

Activity

  1. cgwalters commented on Sep 28, 2026

    @cgwalters
    Member

    If all you want is pure systemd-boot, with no shim, then the current best practice is to remove bootupd from your image. Does that help?

  2. jmpolom commented on Sep 28, 2026

    @jmpolom
    Author

    I don't actually mind shim being present. The main question was whether when bootupd is present is it expected that the bootupd metadata needs to be generated in the image at build time? It seems like it is a required image build step since it did not work without running the metadata generation command.

    On systemd-boot support however, is it necessary to run bootc container ukify to generate a compatible UKI for systemd-boot to load? I believe I did eventually get this working with systemd-boot but shim was definitely present in the image build (efi secure boot was not enabled) but I'm not sure how much that would matter. I assume this is optional if one wants to adopt UKIs.

  3. added 6 commits that reference this issue on Sep 29, 2026
    1d32acd
    fb7cbd1
    1f5b6e1
    5092154
    16bfe0f
    7eb4cac
  4. added a commit that references this issue on Nov 24, 2026
    f58664b
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions