Migrate installation to new hardware

From ArchWiki
Revision as of 08:39, 17 August 2010 by Aneiser (talk | contribs) (Some additions in bottom to top)
Jump to: navigation, search

This page summarizes some hints and ideas (especially handy commands) when going from a well configured system with ArchLinux to new hardware. The goal is to achieve the same ArchLinux installation, as far as software and configuration is concerned, but also to clean config files and to update to more recent techniques.

Basically, there are two ways:

  1. Bottom to Top: Install a fresh ArchLinux on the new, and try to install and configure all packages from the old.
  2. Top to Bottom: Bitwise copy the old partitions to the new system, try to get the kernel working without forgetting some tweaks

Which way you choose depends heavily on how the new system differs from your old and how exactly you want to reproduce the system. In any case:

Warning: Please backup all of your data on the old system before continuing! The following commands could be useful or harmful!

Bottom to Top

On the old system

What software?

pacman -Qqe | grep -vx "$(pacman -Qqm)" > Packages
pacman -Qqm > Packages.aur

gives you a nice list of explicitly installed packages. Don't forget the software not installed through pacman.

Copy to some backup space.

  • You can consider backing up /var/cache/pacman/pkg if you don't go from x86 to x86_64
  • /etc should be backuped, in order to peek in if necessary.

On the new system

Wiki articles

  • Read some Wiki articles concerning new hardware, for examples your new SSD.
  • Stick to the well-written installation guidelines here in this wiki. Since you are experienced, the Quick_Arch_Linux_Install could be enough.
  • Try to configure as much as possible sticking to current wiki articles and forum posts.

Copy from backup space

  • Copy the pacman cache to var/cache/pacman/pkg
  • Don't forget to edit /etc/pacman.d/mirrorlist

Install software

As root, grab a cup of coffee and execute:

# xargs -a Packages pacman -S --noconfirm --needed

Top to Bottom

Try to get the old harddrive(s) in your new system. Consider that you might need adapters (PATA->SATA, USB-HDD-Cases, etc.) and choose a fast connection (or prepare for long copy times).