I want to migrate the configuration of an Ubuntu desktop to a new box with different hardware. What is the easiest way to do this? /etc/ contains machine and hardware specific settings so I can't just copy it blindly. A similar problem exists for installed packages.edit: This is a move from x86 to x86-64.
How do I migrate configuration between computers with different hardware?
linux;ubuntu;migration
First, if you're going to keep running 32-bit binaries, you're not actually changing the processor architecture: you'll still be running an x86 processor, even if it's also capable of doing other things. In that case, I recommend cloning your installation or simply moving the hard disk, as described in Moving linux install to a new computer.On the other hand, if you want to have a 64-bit system (in Ubuntu terms: an amd64 architecture), you need to reinstall, because you can't install amd64 packages on an i386 system or vice versa. (This will change when Multiarch comes along).Many customizations live in your home directory, and you can copy that to the new machine. The system settings can't be copied so easily because of the change in processor architecture.On Ubuntu 10.10 and up, try OneConf.OneConf is a mechanism for recording software information in Ubuntu One, and synchronizing with other computers as needed. In Maverick, the list of installed software is stored. This may eventually expand to include some application settings and application state. Other tools like Stipple can provide more advanced settings/control. One of the main things you'll want to reproduce on the new installation is the set of installed packages. On APT-based distributions, you can use the aptitude-create-state-bundle command (part of the aptitude package) to create an archive containing the list of installed packages and their debconf configuration, and aptitude-run-state-bundle on the new machine. (Thanks to intuited for telling me about aptitude-create-state-bundle.) See also Ubuntu list explicitly installed packages and the Super User and Ask Ubuntu questions cited there, especially Telemachus's answer, on how to do this part manually.For things you've changed in /etc, you'll need to review them. Many have to do with the specific hardware or network settings and should not be copied. Others have to do with personal preferences  but you should set personal preferences on a per-user basis whenever possible, so that the settings are saved in your home directory.If you plan in advance, you can use etckeeper  to put /etc under version control (etckeeper quickstart). You don't need to know anything about version control to use etckeeper, you only need to start learning if you want to take advantage of it to do fancy things. 