Skip to content

Conversation

@ondrejbudai
Copy link
Member

Anaconda has recently got a new verb for bootc container images, this commit adds support for it for bootc-installer.

This is currently opt-in via yaml configs, we need to decide how to enable it automatically.

The code is testable with this Containerfile:

FROM quay.io/fedora/fedora-bootc:rawhide
RUN dnf --setopt=tsflags=noscripts install -y dnf5-plugins  && dnf copr enable -y @rhinstaller/Anaconda
RUN dnf install -y \
     anaconda \
     anaconda-install-env-deps \
     anaconda-dracut \
     dracut-config-generic \
     dracut-network \
     net-tools \
     squashfs-tools \
     grub2-efi-x64-cdboot \
     python3-mako \
     lorax-templates-* \
     biosdevname \
     prefixdevname \
     && dnf clean all
# shim-x64 is marked installed but the files are not in the expected
# place for https://github.com/osbuild/osbuild/blob/v160/stages/org.osbuild.grub2.iso#L91, see
# workaround via reinstall, we could add a config to the grub2.iso
# stage to allow a different prefix that then would be used by
# anaconda.
# once https://github.com/osbuild/osbuild/pull/2202 is merged we
# can update images/ to set the correct efi_src_dir and this can
# be removed
RUN dnf reinstall -y shim-x64
RUN mkdir -p /boot/efi && cp -av /usr/lib/efi/{shim,grub2}/*/EFI /boot/efi/
# lorax wants to create a symlink in /mnt which points to /var/mnt
# on bootc but /var/mnt does not exist on some images.
#
# If https://gitlab.com/fedora/bootc/base-images/-/merge_requests/294
# gets merged this will be no longer needed
RUN mkdir /var/mnt

and this command:

# podman build -t fedora-installer:44 .
# podman pull quay.io/centos-bootc/centos-bootc:stream10
# image-builder build --bootc-ref localhost/fedora-installer:44 --bootc-installer-payload-ref quay.io/centos-bootc/centos-bootc:stream10 bootc-installer --default-fstype ext4

Note that you have to have osbuild with osbuild/osbuild#2242, marking as a draft until it gets merged.

anaconda has recently got a new verb for bootc container images. This
commit adds support for it. It's currently opt-in via yaml definitions
before we decide how to enable it automatically for relevant distros.
@ondrejbudai ondrejbudai requested review from mvo5 and supakeen November 25, 2025 12:32
@ochosi ochosi marked this pull request as ready for review November 26, 2025 00:03
@ochosi ochosi requested a review from a team as a code owner November 26, 2025 00:03
@ochosi ochosi requested a review from bcl November 26, 2025 00:03
@ochosi
Copy link
Contributor

ochosi commented Nov 26, 2025

Marked as ready for review since the related osbuild PR has been merged.

Copy link
Contributor

@bcl bcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, after fixing the conflict.


// BootcInstallVerb controls which directive to use in kickstart files for bootc installer ISOs.
// Valid values are "ostreecontainer" (default) and "bootc"
BootcInstallVerb *string `yaml:"bootc_install_verb,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not have to be a pointer, empty string is a good default.

Copy link
Member

@supakeen supakeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine to have but needs rebasing and linter appeasement.

A small question, if Anaconda supports the bootc verb depends on the Anaconda version but we do not have bootc definitions per-version (as we don't really know what we're building).

Should this then be left to the user or container build to determine instead of the YAML definitions which would apply to all? I can imagine it not specifically making sense for us to inject a kickstart in bootc-installer but that having to be done in the installer container instead?

image_func: "bootc_legacy_iso"
# Uncomment the following lines to use the bootc verb instead of ostreecontainer
# installer_config:
# bootc_install_verb: bootc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is under anaconda-iso, should it be under bootc-installer instead?

@github-actions
Copy link

This PR is stale because it had no activity for the past 30 days. Remove the "Stale" label or add a comment, otherwise this PR will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jan 17, 2026
@supakeen
Copy link
Member

Not stale.

@github-actions github-actions bot removed the Stale label Jan 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants