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
Reinstall While Retaining Home #95
Conversation
067ef05
to
02a1e6a
Compare
I have just succeeded in doing a reinstall which retained user accounts (passwords & data).
|
I believe this is ready for review now. |
- Generates a simple u64 hash based on the contents of /dev/ - Useful for knowing when device layout has been changed
ffi/src/installer.rs
Outdated
@@ -141,6 +141,42 @@ pub unsafe extern "C" fn distinst_installer_on_status( | |||
|
|||
/// Install using this installer | |||
#[no_mangle] | |||
pub unsafe extern "C" fn distinst_installer_install_and_retain_home( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps retain_home should be added to the config? Maybe as a flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I like this better with the config option
- If config.old_root is set, then an install will be performed which retains home
Checks if the given name already exists as a device in the device map
Is this ready to merge @mmstick ? |
@jackpot51 Yes, it is ready. I'll be adding more PRs in the future to improve it further. |
Great! |
What has changed
distinst_install_options_new()
method is exposed in the C API.Disks
, it will create multiple lists of install options.InstallOption
to apply the option to aDisks
.RecoveryOption
can be used to perform a recovery installRefreshOption
can install onto and reuse partitions from an existing install, and thereby be used to perform a factory reset, refresh retaining user accounts, or upgradesEraseOption
will erase an entire disk and install with a default configuration, either encrypted or unencryptedconfig.old_root
is set, an install will retain home./home
exists inDisks
is not set to be formatted./
partition was specified inConfig
./
partition with a different filesystem may be specified, but only if/home
is on a separate partition and is not set to be formatted./home
, from/etc/passwd
,/etc/group
,etc/shadow
, andetc/gshadow
./etc/passwd
./etc/passwd
./etc/timezone
&/etc/localtime
settings will also be restored.DiskOps
so that physical devices withinDisks
will not go through the process of executing disk operations.unowned uint8[]
in the C/Vala API instead ofstring
where possible.device_map_exists()
function for the C/Vala API, to be used in the decrypt menudevice_layout_hash()
function can be used to know when to reload devices & optionsWhat the frontend will need to do
Install options to support?