UbiquityPreserveHome

Differences between revisions 1 and 9 (spanning 8 versions)
Revision 1 as of 2007-11-07 19:14:47
Size: 3620
Editor: 75-144-175-202-NewEngland
Comment: session dump
Revision 9 as of 2007-11-23 16:32:00
Size: 4205
Editor: ool-44c0d208
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
 * '''Launchpad Entry''': UbuntuSpec:foo
 * '''Packages affected''':
 * '''Launchpad Entry''': UbuntuSpec:ubiquity-preserve-home
 * '''Packages affected''': ubiquity, partman-auto
Line 10: Line 10:
This should provide an overview of the issue/functionality/change proposed here. Focus here on what will actually be DONE, summarising that so that other people don't have to read the whole spec. Extend the installer to allow the user to install Ubuntu while preserving the /home directory.
Line 14: Line 14:
This section should include a paragraph describing the end-user impact of this change. It is meant to be included in the release notes of the first release in which it is implemented. (Not all of these will actually be included in the release notes, at the release manager's discretion; but writing them is a useful exercise.)

It is mandatory.
Ubuntu now supports installations that preserve the /home directory when it already exists.
Line 20: Line 18:
This should cover the _why_: why is this change being proposed, what justifies it, where we see this justified. 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.
Line 24: Line 22:
== Assumptions ==  * 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.
Line 28: Line 27:
You can have subsections that better describe specific parts of the issue. 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.
Line 32: Line 37:
This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like: Provided that the filesystem meets the requirements (ext3, not empty, has /home) and the user selects the preserve option, the following 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.
Line 36: Line 67:
Should cover changes required to the UI, or specific UI that is required to implement this

=== Code Changes ===

Code changes should include an overview of what needs to change, and in some cases even the specific details.
There will be no changes to the user interface aside from the question dialog. This feature should be mostly transparent to the user.
Line 44: Line 71:
Include:
 * data migration, if any
 * redirects from old URLs to new ones, if any
 * how users will be pointed to the new way of doing things, if necessary.
 * /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 51: Line 76:
It's important that we are able to test new features, and demonstrate them to users. Use this section to describe a short plan that anybody can follow that demonstrates the feature is working. This can then be used during CD testing, and to show off after release.

This need not be added or completed until the specification is nearing beta.

== Outstanding Issues ==

This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.
Installs of Ubuntu over-top of itself will be used to test this feature.
Line 60: 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.

Summary

Extend the installer to allow the user to install Ubuntu while preserving the /home directory.

Release Note

Ubuntu now supports installations that preserve the /home directory when it already exists.

Rationale

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.

Use Cases

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

Design

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.

Implementation

Provided that the filesystem meets the requirements (ext3, not empty, has /home) and the user selects the preserve option, the following 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.

UI Changes

There will be no changes to the user interface aside from the question dialog. This feature should be mostly transparent to the user.

Migration

  • /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.

Test/Demo Plan

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


CategorySpec

UbiquityPreserveHome (last edited 2009-09-24 05:19:16 by ua-178)