Skip to content
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

Open
cgwalters opened this issue Mar 19, 2024 · 4 comments
Open

install: Support reinstallation (factory reset) #404

cgwalters opened this issue Mar 19, 2024 · 4 comments
Labels
area/install Issues related to `bootc install` enhancement New feature or request

Comments

@cgwalters
Copy link
Collaborator

cgwalters commented Mar 19, 2024

#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:

  • Create new deployment with fresh etc targeting a new stateroot
  • Boot into it
  • optional: clean up old deployment + stateroot

The 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.

@cgwalters cgwalters added area/install Issues related to `bootc install` enhancement New feature or request labels Mar 19, 2024
@cgwalters cgwalters changed the title install: Support reinstallation install: Support reinstallation (factory reset) Mar 20, 2024
@cgwalters
Copy link
Collaborator Author

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 ostree admin pin. However...rolling back to that in the general case will imply rolling back to something pretty outdated, which we don't want to encourage. So I think we should focus more on better capturing and maintaining the bits of state that we want from that which mostly I think boils down to kargs.

@cgwalters
Copy link
Collaborator Author

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 to-disk code; that works everywhere, it's easy we just use loopback.

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.

@vrothberg
Copy link
Member

I'd love to have such a reset functionality for bootc-{switch,update} as well.

@kfox1111
Copy link

Maybe an option to reset state on just a single file in etc or a path under etc too, rather then a complete reset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/install Issues related to `bootc install` enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants