bootc-dev / bootc-dev/bootc

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

Open
#2,265 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.3k
Forks
230
Avg merge
3d 12h
Merged PRs (30d)
38

Description

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](https://github.com/bootc-dev/bootc/issues/2237#issuecomment-4764335018) in another now closed issue however it was not addressed in the updated [composefs image requirements](https://github.com/bootc-dev/bootc/blob/main/docs/src/bootc-images.md) 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.

Contributor guide

Open the contributing guide

Research direction

Start with docs/src/bootc-images.md and compare its composefs image requirements with the reported bootupctl backend generate-update-metadata command. Reproduce the provided bootc install example if possible, then document whether metadata generation is required and where it belongs in the image-build or installation workflow.

Written by the indexing model from the issue text.

Assessment

Domain
documentation, operating-systems
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.