You go to boot your computer and you get an error. Asking around online you find out that the only thing left to do is to reformat and reinstall the operating system, causing all your data to be lost. Is there nothing you can do? Actually, yes there is. I will explain how to use the System Rescue CD to save your data, then restore it on the new installation! This can be done with any linux live CD, but the system rescue CD is a little easier, so that's what I'll use to explain it.
What You'll Need:
- System Rescue CD
- External USB drive LARGER THAN your internal drive (or at least equal to)
- Some time and patience :)
- Download the .iso file from the website linked above, then burn it to a disk. This will give you a working copy of the System Rescue CD. You'll want to download the latest working copy, listed as the "Final Stable Version". It will always be on top (at the time of writing it's 2.3.0).
- Insert the disk into the non-working computer. You might have to turn it on and quickly open the CD drive to put it in. Then restart. Depending on your system, it might boot to the CD automatically. If not, look around when you first boot for "Boot Menu" usually on the bottom of the screen, it will tell you which function button to hit. F7, F9, F10, F11, Esc, and Del are popular ones. Try different buttons, you can't hurt anything, and if it doesn't work just hit Ctrl+Alt+Del to restart and try again.
- When it finally boots to the CD, keep pressing enter until you get a prompt that reads "root@sysresccd / %" that means you're at the command line. Now there are two ways to go, using the command line and using the GUI. I'll explain the command line first, then the gui.
- (NOTE: All commands will be surrounded by "double quotes". Do not type the quotes.) Type "fdisk -l /dev/sda" and take a look at the partitioning scheme. There should be at least one partition, formatted NTFS. Most of the time it's sda1, but it could be that you have one small partition and one large one. You need to figure out where your windows partition is, so you can back the data up. Pick which one you think it is (I'm going to assume sda1) and type "ntfs-3g /dev/sda1 /mnt/windows", then type "cd /mnt/windows" then "ls" (NOTE: that's an "ell", not an "eye"). If you see some windows directories (like Program Files), you've got the right partition. If not, type "cd /mnt; umount /mnt/windows" and retry.
- When you have your windows partition mounted, plug in your external harddrive and wait a minute or two to be sure that it's recognized.
- Type "dmesg". A lot of text should scroll, then it should put you back at your command prompt. In the last few lines you should see something like "USB Mass Storage Drive entered: sdb" or something similar. The important part is the sdb. Type "fdisk -l /dev/sdb" again to look at the partitions (there should only be one), then type "ntfs-3g /dev/sdb1 /mnt/backup" to mount it as the backup disk.
- Type "mkdir DataBackup" to create the folder to store the backup in, then type "cd DataBackup" to change to that directory.
- Now type "rsync -av --progress /mnt/windows ./" to copy everything from the windows directory to the DataBackup directory. Wait until it's done, then reboot.
- Type "wizard" at the command prompt, then keep hitting enter until you get a gui. Go through the "start menu" until you find something called gparted. Open that and take a look at everything you've got.
- On the top right you'll see the drive you're currently perusing. sda is your internal drive, sdb is your USB. Right click on the largest box under sda and click "Mount". It should give you a dialog box, choose the directory /mnt/windows. Do the same for sdb, mounting it at /mnt/backup.
- Open the file manager (it should look like a folder on the taskbar). In the left pane, navigate to /mnt/windows, in the right, navigate to /mtn/backup.
- Create a directory in the right pane named DataBackup (should be able to right-click>New Folder), then open that folder.
- Select everything in the left pane and copy it to the right using the button in between the panes. You can hover with the mouse over the buttons to see what they do.***
- Wait until the transfer is complete, then you've got your backup!
*** If there is an error that sdb is not writeable, open the command prompt (should have opened when you started the gui) and type "umount /dev/sdb", then type "ntfs-3g /dev/sdb1 /mnt/backup". That will make it writeable.
You can use these folders to copy your data back off once your installation has been fixed. Note that you cannot copy over programs, only data such as saved files, pictures, movies, etc. The programs will have to be reinstalled. Best of luck, and I hope this helps someone!