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

Target a different installation than the one on / #121

Open
Dieterbe opened this issue Nov 19, 2021 · 3 comments
Open

Target a different installation than the one on / #121

Dieterbe opened this issue Nov 19, 2021 · 3 comments

Comments

@Dieterbe
Copy link

While aconfmgr looks awesome, as a new user i want to be rather careful with attempting my first few "apply" commands onto my live system.

Is it possible to restore/apply into a separate directory or chroot?
That would make it pretty easy to run apply "safely" and then compare it against the real system, to see how correct apply was, and to find any issues with permissions, files not being restored properly etc, without breaking the main system. This would also allow "safer" experimentation with more aggressive changes to the .sh files.

If this is not supported, I suppose the next best thing would be to restore into a VM, which brings another question: what needs to be in place, at a minimum, in order for aconfmgr to operate? A blockdevice? A filesystem? A full arch linux installation ?

cheers

@CyberShadow
Copy link
Owner

CyberShadow commented Nov 19, 2021

While aconfmgr looks awesome, as a new user i want to be rather careful with attempting my first few "apply" commands onto my live system.

aconfmgr will prompt for a confirmation before every system modification. With --paranoid, it will ask twice for some operations, or ask for individual items for batch operations.

Is it possible to restore/apply into a separate directory or chroot?

Not at the moment.

That would make it pretty easy to run apply "safely" and then compare it against the real system, to see how correct apply was, and to find any issues with permissions, files not being restored properly etc, without breaking the main system.

Not to dismiss your concern, but I feel fairly confident in aconfmgr's capability to apply the specified configuration as it is specified. There is a very thorough test suite as well as matrix tests which test every possible combination of configuration/system state.

If this is not supported, I suppose the next best thing would be to restore into a VM, which brings another question: what needs to be in place, at a minimum, in order for aconfmgr to operate? A blockdevice? A filesystem? A full arch linux installation ?

A full Arch Linux installation capable of running pacman and bash. There are some other dependencies, which aconfmgr will install if they're missing as part of its execution.

You may find the integration test suite mode of aconfmgr useful, as it tests aconfmgr against a real Arch Linux installation in a Docker container.

@Dieterbe
Copy link
Author

this is looking promising. I didn't look at the tests yet in depth but I decided to gave a full save-check-apply cycle a run, and nothing seems to have broken :) i compared against and older backup and nothing particular stood out. nice work.

I still think restoring into a separate directory could be useful, e.g. when building a VM or building a new system on a locally mounted hard drive. Note that pacman has a --root flag which allows to install packages in dirs other than / which should make this easy. (assuming package post/pre-install scripts don't have bugs).

Either way it's not a feature I really need, so if no one else asks for it, then let's forget about it and close this.

@CyberShadow
Copy link
Owner

I still think restoring into a separate directory could be useful

I agree. Another use case would be using aconfmgr to scrub and repair another system without booting or chrooting into it (because perhaps e.g. it is completely broken, or is suspected of being compromised).

@CyberShadow CyberShadow changed the title apply into alternative directory or test Virtual Machine? Target a different installation than the one on / Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants