bootc generic-iso using ostree rootfs#2414
Conversation
4f1b580 to
5a6c3bd
Compare
|
Will need some careful review; at least the name change will immediately break things for users and the non-embedding of containers (while I agree this can probably be done inside the bootable container itself and it's likely better there) is the same.
In what way? I'm interested what the behavioral difference is. I'm also tagging in @ondrejbudai since he's done a bunch with the ISOs for |
Not sure what to do about that.
When it is named squashfs.img it uses overlayfs and when it is rootfs.img it uses device-mapper: https://github.com/dracut-ng/dracut/blob/main/modules.d/70dmsquash-live/dmsquash-live-root.sh#L330 is the section. With device-mapper the ostree root setup doesn't properly mount things and then a whole mess of services don't start (it actually still boots, which is surprising). |
d2983aa to
56545de
Compare
56545de to
cb45918
Compare
|
I've fixed some issues I was having with fstab mounts (have to pass fstab=no to the kernel/systemd), and added a README that is read from the file storage and written to the ISO, similar to the one in the PXE tar. I've also experimented with running |
|
This PR changes the image-builder API or behaviour causing integration failures with osbuild-composer. The next update of the image-builder dependency in osbuild-composer will need work to adapt to these changes. This is simply a notice. It will not block this PR from being merged. |
|
Not sure what's up with the manifest check. Running |
There are some compilation errors, thus manifests are not generated correctly?! I think I know what is happening: unit and build tests do pass because they only test the tip of the branch. However, manifest generation is performed on every single commit individually. One of your commits does not compile correctly. |
|
|
Remove the rootfs compression code, it is now created by BootcRootFS and is included in the treePipeline. Use the ISOBootloader list and common bootloader code from iso_bootloaders. This allows the iso to support other arches and bootloader configurations. Also adds optional support for setting the ostree= value in the grub.cfg file when SetOSTREE is true. KernelOpts must already contain 'ostree=@ostree@' if this option is used. It will add the org.osbuild.ostree.grub stage which mounts the rootfs.img, examines the ostree filesystem to extract the boot path and then substitute it for @ostree@ in the grub.cfg file. Related: HMS-10627
dmsquash-live-root treats squashfs.img and rootfs.img differently, it uses the same codepath as http root for squashfs.img which is where the root filesystem detection (looking for /usr or /ostree) is triggered. If rootfs.img is used dracut sets up the root using device-mapper instead of overlay, and this does not work with ostree. Related: HMS-10627
The partition is needed for installing bootc to a partitioned disk image, and the erofs settings are used for the rootfs of the iso. Related: HMS-10627
This changes to using the bootc container directly instead of the deployed filesystem. It builds on top of BootcRootFS (also used by the bootc PXE tar image type). It uses the iso and installer customizations from the bootc distro YAML for setting up the rootfs compression and optional kernel arguments. It also uses the common bootloaders functions which should make it easier to eventually add support for other platforms. Related: HMS-10627
This starts by making sure the required modules have been included in the container's initrd. It also hooks up the blueprint customizations, and uses the YAML for the iso configuration (erofs or squashfs rootfs type). Related: HMS-10627
It's redundant and makes the ibcli image names longer than they need to be. Related: HMS-10627
This adds generation of the manifest checksums. Related: HMS-10627
Set the menu timeout if it is non-zero. 0 means use the stage default, so it is always safe to set it. Related: HMS-10627
Related: HMS-10627
Also adds tests. Related: HMS-10627
Related: HMS-10627
This adds a README to the root of the ISO that describes how to build it using image-builder. This also adds a somewhat generic method for adding files from the data store to the ISO. Resolves: HMS-10627
cb45918 to
1301d1e
Compare
This changes the bootc generic-iso so that the rootfs is the same as the bootc PXE image type.
Note that this currently doesn't actually work right. Something is wrong with how dracut or ostree is setting up the booted filesystem, it doesn't mount things correctly so on boot a number of services fail:FIXED -- ends up dmsquash-live treats
LiveOS/rootfs.imgdifferently, switched to usingLiveOS/squashfs.imgand now it boots the same as bootc PXE tar.This also renames it to
generic-iso, and it drops the support for embedding a container payload since this isn't an installer iso and is not a raw filesystem (I think the user can do the same thing when setting up their bootc container, but have not explored that).