MigrationAssistance

Revision 5 as of 2006-11-06 17:12:07

Clear message

Summary

Further the development of migration-assistant to the point that it can be included in Fiesty Fawn. Work prior to Fiesty is covered in the ["/Edgy"] specification.

Rationale

The reality for most potential Ubuntu users is that they've bought their computer with Windows pre-installed or have already installed another Linux distribution. These users have probably already used their existing operating system for a decent period of time and have accumulated documents, email, settings, and other files that can be imported and translated for use in Ubuntu, but the existing Ubuntu graphical installer mercilessly destroys them. If users could install Ubuntu knowing that all of their existing Office documents would be placed in their Documents folder, their email would be imported into Evolution, and their bookmarks imported into Firefox, they would have much more incentive to make the switch, be it from Windows or another Linux distribution.

Use cases

  • Andrew is a long time Gentoo user, tired of having to manually configure his system, and wants a distribution that "just works". He'd like to copy over his home directory to the new system when he installs Ubuntu.
  • Dave is a busy parent who has been using Windows XP for the past year, and he and his children have accumulated a large number of pictures, music, documents, and bookmarks between their four user accounts. He'd like to be able to copy over all of the user accounts while selecting what files to keep and what to throw away when installing Ubuntu.
  • Joe is a CAD engineer who would like to switch his home computer to Ubuntu. While Ubuntu does not have software to read Autodesk files, he would nevertheless like to save his set. He does not have a CD burner and the files are too big for email attachments.

Scope

A package containing all of the importing code and the debian-installer hooks was uploaded as a source package in Universe. The changes to Ubiquity will need to be merged in to the main branch.

Design

+----------------------------------------+
|                                        |
| Select the operating systems that you  |
| would like to import documents and     |
| settings for.  Press next without      |
| selecting anything to skip importing.  |
|                                        |
|  [X] Windows XP (/dev/hda1)            |
|  [X] Linux (/dev/hda5)                 |
|                                        |
|                                        |
|                                        |
|                      [ Back ] [ Next ] |
|                                        |
+----------------------------------------+

If Ubuntu is being installed alongside another operating system, the above dialog is presented to the user, otherwise migration-assistant is skipped.

+----------------------------------------+
|                                        | 
| Select the users that you would like   |
| to import for Windows XP (/dev/hda1).  |
|                                        |
|  [X] Evan                              |
|  [X] Joe User                          |
|                                        |
|                                        |
|                                        | 
|                      [ Back ] [ Next ] |
|                                        |
+----------------------------------------+

The above dialog is presented for each operating system the user chooses to import from.

+----------------------------------------+
|                                        |
|              +---+                     |
|              |   |  Evan               |
|              +---+                     |
|                                        |
| Select the items you would like to     |
| import for this user.                  |
|                                        |
| +------------------------------------+ | 
| |                                 |/\| |
| |   [X] My Documents              |  | |
| |   [X] My Music                  |  | |
| |   [X] My Pictures               |  | |
| |   [X] User Picture              |  | |
| |   [X] AOL Instant Messenger     |  | |
| |   [X] Yahoo Instant Messenger   |  | |
| |   [X] IE Bookmarks              |  | |
| |   [X] Firefox Bookmarks         |  | |
| |   [X] Microsoft Outlook         |  | |
| |                                 |\/| |
| +------------------------------------+ |
|                                        |
| Select an account to import this user  |
| into:                                  |
|         +-------------+--+             |
|         | New Account |\/|             |
|         +-------------+--+             |
|         | New Account    |             |
|         | evan           |             |
|         +----------------+             |
|                                        |
|                      [ Back ] [ Next ] |
|                                        |
+----------------------------------------+

The user is presented with the above page for each user they selected to import. The user picture is used along with the user name to clarify exactly which account the user is dealing with. All items are selected by default and "New Account" is selected by default. If the user does not select any items, then the account will be created, but nothing will be imported into it.

+----------------------------------------+
|                                        |
| Type in the full name, username, and   |
| password for this account below.       |
|                                        |
| Full Name: [ Evan Dandrea            ] |
| User Name: [ evand                   ] |
| Password:  [                         ] |
| Confirm:   [                         ] |
|                                        |
| [ ] Administrator Account              |
|                                        |
|                                        |
|                      [ Back ] [ Next ] |
|                                        |
+----------------------------------------+

If the user selected "New Account" on the previous page, they are presented with the above dialog. The account they create will be visible in the accounts drop-down list after they press next, so if they wanted to, they could import multiple users into a single account. Full Name is already filled in if it can be obtained from the existing operating system. User Name is filled in with an all lowercase, spaces stripped version of the previous username. If the user is importing the account from a Linux operating system, the password and confirm fields are filled in with a set number of asterisks. Administrator Account is not selected by default, but if it is checked the user will be added to sudoers. If the user types in a username that already exists, or Password and Confirm do not match, an error message is presented alongside the offending field.

Implementation

migration-assistant is broken into five programs:

  • ma-ask:BR This is shell code that asks the user all of the questions via debconf that ma-apply needs to import the documents and settings.

  • ma-search-users:BR This finds users suitable for importing from given the operating system and location specified in its arguments.

  • ma-search-items:BR This looks for all available items to import given the operating system and location specified in its arguments.

  • ma-apply:BR This reads all of the debconf questions creates any needed users, and feeds the rest of the data to ma-search-items.

  • ma-import:BR This imports a type of item given arguments of operating system type, location, existing user, location to import to, and user to import into.

