-
Notifications
You must be signed in to change notification settings - Fork 129
Description
We should support something as straightforward as
$ bootc install quay.io/examplecorp/mycustomos:latest /dev/nvme0n1
This would:
- Partition the disk in an opinionated way
- Install the bootloader
- Install the content from the container image
Partitioning
Obviously...there's a lot of tooling here. We should consider supporting at least Ignition as well as systemd-repart for nontrivial disk image setups.
Bootloader
For now, let's require that the target OS is setup using bootupd.
container image install
All the rest of the stuff (i.e. 99%) comes from the container image itself; we just need to call out to e.g. https://github.com/coreos/coreos-assembler/blob/d039e883059c48f2310572955682b9d25f4b6d61/src/create_disk.sh#L350
(Of course the steps above are also done in the example cosa code - we could hardcode some defaults, or probably better make it configurable in the image)
One idea here is to do a multi-stage fetch; we pull the container via e.g. podman
(or actually instead, assume the UX is podman run --privileged quay.io/examplecorp/mycustomos:latest bootc install /dev/vda
? Then we can use something more like the deploy-from-self logic)
install --replace-booted-block-device
We could also support bootc install --replace-booted-block-device quay.io/examplecorp/mycustomos:latest
which would implement this flow - basically, we:
- Move the running code into RAM (systemd switch root? Or just replace pid1 entirely)
wipefs
the booted block device- Run the same
install
logic over that block device
install --switch-root
It'd make sense to support systemctl switch-root
to the new target rootfs, but without using the new kernel. (But, we should be really clear when we're in a kernel != root situation)