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.
Looks like having
RUN bootupctl backend generate-update-metadatain 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 systemdwhich 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:
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.