Skip to content

DRAFT: Use image-builder generic-iso to build coreos live iso - #4325

Draft
Roshan-R wants to merge 10 commits into
coreos:testing-develfrom
Roshan-R:image-builder-generic-iso
Draft

DRAFT: Use image-builder generic-iso to build coreos live iso#4325
Roshan-R wants to merge 10 commits into
coreos:testing-develfrom
Roshan-R:image-builder-generic-iso

Conversation

@Roshan-R

@Roshan-R Roshan-R commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Build CoreOS ISOs using image-builder's generic-iso

The image-builder used to build the ISO comes from an unmerged image-builder fork containing the changes from osbuild/image-builder#2414.

This PR builds on @jbtrystram 's work to get CoreOS ISOs working with image-builder's generic-iso pipeline. It adds the Fedora CoreOS-specific configuration needed to build a bootable live ISO using image-builder instead of coreos-assembler.

The generated ISO currently boots successfully when SELinux is disabled with selinux=0. There are still a number of workarounds in place, and the resulting ISO has several limitations that need to be addressed before this can provide a complete replacement for the existing CoreOS ISO build.

This PR adds the FCOS-specific pieces needed on top of image-builder's generic ISO infrastructure:

  • Add the GRUB CD bootloader, EROFS, dracut-live, and shim packages required by the generic ISO.
  • Provide the EFI layout expected by image-builder's GRUB ISO stage.
  • Add an FCOS-specific iso.yaml with the required live ISO kernel arguments and serial console configuration.
  • Disable composefs for the live image, since the EROFS/overlayfs root setup is incompatible with composefs.
  • Adapt the FCOS live dracut modules to image-builder's ISO layout, including avoiding the boot partition and rootfs.img paths used by coreos-assembler media.
  • Dynamically size the root partition based on the generated rootfs instead of using a fixed disk size.

Limitations

Offline installation is not supported.

The ISO does not currently contain the CoreOS .osmet files required for offline installation with coreos-installer.
See: joelcapitao/bib-fcos-experimentation#9

coreos-installer iso * customization is not supported.

The ISO is missing the CoreOS-specific embed areas required by coreos-installer for ISO customization.
See: joelcapitao/bib-fcos-experimentation#102

Only x86_64 has been tested.

The configuration includes support for other architectures, but aarch64 and other architectures have not yet been tested.

SELinux must currently be disabled.

The generated ISO only boots successfully with selinux=0. Without this, lot of systemd services fail due to selinux permission issues.

The live-image stamp file is created in the dracut module.

The stamp file checked by is-live-image is currently created from within the dracut module itself. Ideally, this file should be created as part of the ISO build process rather than being added by the initramfs module.

Add the total size of the disk image to the image-builder partition
table. This will have the side effect of increasing the metal image to
the same 10G size of the cloud images.

See coreos/fedora-coreos-tracker#2188
Then inject it into the image-builder partition table. This avoids
hard-coding the rootfs size and restore the same functionality we
have in COSA.

See coreos/fedora-coreos-tracker#2188
This way we have a default disk that is fitted to the partition size.
We will override that with a size hint in blueprints.

If i understand coreos/fedora-coreos-tracker#2188 (comment)
that should be possible.
@Roshan-R
Roshan-R force-pushed the image-builder-generic-iso branch from d302b68 to 020a1e8 Compare August 28, 2026 13:15
…age-builder

Add packages and postprocess steps required by osbuild/image-builder
for live ISO builds, including EFI binaries, erofs, Python, and
composefs configuration.
Adapt the coreos-live dracut module for image-builder generic ISOs:
- Use dmsquash-live to mount LiveOS/squashfs.img.
- Avoid generating conflicting sysroot.mount units.
- Set up /sysroot/etc after the ephemeral filesystem is ready.
- HACK: Add the coreos-live-initramfs marker for live image detection.
- Skip cosa-specific osmet persistence when rootfs.img is unavailable.
Add a custom image-builder iso.yaml to configure the Fedora CoreOS
label, kernel arguments, GRUB timeout, and Live boot menu entry.
@Roshan-R
Roshan-R force-pushed the image-builder-generic-iso branch from b4d4414 to 8187414 Compare August 31, 2026 16:55
@Roshan-R

Copy link
Copy Markdown
Contributor Author

I was able to get SELinux working. The issue was caused by systemd-etc.mount failing because dmsquash-live mounts the full overlayfs at /sysroot, which means /sysroot/etc is already covered by the overlayfs mount.

When sysroot-etc.mount subsequently tries to bind mount /run/ephemeral/etc over /sysroot/etc, systemd detects that the path is already covered by the existing overlayfs mount. As a result, the mount condition evaluates to false and systemd skips the bind mount entirely.

To work around this, I replaced systemd-etc.mount with a systemd-etc-setup.service that explicitly unmounts the existing /sysroot/etc mount before setting up the bind mount. This allows the /run/ephemeral/etc bind mount to be applied correctly and makes SELinux work as expected.

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.

2 participants