Add support for `iso`
See https://github.com/osbuild/bootc-image-builder/pull/165/commits/461937c40bd14515047fad635ca7a1cec166439f
Basically I'd like to add a new iso target which takes the input container image, and just directly makes it a bootable ISO.
This is totally distinct from what anaconda-iso is today.
(But longer term...once anaconda itself is a bootc container image (which would make total sense IMO) then anaconda-iso just becomes a special case of iso...some interesting details here)
The use case here is very similar to what we have for Fedora CoreOS and derivatives like RHEL CoreOS - the ISO produced there isn't anaconda, it's just the OS itself...with the installer as an app. Which also makes it usable in diskless scenarios.
I think this overlaps with https://github.com/coreos/fedora-coreos-tracker/issues/1725.
One tangentially related thing here is the "live-os" logic; there's some special ostree+liveos sauce in the FCOS initramfs today. I think it would make sense to generalize.
@cgwalters Silly question, but I'm assuming this will be like a "live USB" stick that you can load on? After you live boot it, what would be the way to install? I'm assuming I can simply do: bootc install to-disk ?
Yes, we'd ensure bootc in this case would have a default install flow that would install from the booted ISO.
Yes, we'd ensure bootc in this case would have a default install flow that would install from the booted ISO.
An awesome use-case personally for me is to have a "kubernetes node usb stick" and be able to plug it into any arbitrary computer to make it into another temporary node and have it appear in the cluster for testing.
Big 👍 from me.
Excuse my lack of knowledge for .iso... but this works as a live image already?
I did some testing and all I did was "burn" my .raw to a USB stick using etcher
I don't think we need to do anything because "burning the raw to disk" worked for me.
I just booted up a bootc image as a live OS using the raw output.
My steps:
- Built a bootc image (used centos:stream9)
- Used bib to make a .raw
- Used https://etcher.balena.io/ to write to a USB stick that was more than 10GB.
Obviously it will show up as 10GB because it needs the disk repartitioned, but it works!
I'm able to SSH, run containers.. do everything really as it's all being ran on the USB.
In addition to an iso target, I'd also like a target of bootc-image-builder that outputs a squashfs, initramfs, and kernel to an output directory, which would be convenient for setting up PXE booting (the user would provide their own bootloader and bootloader config).
@cdrage's method isn't, strictly speaking, a live image, because a live image does extra work (dracut livenet module) to copy the live image into RAM disk.
The docs mention both type=iso and type=anaconda-iso like they are interchangeable. This either means that they currently are interchangeable, or that there's some incorrect documentation. Can anybody please clarify?
--type=iso
https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/using_image_mode_for_rhel_to_build_deploy_and_manage_operating_systems/creating-bootc-compatible-base-disk-images-with-bootc-image-builder_using-image-mode-for-rhel-to-build-deploy-and-manage-operating-systems#creating-iso-images-by-using-bootc-image-builder_creating-bootc-compatible-base-disk-images-with-bootc-image-builder
--type=anaconda-iso
(https://osbuild.org/docs/bootc/#-image-types)
Thanks!
From the source code of the bootc-image-builder container I can tell that the following image types are supported (as of :
var supportedImageTypes = map[string]imageType{
"ami": imageType{Export: "image"},
"qcow2": imageType{Export: "qcow2"},
"raw": imageType{Export: "image"},
"vmdk": imageType{Export: "vmdk"},
"vhd": imageType{Export: "vpc"},
"gce": imageType{Export: "gce"},
"anaconda-iso": imageType{Export: "bootiso", ISO: true},
"iso": imageType{Export: "bootiso", ISO: true},
}
Also I just tested: For me it works with
--type iso
https://github.com/osbuild/bootc-image-builder/blob/86e9fdc744f7565463cb3a7559e2f0e3ac379145/bib/internal/imagetypes/imagetypes.go#L15C1-L24C2
Thanks for taking a look! I am not sure I understand the difference between the two, and what the distinct use cases are. I haven't been able to find any documentation on it either. Will keep poking around, and I'll share links here if I find any.
What do you think about renaming iso to live-iso? To me, that clarifies what this issue is about compared to "iso". We've had a number of requests for PXE/HTTPboot images and it would be awesome if we could easily create images for this.
For PXE this also relates now to https://github.com/containers/bootc/issues/898 - the awesome part about doing things that way is that you don't create (disk) images at all!
But obviously for ISOs that's a different thing.
Thanks for taking a look! I am not sure I understand the difference between the two, and what the distinct use cases are. I
There is no difference in the code today between iso and anaconda-iso, this issue was about possibly introducing that.
Note that support for 'the Anaconda environment is a (derived) bootc container' is landing soon-ish here: https://github.com/osbuild/images/pull/1906 (will need to be plumbed through).
@mvo5 I think all the bits are now everywhere with https://github.com/osbuild/bootc-image-builder/pull/1094 and this issue might be closed? Perhaps pending some docs?
Yeah, the low-level side is done on our side but it is currently focused on anaconda and we need some way to make things nicer (see discussion in https://github.com/osbuild/bootc-image-builder/pull/1094#pullrequestreview-3397526457 - I have no strong opinion about keeping it open or closing it.