Changes based on suggestions by cjwatson.
|Deletions are marked like this.||Additions are marked like this.|
|Line 37:||Line 37:|
|Provided that the filesystem meets the requirements (ext3, not empty, has /home) and the user selects the preserve option, the following directories will be preserved:
Everything else will be deleted. This includes:
|Provided that the filesystem meets the requirements (ext3, not empty, has /home) and the user selects the preserve option, the following directories will be removed before the file copy process starts:|
|Line 60:||Line 54:|
''ColinWatson: I thought we had agreed a specific blacklist of directories to remove (i.e. approximately the list above) rather than a specific whitelist of directories to keep? If the user has a directory called /shared, for instance, keeping that will not harm the installed system, while removing it may well be undesirable. I recommend reversing the logic here to be based on a blacklist rather than a whitelist.''
|Everything else will be preserved. This includes, at a minimum:
|Line 64:||Line 62:|
| * If /home is a regular file, such as the case where /home is just a symlink, remove it.
''ColinWatson: I understand what you mean here, but a nitpick: "regular file" is a precise technical term that does not include symlinks. Perhaps "If /home is something other than a directory, ..."?''
|* If /home is not a directory, such as the case where /home is just a symlink, remove it.|
|Line 74:||Line 71:|
|/etc/skel will not be imported.|| * /etc/skel will not be imported.
* For the initial implementation, the installer will not attempt to recreate entries in /etc/fstab for any users it finds in /home.
|Line 80:||Line 78:|
|== Outstanding Issues ==
Wouldn't it be wiser to not ignore errors and handle them properly? For instance, if a directory is indeed a mountpoint, we could use the existing logic to attempt to umount it first, then ask the user to if we are unable.
Are we leaving it up to the user to recreate entries in /etc/fstab for any users in /home?
''ColinWatson: Please decide on these and factor them into the spec proper before approval. I think errors due to mountpoints can safely be ignored (without trying to unmount them); the mere presence of an empty directory is unlikely to cause problems. I would be inclined not to worry too much about /etc/fstab at least in the first pass.''
|Line 89:||Line 79:|
Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.
Launchpad Entry: ubiquity-preserve-home
Packages affected: ubiquity, partman-auto
Extend the installer to allow the user to install Ubuntu while preserving the /home directory.
Ubuntu now supports installations that preserve the /home directory when it already exists.
Along with being an often requested feature, this would allow users to perform what amounts to a repair install by installing Ubuntu over top of itself while preserving the /home directory.
- Joe installed Ubuntu and corrupted the system settings and files to the point where he wants to install Ubuntu again. He does not want to lose his documents and account settings.
- Bob has Ubuntu 6.06 installed, but wants to try Ubuntu 8.04. He does not want to have to upgrade multiple times or risk upgrading straight to 8.04.
We will add functionality to partman and ubiquity that checks to see if the requested root partition is not empty and contains a /home directory. If this is the case, debconf will present the user with a question similiar to the following:
This filesystem already seems to have some content on it. Do you want to preserve this data and remove the following: ...list of directories and top-level files to be removed...
This question will be preseedable, so that OEMs can blindly say yes to it.
Provided that the filesystem meets the requirements (ext3, not empty, has /home) and the user selects the preserve option, the following directories will be removed before the file copy process starts:
/bin /boot /dev /etc /lib /lib32 /lib64 /proc /sbin /usr /var /sys /initrd* /vmlinuz*
Everything else will be preserved. This includes, at a minimum:
/home /srv /root
- The installer will ignore failures to remove any of these items. If a directory is serving as a mountpoint it will produce EBUSY on rm, for example.
- If /home is not a directory, such as the case where /home is just a symlink, remove it.
- If the user created during the install already exists in /home, reuse the UID and GID from /home for that user by preseeding them.
There will be no changes to the user interface aside from the question dialog. This feature should be mostly transparent to the user.
- /etc/skel will not be imported.
- For the initial implementation, the installer will not attempt to recreate entries in /etc/fstab for any users it finds in /home.
Installs of Ubuntu over-top of itself will be used to test this feature.
BoF agenda and discussion
remove: /bin /boot /dev /etc /lib /lib32 /lib64 /proc /sbin /usr /var /sys /initrd* /vmlinuz*
preserve: /home /srv /root
warning saying, "this filesystem already seems to have some contents on it. If you want to go ahead I'll remove everything execept user data, but I'll remove the following:" "There is no guarentee, and you should back up your data." Needs to be a debconf question so OEMs can preseed it.
If the username already exists in /home, check the ID of that directory and use the same id. oem-config does the same thing. We just need to preseed the uid. Check gid as well.
don't worry about /etc/skel, but check user-setup to make sure it doesn't break things in this regard.
make sure /home is not a regular file. Remove it if it exists. It could be a symlink, in which case remove it.
Ignore failures to remove a directory. EBUSY will be triggered if it's a mount point.
Adding an option to the autopartitioner to enable all this functionality. Needs to meet the requirements: swap, ext3.
Logic to remove directories would need to be duplicated into a check for disk space available. Documentation: what we're removing we're not touching /etc/skel