-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: support the stateroot option also on
switch
# Background <hash> added the `stateroot` option to the `install` subcommand # Issue The `stateroot` option is not available on the `switch` subcommand # Solution Add the `stateroot` option to the `switch` subcommand # Implementation * If the stateroot is different than the current, we should allow using the same image as the currently booted one * Stateroot has to be explicitly created (`init_osname` binding) if it doesn't exist. If it does, we still call `init_osname` and simply ignore the error (TODO: only ignore non-already-exists errors) * Copy `/var` from the old stateroot to the new one. I'm doing `--reflink` but it's still very slow * Must use the old stateroot to find the `merge_deployment` because otherwise we boot without the required kargs (it manifested as a missing `root=UUID=...` which caused the dracut rootfs-generator to silently fail to create `sysroot.mount` and so `ostree-prepare-root` failed due to empty `/sysroot`) Signed-off-by: Omer Tuchfeld <[email protected]>
- Loading branch information
Showing
2 changed files
with
49 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters