bootc icon indicating copy to clipboard operation
bootc copied to clipboard

Provide warning when switching between distributions

Open p5 opened this issue 1 year ago • 2 comments

Bootc is available on RHEL, CentOS and Fedora, and I recently accidentally bootc switched a server from Fedora to CentOS resulting in a broken system (emergency mode in AWS so couldn't change in the grub menu [1]), it would be good if somehow Bootc could detect when you're switching from one distribution to another and provide an appropriate warning.

This was completely my fault, and this operation isn't something I would expect bootc to work with, however a warning or error would help prevent others from making this same mistake.

[1] It's highly likely you can switch to the older grub boot entry from emergency mode, but it's not obvious how to do so (not Bootc's problem though), and the serial console is only available on the more expensive instance types

p5 avatar Jun 17 '24 17:06 p5

The specific problem here is likely that the c9s kernel doesn't understand the root filesystem setup (if you used btrfs for example, but also I think Fedora's mkfs.ext4 uses too new options for c9s too, etc).

There's a lot of questions around how we'd do anything in this space. I guess we could add a generic speedbump here when one tries to switch between ID as defined by /usr/lib/os-release, but that needs design for how one would override it if desired (bootc switch --allow-osid-override?).

Many of the problems that would occur here also would occur on major version downgrades though too though.

cgwalters avatar Jun 18 '24 12:06 cgwalters

Yeah. in some cases, you may explicitly want to test that upgrade path on a test cluster. If it works, go ahead and do it in prod. So some way of overriding it would be really important.

kfox1111 avatar Feb 26 '25 17:02 kfox1111