-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install: Support reinstallation (factory reset) #404
Comments
BTW one tricky thing in this is kernel arguments...cc #401 And also related to this, we should probably go to some effort to preserve the original kargs. An entirely different way to implement this would be to retain a pinned version of the original installed deployment. Some people will want to do that, and we already effectively support it with |
One question came up tangentially related to this too - why does the current install integration test suite not work on an ostree based system? First there's two things; the For the alongside install tests, it's basically because of this. We'd need to be sure to use an alternative stateroot vs the booted one, etc. |
I'd love to have such a reset functionality for |
Maybe an option to reset state on just a single file in etc or a path under etc too, rather then a complete reset. |
I consider `bootc install to-filesystem` support a key feature of bootc. In theory today one can still set up a system directly with `ostree` and we will continue to support that. But things like logically bound images we do want to be initialized from the start and that's with `bootc install to-filesystem`. Maintaining the feature just has a logistical annoyance any time one touches the install code as we often end up needing to carefully `#[cfg(feature = "install")]` in many places in an infectious way. Also as we head towards enabling factory reset containers#404 we really do want some of the install code enabled there. However, `to-disk` is much more of a "demo". I don't want bootc to grow too much knowledge around block devices. Complex setups (LVM, LUKS) etc. are the domain of external installers and provisioning tools. So the feature gate is now on that (which is still on by default). We ended up with more `#[cfg(feature = "install-to-disk")]` than I'd have liked, but some of that can be fixed subsequently. Signed-off-by: Colin Walters <walters@verbum.org>
I consider `bootc install to-filesystem` support a key feature of bootc. In theory today one can still set up a system directly with `ostree` and we will continue to support that. But things like logically bound images we do want to be initialized from the start and that's with `bootc install to-filesystem`. Maintaining the feature just has a logistical annoyance any time one touches the install code as we often end up needing to carefully `#[cfg(feature = "install")]` in many places in an infectious way. Also as we head towards enabling factory reset containers#404 we really do want some of the install code enabled there. However, `to-disk` is much more of a "demo". I don't want bootc to grow too much knowledge around block devices. Complex setups (LVM, LUKS) etc. are the domain of external installers and provisioning tools. So the feature gate is now on that (which is still on by default). We ended up with more `#[cfg(feature = "install-to-disk")]` than I'd have liked, but some of that can be fixed subsequently. Signed-off-by: Colin Walters <walters@verbum.org>
I consider `bootc install to-filesystem` support a key feature of bootc. In theory today one can still set up a system directly with `ostree` and we will continue to support that. But things like logically bound images we do want to be initialized from the start and that's with `bootc install to-filesystem`. Maintaining the feature just has a logistical annoyance any time one touches the install code as we often end up needing to carefully `#[cfg(feature = "install")]` in many places in an infectious way. Also as we head towards enabling factory reset containers#404 we really do want some of the install code enabled there. However, `to-disk` is much more of a "demo". I don't want bootc to grow too much knowledge around block devices. Complex setups (LVM, LUKS) etc. are the domain of external installers and provisioning tools. So the feature gate is now on that (which is still on by default). We ended up with more `#[cfg(feature = "install-to-disk")]` than I'd have liked, but some of that can be fixed subsequently. Signed-off-by: Colin Walters <walters@verbum.org>
Hello folks, is there a clear path of what to do next to make this happen? |
So #137 landed some important preparatory code here. However...that's covering the "reinitialize system from a different bootc container image". What we obviously could streamline is the flow of "reinitialize system from the booted image". Probably something like |
#137 is tracking part of this, a lot of related discussion in coreos/fedora-coreos-tracker#399
Basically we should support something like
bootc install factory-reset
that would configurably wipe local system state.On the implementation side...I think the best way to do this would be something like:
etc
targeting a new staterootThe beauty of this approach is that the "factory reset" would actually also be fully transactional, i.e. you could roll back into the previous state. It'd be easy to copy over any desired state (SSH host keys, cached container images e.g.) from the previous boot before deleting it.
The text was updated successfully, but these errors were encountered: