LucidLpiaMigrationHowTo

(Lucid LPIA Migration HOWTO)

In November 2009, Steve Kowalik announced that the Ubuntu Mobile Team will drop support of the LPIA architecture in Lucid Lynx. The Lucid Lynx Release Notes state that "systems that were installed as lpia will need to be backed up and reinstalled from scratch using either the i386 or amd64 architectures." However, an alternative, unsupported approach is outlined below.

Warning

While the steps outlined below are straightforward, they use a terminal and they modify essential parts of a stable Ubuntu system. A full backup before proceeding is the best way to ensure that, in case of difficulty, the original system can be restored, or the i386 version of Lucid can be installed and the backup files copied. Additionally, there is no guarantee that these steps are sufficient for all systems with various configurations. However, these steps are reversible for most configurations.

Addition Of i386 Repositories

Since lpia repositories are distinct from the main repositories, the migration to i386 repositories involves a switch. Add the i386 Lucid Lynx repositories by running the one-line command echo "deb http://archive.ubuntu.com/ubuntu/ lucid main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list in a terminal. This command adds the line deb http://archive.ubuntu.com/ubuntu/ lucid main universe multiverse restricted to the /etc/apt/sources.list file, so to check that the line has been added, simply edit the file with an editor started with a command such as sudo gedit /etc/apt/sources.list or kdesu kwrite /etc/apt/sources.list in a terminal. To ensure that the new repositories are used, run the one-line command echo 'APT::Architecture "i386";' | sudo tee -a /etc/apt/apt.conf.d/01architecture in a terminal. This command adds the line APT::Architecture "i386"; to an arbitrarily named /etc/apt/apt.conf.d/01architecture file, so to check that the line has been added, simply edit the file with an editor started with a command such as sudo gedit /etc/apt/apt.conf.d/01architecture in a terminal. To ensure that application managers recognize these two changes, for now, close any open package managers, such as Synaptic or Adept. To revert these two changes, simply remove the line from the /etc/apt/sources.list file, and remove the line from the /etc/apt/apt.conf.d/01architecture file.

Installation Of i386 Dpkg

The first step is to install the i386 version of dpkg closest to the lpia version currently on the system. For example, if the current lpia dpkg package is from the Karmic Koala release, then download and install the i386 dpkg package from Karmic Koala by running the one-line command wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.15.4ubuntu2.1_i386.deb && sudo dpkg --force-architecture -i dpkg_1.15.4ubuntu2.1_i386.deb && echo && echo "i386 dpkg is installed" in a terminal. This command downloads the dpkg_1.15.4ubuntu2.1_i386.deb file from http://packages.ubuntu.com/karmic/i386/dpkg/download installs it using the dpkg package manager, though certain versions of the Gdebi package installer may also be able to install this i386 package. If the output of this one-line command does not say that the i386 dpkg is installed, then the installation might not have succeeded, so check that the current dpkg architecture is i386 by running the command dpkg --print-architecture in a terminal. To revert the change in the dpkg architecture, download and install one of the lpia versions of dpkg from http://ports.ubuntu.com/pool/main/d/dpkg/ by running the one-line command wget http://ports.ubuntu.com/pool/main/d/dpkg/dpkg_1.15.4ubuntu2.1_lpia.deb && sudo dpkg --force-architecture -i dpkg_1.15.4ubuntu2.1_lpia.deb && echo && echo "lpia dpkg is installed" in a terminal, and also revert any changes from the earlier steps.

Modify Dpkg Database

Even assuming a full backup of the system exists, prepare for this step by making a copy of the /var/lib/dpkg/status database file by running a command such as sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.lpia in a terminal. Then, remove the architecture designation from all binary packages by running the one-line command sudo sed -i -e "s/^Architecture: lpia/Package-Architecture: lpia/" -e "s/^Architecture: i386/Package-Architecture: i386/" /var/lib/dpkg/status && echo "architecture modification successful" in a terminal. Alternatively, open the database file with your favorite editor with a command such as sudo gedit /var/lib/dpkg/status or kdesu kwrite /var/lib/dpkg/status and replace all instances of the phrase Architecture: lpia with a phrase such as Package-Architecture: lpia and all instances of the phrase Architecture: i386 with a phrase such as Package-Architecture: i386, and save the file. After modifying the database file, if the output of running the one-line command sudo apt-get -qq check || ! echo "status check failed" && sudo apt-get -qq update in a terminal says that the status check failed, then the removal of the architecture designations from /var/lib/dpkg/status was incorrect or incomplete. To revert the changes, restore the copy of the /var/lib/dpkg/status database file by running the one-line command sudo mv /var/lib/dpkg/status /var/lib/dpkg/status.i386 && sudo cp /var/lib/dpkg/status.lpia /var/lib/dpkg/status in a terminal, and also revert any changes from the earlier steps.

Migration

The steps on this page detail how to change the system architecture in the package manager from two largely equivalent system architectures, such as i386 and lpia. These steps do not apply directly to migrations from system architectures that are compatible but not equivalent, such as migrations between i386 and amd64. Furthermore, these steps do not transition the system from lpia to i386 by themselves. Rather, packages can be upgraded and distributions can be upgraded in the normal fashion after completion of these steps. Please add any appropriate changes to this wiki page promply to assist others with the transition.


CategoryDocumentation

LucidLpiaMigrationHowTo (last edited 2010-04-30 10:48:16 by 71-210-207-88)