bootc-dev / bootc-dev/bootc

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

Offen
#2,265 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
2.3k
Forks
230
Ø Merge
3 T. 3 Std.
Gemergte PRs (30 T.)
36

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie mit docs/src/bootc-images.md und vergleichen Sie dessen Anforderungen an composefs-Images mit dem gemeldeten Befehl bootupctl backend generate-update-metadata. Reproduzieren Sie nach Möglichkeit das bereitgestellte bootc-Installationsbeispiel und dokumentieren Sie anschließend, ob die Metadatengenerierung erforderlich ist und wo sie in den Ablauf der Image-Erstellung oder Installation gehört.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
documentation, operating-systems
Issue-Typ
Dokumentation
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
65/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.