Migrate installation to new hardware
This page summarizes some hints and ideas (especially handy commands) useful when moving an Arch Linux system 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 Arch Linux system on the new hardware, and try to install and configure all packages from the old.
- Top to Bottom: Bitwise copy the old partitions to the new system, trying 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.
- 1 Bottom to Top
- 2 Top to Bottom
Bottom to Top
On the old system
$ 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
- 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
As root, grab a cup of coffee and execute:
# xargs -a Packages pacman -S --noconfirm --needed
Top to Bottom
- See these forum threads:
- Is there a remote possibility to move from i686 to x86_64 without having to reinstall everything from scratch?
Move the system to the new HDDs
- connect origin and destination HDDs to the same pc (either the old or the new one) and copy the filesystem(s)
- copy the filesystem(s) using temporary storage devices (external HDDs, DVDs...)
- transfer over network (using a live system on the new pc?)
- consider that you might need adapters (PATA->SATA, USB-HDD-Cases, etc.) and choose a fast connection (or prepare for long copy times)
- command for making an identical copy of the original filesystem (dd...)
- using /dev paths: this should change depending on how the new drives are connected to the mainboard, on the BIOS and on the new partitions scheme
- using fs labels: should be safe
- using UUIDs
Reconfigure the bootloader
- because of:
- new HDD and partitions configuration
- new BIOS configuration
- GRUB allows to edit entries with 'e'
- use a live system?
- update framebuffer mode (if new gpu)
Regenerate kernel image
- initially the Fallback image could work
- regenerate image
- reinstall kernel26 with pacman
- or use mkinitcpio
Update the graphic drivers
- if changed driver (e.g. from ATI to NVIDIA) can uninstall the old drivers
- alsamixer volume
- save settings
- if need to change hostname:
- other apps using hostname: synergy, nut (network ups tools)
- "# grep -Ri 'hostname' /etc" should give some hints on the files to be updated