May 28

Backing up a Windows PC to Linux

Category: Linux,Windows   — Published by tengo on May 28, 2010 at 8:36 am

One of the first things you might do, probably after your PC broke down or the OS got unbootable, is to do a copy/ snapshot of the system hdd drive before you do a clean install of Windows XP, try to repeair the existing one or do something else. In my case the machine in question was badly infected by some worm and after unsuccesful attemps to repair the damage, I decided to write a fresh XP over the existing one.

A simple approach to do a backup of a hdd is to copy the entire disk into a safe location - in my case a solid Linux system.

So I took an ISO copy of the excellent SystemRescueCD and booted the broken laptop into the live-cd's Gentoo Linux.

Then I loosely followed the instructions on this page (Backup data from an unbootable Windows computer backup your data if your windows is broken ) to make the laptop the slave machine for a copy.

  • I enabled networking by doing net-setup eth0. Some more information on how to do this can be found here
  • Execute passwd and type in a temporary password twice
  • Mount the NTFS partition with ntfs-3g /dev/<drive name, probably "sda1"> /mnt/windows
  • Use the Linux machine and Filezilla or gFTP to SFTP into the slave machine
  • Copy stuff over

My laptop broke down once during the backup and I got the error "Host key verification failed." after I got it up again into SystemRescueCD's Gentoo. Of course, the host key had changed... Solution is to sudo nano /home/<your username>/.ssh/known_hosts on the Linux machine and remove the last line (which is what gFTP/Filezilla just added).