Non-interactive anaconda ISO requires additional `bootc switch --migrate-in-place`
When creating a BIB image without specifying a kickstart script in the configuration, the following command is added as a %post step:
bootc switch --mutate-in-place --transport %s %s
(source)
However, when the operator specifies their own kickstart (e.g. adds custom steps or an empty string to force an interactive installer), this step is not added through osbuild. Therefore, the operator must be aware of this command (which is not documented anywhere!) and explicitly add it to the config file.
This function which adds that bootc switch command seems to be exiting early when the operator provides any sort of content in the kickstart (including a blank string - ""), so the command wouldn't be present in the resulting ISO unless this is explicitly defined in the config.toml input.
I feel that since we have ostreecontainer in our kickstart unconditionally (even when a user provided kickstart is there), that we should probably do the same with bootc switch?
Alternatively we can document that users need to add this always but that seems a bit less friendly.
cc @mvo5 / @achilleas-k.
Yes, we should add it automatically.
Yes, we should add it automatically.
Before I make the change in images, is it intended to be permanent or is the plan that kickstarts' ostreecontainer be changed to take care of this eventually?
The proper fix is anaconda getting a proper support for bootc, see: https://github.com/rhinstaller/anaconda/discussions/5197
Can this issue be closed? It looks like this may have been resolved in https://github.com/osbuild/images/commit/2651be020a53db7f44d39ef028934fe55bc66d5d even though anaconda's updated bootc support isn't yet available. I've noticed that recent ISO builds I've done with BIB have included the bootc switch line in the osbuild-base.ks when I supply a custom kickstart.
I've still been having a problem where bootc switch isn't being executed, even when included in the kickstart. I believe that's due to this separate issue though where kickstart %post scripts are not being executed: https://github.com/osbuild/bootc-image-builder/issues/968
Can this issue be closed? It looks like this may have been resolved in https://github.com/osbuild/images/commit/2651be020a53db7f44d39ef028934fe55bc66d5d even though anaconda's updated bootc support isn't yet available. I've noticed that recent ISO builds I've done with BIB have included the
bootc switchline in the osbuild-base.ks when I supply a custom kickstart.I've still been having a problem where
bootc switchisn't being executed, even when included in the kickstart. I believe that's due to this separate issue though where kickstart %post scripts are not being executed: https://github.com/osbuild/bootc-image-builder/issues/968
Yes, we include this in our base kickstart. It could be that it's not being executed due to the listed resolved bug, but in that case make sure you're using a new enough container.
If someone still encounters issues, please reopen this issue or file a new one.