Skip to content

install: improve error message when systemd-boot is selected without composefs backend #2093

@andrewdunndev

Description

@andrewdunndev

Summary

When --bootloader=systemd is specified without --composefs-backend, the error message is:

error: Installing to disk: bootupd is required for ostree-based installs

This doesn't tell the user what to do. The fix is to use --composefs-backend, but the error message doesn't mention composefs at all. It reads like bootupd is a hard requirement, when actually systemd-boot works fine with the composefs backend.

Reproduction

podman run --rm --privileged --pid=host \
    -v /dev:/dev -v /var/lib/containers:/var/lib/containers \
    quay.io/fedora/fedora-bootc:42 \
    bootc install to-disk --wipe --bootloader systemd --filesystem xfs /dev/sdX

Suggested improvement

Something like:

error: systemd-boot is not supported with the ostree backend. Use --composefs-backend to enable systemd-boot support.

Or if the user explicitly asked for systemd-boot, auto-enable composefs (with a note).

Context

The current error is at install.rs:1818. The bail message is technically accurate but not actionable for users who don't know about the composefs/ostree backend distinction.

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