Skip to content

Use ISOBootloader and rename to generic-iso - #2779

Merged
supakeen merged 6 commits into
osbuild:mainfrom
brlane-rht:main-generic-iso
Oct 20, 2026
Merged

supakeen merged 6 commits into
osbuild:mainfrom
brlane-rht:main-generic-iso

Conversation

@brlane-rht

Copy link
Copy Markdown
Contributor

This updates the bootc-generic-iso image to use the ISOBootloader code from 13dea1a so that all the iso types are consistent. This also allows using templates in the grub2 custom menus, and renames bootc-generic-iso to generic-iso. iso_config settings now come from the bootc yaml configuration which will make it easier to update to erofs in a future PR.

This uses the ISOBootloader list which encapsulates all the bootloader
setup like menus, timeouts, etc. And makes it consistent with other
bootable iso images. This also makes it possible for the grub menu
override in iso.yaml to use templates instead of hard-coding the kernel
and initrd parameters.

eg. Writing to iso.yaml from a Containerfile:

RUN cat <<EOF > /usr/lib/image-builder/bootc/iso.yaml
label: bootc-generic
kernel_args:
  - console=ttyS0
grub2:
  timeout: 5
  entries:
    - name: Boot Linux
      linux: \${kernelpath} \${root} inst.graphical
      initrd: \${initrdpath}
    - name: Boot Linux With debug
      linux: \${kernelpath} \${root} inst.graphical rd.debug=1
      initrd: \${initrdpath}
EOF

iso_tree_test: fix from/to associations
This allows it to be used as a TreePipeline interface.
This allows it to use the commong iso bootloader support which makes it
easier to support other architectures, and the kernel args, menu
settings and customizations are all in one place.
Use iso_config from the bootc yaml definition, and setup the
customization structs needed by ISOBootloader.

Add iso_config to bootc-generic-iso yaml, and add the list of files to
exclude from the compressed rootfs.

This also updates checksums, the only change is that troubleshooting and
debug grub2 options are now true because the grub menu has not been
overridden by an iso.yaml customization.
bootc-generic-iso's name is redundant and makes the iso name longer than
it needs to be. This changes it to generic-iso, but keeps
bootc-generic-iso as an alias for backwards compatibility. Also updates
tests and documentation.
And update the anaconda example to use the grub2 ostree stage templates
so that the kernel/root/initrd lines aren't hard-coded.
@supakeen
supakeen self-requested a review October 20, 2026 04:39

@croissanne croissanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall this makes sense to me, even though I'm not super well-versed in it. One comment regarding a comment that got removed.


if img.Grub2MenuDefault != nil {
bootTreePipeline.DefaultMenu = *img.Grub2MenuDefault
kernelOpts := []string{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is the comment above no longer valid?

		// org.osbuild.grub2.iso.legacy fails to run with empty kernel options, so let's use something harmless
		// if we didn't have any specific kernelopts set

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'm not sure why the comment was there -- we always need to set the kernel options in order for the iso boot so it'll never be empty.

@achilleas-k achilleas-k left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Pretty sweet!

This container file builds a simple bootable iso with nothing extra.

```Dockerfile
FROM quay.io/fedora/fedora-bootc:rawhide

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very minor question: Any reason this is rawhide and not latest?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's the way @lucasgarfield wrote the anaconda example so I kept things consistent.

@supakeen
supakeen added this pull request to the merge queue Oct 20, 2026
Merged via the queue into osbuild:main with commit b22feee Oct 20, 2026
55 checks passed
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.

4 participants