System Backup/Restore with Linux and Windows

As we all know, Windows backup and restore procedures are very knife and fork. However, as it turns out, to backup and restore a complete disk with both Windows and Linux on dual-boot is actually remarkably easy.
The disk in my laptop conked out yesterday. It worked for a time, but then died after doing about half an hour of work. It would then need a rest of around an hour. Clearly, it's knackered.

Anyway, I put it into a desktop machine, where the increased cooling got me enough time to do a full "dump" of the Linux partition, and a "dd" backup of the Windows partition. I then replaced the disk with the new one, and created my partitions. Since the new disk is bigger, I expanded the Windows partition a bit. I then did a "newfs" on the Linux partition, mounted it and did the "restore" of the previous dump. I then "dd"ed the Windows bit back on.

It just so happened that the new disk had previously had a copy of Redhat on it, so it already had Grub in the MBR. Amazingly, the diskbooted to a grub prompt straight away. However, I used "linux rescue" on the Fedora CD to mount the disk, chroot to it and run "grub-install" to get all that refreshed.

Amazingly, Windows booted more easily than Linux! I couldn't believe it worked - it just booted up, did a "chkdisk" and then told me I had new devices installed and needed to reboot. Amazing! Linux was slightly slower, because the Grub config and fstab files had "LABEL=/" references to the root partition. I switched those to "/dev/hda2" and it's all good.

I'm actually thinking this might be a good way to backup Windows machines (for disk swap or duplication purposes, as opposed to data security backups). Ghost is very good, and has it's place in most computer rooms, but this might be another string to the bow.

Submitted by coofercat on Fri, 2004-10-29 15:52