Archive for January, 2009

Linux hard drive imaging and swapping

Tuesday, January 27th, 2009

So far, I’ve done a couple of hard drive images and swaps on devices that run Linux. The latest one was on my laptop. It’s quite easy once you know the steps, and frankly, I’m writing them down here, so I don’t forget.

  1. Image the whole hard drive using what ever imaging software you desire
  2. Place new drive in system, and boot from linux rescue disk
  3. Mount the new hard drive and chroot it, i.e. chroot, mount /proc, mount /sys, etc.
  4. Edit grub files with new hard drive. These would be device.map and menu.lst
  5. Reinstall grub
  6. Edit fstab to boot new hard drive
  7. Reinstall mkinitrd with the proper device drivers to boot new hard drive

That’s about it. See, I told you it was pretty simple.