Here’s an old but great trick. I had a server that was dying on me, I wanted to clone the computer but didn’t want to have the hassle of taking it apart. By using netcat and the dd command I was able to clone the computer over the network.
First on the destination computer, but up off of Ubuntu 10.04 Desktop liveCD and execute the command:
nc -l 10000 | dd of=/dev/sda
Then on the source
dd if=/dev/sda | nc
Wait for the dd command to finish. Then reboot the new hardware, if you’re lucky it should just boot and you’re done! Yay! If not boot the destination up off of the liveCD once more and mount the drive. Edit any changes in drives (sda/sdb/hda) in /etc/fstab as well as grub. As well as any other changes you have to do, perhaps your modprobe.conf file needs editing. Once done make a new initrd and you’re happy!
/sbin/mkinitrd -v -f /boot/initrd-new.img 2.6.21