ma-ask is called within debian-installer and a modified version of Ubiquity seeds the questions that ma-ask asks.

migration-assistant as a whole searches the hard drive on which it is being installed for user accounts as well as the documents and settings that go along with each account, and presents its findings as options in the installer that the user can select to be imported into their new Ubuntu installation. Configuration data is translated into its appropriate Ubuntu equivelent. AOL Instant Messenger accounts, for example, are translated into XML and added to the .gaim/accounts.xml file in that user's home directory.

migration-assistant will merge data from multiple operating systems, or multiple applications that map to a single application in Ubuntu, into single entities in Ubuntu. For example, if the user has AOL IM, MSN IM, and Yahoo! IM installed, migration-assistant will import all of them into the .gaim/accounts.xml file so they can all be used in Gaim. If the user has both Firefox and Internet Explorer bookmarks then migration-assistant will import both of them into Firefox.

The transferring of data is done by means of running ma-import, which copies the files and settings the user has selected to the new Ubuntu filesystem, after the LiveCD filesystem is copied.

Data:

If Ubuntu is being installed over a Linux system, the import function will select all of the home directories as well as the matching sections of /etc/passwd and /etc/shadow. However, if Ubuntu is being installed over Windows, the import tool will select each user from Documents and Settings, their My Documents folder, and what other files and settings it's preprogrammed to look for. As the development of the import function progresses, this should include:

Files:

  • Documents are imported into the default Ubuntu location (~/Documents).
  • Pictures are imported into the default Ubuntu location (~/Pictures, I think).
  • Music is imported into the default Ubuntu location and the appropriate gconf keys are set so Rhythmbox automatically finds and displays it when first run.
  • Email messages
  • Fonts

Settings:

  • User accounts
  • Email clients (Outlook, Thunderbird, Opera Mail, etc)
  • Instant messaging accounts (AOL, MSN, Yahoo!, ICQ, etc)
  • Bookmarks (Firefox, Opera, Internet Explorer, etc)
  • Desktop background
  • User picture (This will compliment the new face browser)
  • Internet connection settings (proxy, wireless access points, etc)
  • Address book

Outstanding Issues

What is the best way to enable migration-assistant to work when not setting up a dual boot environment?

  • This cannot be done by creating a temporary partition, as that is highly unreliable.
  • MatthewPaulThomas suggested:

    • Future work: From an implementation point of view it's easiest to migrate documents and settings for someone who's dual-booting. But from a user's point of view, this is a lot less useful than migrating documents and settings for someone who won't have their Windows partition to read from. For these people, the installer should offer to copy their files to CDs, DVDs, or an external drive before blanking the Windows partition. -- MatthewPaulThomas

  • Ralf12, simple suggestion:
    • When replacing an operating system, only transfer settings. This can be kept in memory. For safety reasons, it might be wise, to store it (temporarily) on a internet-server. Or, a little bit simpler: email them. Opening the email-attachment (My-Settings.Ubiquity) would launch an, 'would you like to import these settings?' dialog.

  • Ralf12, more complicated suggestion:

    Offer the removal of an other operating systems after installation. Someone can try Ubuntu out for a while, and when they are sure, they can select 'remove this operating system and used freed space for Ubuntu'. This can be part of a graphical grub configuration utility. Where you can select the operating systems offered at boot time and/or remove them. This way the dual-boot setup would be the recommended way of transferring data and settings.

  • Ralf12, a-lot-of-work future suggestion:
    • Create a cross-platform utility that you can install on windows and linux. This program will create a ubuntu-live-dvd with all of your data and current settings. This you can take with you, and you can install it. In other words: unify the creation of a live-cd/dvd with backing up of (selected files) and settings. Off course this only works with relatively moderate amounts of data. It would also be a great personal ubuntu rescue/backup system.

BoF agenda and discussion

Comments

  • Ralf12: Why would a temporary partition be unreliable? When transfering files and settings on a dual-boot, we are doing the very same thing. We're resizing one partition, and creating another one. Why couldn't we after moving the files, remove the windows/linux partition(s) entirely? Resizing an ext3 partition is not more unreliable than resizing an ntfs partition. Yet this is offered by default and used by many. The only problem could be the lack of enough free space. Which is why it is crucial we have some control over the directories and types of files we choose to transfer.

  • Ralf12: I honestly think the settings are way more important than the files: people know how to backup files. They can't import settings easily. Even with the risk of loosing the settings, at least try to import the settings when replacing an operating system, just by storing them in memory. It shouldn't be more than say 1-2 mb maximum, right? Just the account-settings, firefox/ie passwords, homepages and bookmarks.
  • Ralf12: Offer to move files based on file-type as well as directory. It would be best to make a distinction between an image and a photo, movie and a video, as well as, between a song and an album/radio-show based on length/size of the media.
  • Ralf12: Don't forget the shared folder. A lot of multi-user setups keep their music collection there.
  • Ralf12: Perhaps it would be nice to automatically convert the files to 'free formats' when possible. Violating patents to convert a file is protected under law in most, if not all, countries. Since it has to do with interoperability, being compatible with, instead of depending on, someone's patented invention. It would also solve the easy-codec discussion. But even without media conversion, we can at least convert the MS Office documents and such.