Migrate installation to new hardware
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:
- Bottom to Top: Install a fresh ArchLinux on the new, and try to install and configure all packages from the old.
- 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:
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 /var/cache/pacman/pkg to some backup space.
On the new system
- 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 the pacman cache to var/cache/pacman/pkg
- 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).