Migrate installation to new hardware

From ArchWiki
Revision as of 20:39, 10 August 2010 by Aneiser (talk | contribs)
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 long as software and configuration is concerned, but also clean config files and other hacks.

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

  1. 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.

  1. Copy /var/cache/pacman/pkg to some backup space.

On the new system

  1. 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.
  2. Copy the pacman cache to var/cache/pacman/pkg
  3. Don't forget to edit /etc/pacman.d/mirrorlist
# 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).