Sunday, January 24, 2010

Replicating Arch Linux

I had frequently taken a backup of the root partition, restored it on another system and it would work, with some minor changes to the fstab file. I decided to replicate Arch Linux the same way.

I took a backup of the functioning system in Chandigarh and brought it to Goa. Restored it, made the minimal changes in grub.conf and fstab - and Surprise. The kernel crashed. The problem seemed simple enough.

Chroot to the Arch Linux partition. Reinstall the kernel. Reboot and getting ready to relax with a cup of tea. No luck. Kernel crashed again and again.

Installed the core Arch Linux from a usb image. This time the system worked!

Next step - saved the kernel and the image. Restored the tar backup. Copied the installed kernel and the image. The system worked! Reinstalled the updated kernel (2.6.32) and the system still worked.

I used the EEPC701 as the gateway to connect to the Internet and started to add some packages, e.g. NetworkManager to use the Reliance Netconnect USB modem. Pacman complained. I chose to ignore the warnings and forced the additional packages. And the system stopped working. I was back to kernel crashes.

I had to look at how the packages were stored and realised the issue. Arch Linux keeps installed and available packages as directories and files. Restoring the tar backup resulted in updated and original packages both being listed. It resulted in a very confused package manager.

So, back to installing from the USB drive. This time I removed the package manager 'database', that is the directories in /var/lib/pacman. Now the restored package database was consistent. The system has been working fine.

I have to re-examine the tar backup. I must have missed something.

No comments:

Post a Comment