osbuild / bootc-image-builder

A container for deploying bootable container images.
https://osbuild.org
Apache License 2.0
120 stars 51 forks source link

Add support for `iso` #433

Open cgwalters opened 4 months ago

cgwalters commented 4 months ago

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.

jlebon commented 4 months ago

I think this overlaps with https://github.com/coreos/fedora-coreos-tracker/issues/1725.

cgwalters commented 4 months ago

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.

cdrage commented 4 months ago

@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 ?

cgwalters commented 4 months ago

Yes, we'd ensure bootc in this case would have a default install flow that would install from the booted ISO.

cdrage commented 4 months ago

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.

cdrage commented 3 months ago

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:

  1. Built a bootc image (used centos:stream9)
  2. Used bib to make a .raw
  3. 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. IMG_3169 IMG_3167