MigrationAssistance

Revision 12 as of 2006-11-07 21:01:09

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.
  • Colin's grandparents were using Windows with multiple accounts and found that to be too much, and would much rather use one account between the two of them.

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 and migration-assistant will need to be placed in main.

Design

Ubiquity flow:

Language
Location
Keyboard
Migration-Assistant defaults seeding
User, Password, Hostname
Partitioning
Migration-Assistant
Summary
Install process (ma-apply is run)

* If the user chooses to set up a dual boot, migration-assistant is run, otherwise it is skipped, though the defaults seeding is always run.

+--------------------------------------+
| What accounts do you want to import? |
| +-------------------------------+--+ |
| |                               |/\| |
| | \/ [X] Evan (Gentoo)          |  | |
| |       [X] AIM Settings        |  | |
| |       [ ] Bookmarks           |  | |
| |       [ ] Address Book        |  | |
| |-------------------------------|  | |
| |  > [X] Colin (Windows)        |  | |
| |-------------------------------|  | |
| |  > [ ] Lucy (Windows)         |  | |
| |  > [ ] Evan (Windows)         |  | |
| |                               |\/| |
| +-------------------------------+--+ |
| [Select All] [Select None]           |
|                                      |
|--------------------------------------|
|                                      |
| Full Name:  [ Colin Watson ]         |
| Login Name: [ Colin     |\/]         |
| Passphrase: [              ]         |
| Confirm:    [              ]         |
|                                      |
|              [Cancel] [Back] [Next]  |
+--------------------------------------+
  • Marking the checkbox next to a user causes all of its child items to be selected. Unmarking the checkbox next to a user causes all of its items to be unselected.
  • Selecting a user (as Colin is in the mockup) or item below one causes the login information, the lower portion of the dialog, to change to input that user. The full name field is populated from the information we obtain from the previous operating system. The login name is populated by taking the previous operating system login name, lowercasing it and replacing spaces with dashes. In the case of Linux, the passphrase is populated with a set number of asterisks, representing the hashed password we've obtained from /etc/shadow.
  • If the user types in a login name that already exists in the combo input box, the passphrase and full name fields change to the existing values for that user. If the user changes that information, it is changed for that user.
  • The drop down list for login name is populated with all of the already created users, including the default user created in UserSetup.

  • Incorrectly typing the password a second time, failing to type the full name, or failing to type the login name will result in an error that will appear 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

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, domain, 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

  • Use case: "Colin's grandparents were using Windows with multiple accounts and found that to be too much, and would much rather use one account between the two of them."
  • Importing to removable media (usb key, CD-R, etc) will be saved for Fiesty+1.
  • m-a defaults preseeding: a portion of migration-assistant that runs before the user dialog and seeds information such as the username and full name in the dialog.
  • Move m-a to after partitioning, before summary.
    • Provide summary information for the summary page.
    • We need to determine what the partitioning situation is going to be. The Summary component is directly fed this from the Partman component.
  • New dialog:

+-------------------------------+
| What accounts do you...       |
| +------------------------+--+ |
| |                        |  | |
| | \/ [X] Evan (Gentoo)   |  | |
| |       [X] AIM Settings |  | |
| |       [ ] Bookmarks    |  | |
| |       [ ] Address Book |  | |
| |------------------------|  | |
| |  > [X] Colin (Windows) |  | |
| |------------------------|  | |
| |  > [ ] Lucy (Windows)  |  | |
| |  > [ ] Evan (Windows)  |  | |
| |                        |\/| |
| +------------------------+--+ |
| [Select All] [Select None]    |
|                               |
|-------------------------------|
|                               |
| Full Name:  [ Colin Watson ]  |
| Login Name: [ Colin     |\/]  |
| Passphrase: [              ]  |
| Confirm:    [              ]  |
|                               |
|                [Back] [Next]  |
+-------------------------------+

Selecting a user (as Colin is in the mockup) or item below one causes the login information, the lower portion of the dialog, to change to input that user. If the user types in a username that already exists in the combo input box, the passphrase and full name fields change to the existing values for that user. If the user changes that information, it is changed for that user.

  • What was our resolution on the UserSetup dialog? Does it stay and become an user in the login name drop down list?

    • Yes, the UserSetup dialog stays and seeds the login name drop down list.

  • What was the resolution on making a single default user? Do we just leave that to UserSetup and remove the checkbox in migration-assistant entirely?

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.

    • It is my understanding that growing and resizing partitions is often not safe and it would not be reasonable to depend on that at the current time.
  • 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.
    • I disagree. People care a lot about their documents, often more than their settings. Backing up files is often not easy.
    • I agree w/ Raf12, in fact I do consulting work for Altiris and one of the products they sell captures all of the settings, such as bookmarks, personal dictionary, background, icons on the desktop (shortcuts) and other things. It is a great selling point.
      • I'm not saying these things are unimportant, I am simply suggesting that if a user has to choose between their term paper and their AIM settings, they will go with the former. -- EvanDandrea

      • It is also important, as was said in the BoF, that we "smooth the migration path." We should therefor not worry so much about it only running on a dual boot setup as a completely new user will likely want to dual boot in case things go terribly wrong for them. -- EvanDandrea

    • Remember some users think an application is installed because there is a shortcut on their desktop, not because they reach it through a "Start" menu. These types of users will be coming to Linux and hopefully Ubuntu.
      • Can you clarify what you're responding to and/or talking about? Ubuntu does not install program icons to the desktop. -- EvanDandrea

  • 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.
    • There is no reasonable way to differentiate between such things without an enormous amount of incorrect assumptions.
  • 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.

    • migration-assistant does not convert files, only settings. It defers the converting of files to the program that reads the format (e.g. OpenOffice.org)