|
How to backup a Windows Partition using SystemRescueCD
Revised 11.MAY.09
This is a newbie guide on how to backup a hard drive partition using the
Open Source tool
SystemRescueCD. The software is distributed freely at the
project's website in the form of a 240Mb ISO image file, which can
be easily burnt to a CD using
CDBurnerXP or
InfraRecorder (both freeware). The guide assumes that the
"source" partition (the one to be backed up) is C:
and the "destination" partition (the one in which the backup files
will be saved) is D:. It doesn't really matter whether D:
is in the same hard drive as C: or in a separate one. Also, since
SRCD can detect external drives (plugged before booting), D:
could also be an USB hard drive or thumbdrive. However, If you don't
have an available drive/partition in which to save the backup, you'll
need to create a new partition in your current HD. For that, you can
use a program like
Gparted (already included in SRCD) or PartitionMagic.
I strongly advise everyone to run Scandisk and Defrag
(in this order) before starting the backup operations. After all,
healthy drives with cohesive data tend to "ghost" more reliably.
Moreover, you might have a hardtime to mount partitions if Windows
hasn't shutdown properly, so running Scandisk would help with that too.
SystemRescueCD is a GNU/Linux "LiveCD" packaged with a number of tools
to help you with maintenance and rescue of PCs. This guide will employ
some of those tools to backup a Windows installation. I've tested them
with the 32bit versions of WinXP, Win2000 and Win7 Beta, and the results
have been great.
Start by booting your PC with SystemRescueCD. You'll be shown the
screen below. To see all boot options (useful if the SRCD can't boot
with its default settings) use the [F2]-[F7] keys. My XP machine
has a LaCie USB DVD drive from which SRCD can only boot when I use the
altker32 option. If you don't type in anything within 5sec,
SRCD begins loading with its default settings. The screen that follows
prompts you to choose a keyboard layout. Go ahead and select yours.
Now you must choose a Graphical Environment. You have 2 options:
a) type in startx to use Xorg with its default
settings; or b) type in wizard if you'd rather select a GUI
from a list. Note: due to its simplicity and rate of accuracy, it's
recommended that you use the first option.
Well, If you ended up choosing to launch the Wizard (not recommended)
you'll be shown the options below. One of them is sure to work with your
PC -- both Xorg-Run and Xvesa-Run work on my hardware! Next,
depending on your choice of GUI, you might be prompted to choose the
Resolution and Refresh Rate settings for your monitor. Pick those that
better suit your device.
Once the Graphical Environment loads, you'll see the screen below.
The yellow window belongs to Terminal, an app that resembles
the "Command Prompt" found in Windows. You'll be using Terminal soon,
so don't bother closing it. Now it's time to start GParted.
Gparted is a free partitioning utility similar to the good
ol' PartitionMagic. It can perform all of PM's most useful tasks at
zero cost to you! Yes, it does support creation, deletion, merge and
resizing of NTFS partitions! Give it a try someday.... It has never
failed me. Anyway, Gparted's role in this guide has nothing to
do with disk operations. You're going to use it to find out what
Linux calls your "source" and "destination" partitions. However, if you
do need to re-partition your current hard drive to make room for the
backup files, search the web for guides on how to use Gparted.
After opening Gparted, look around and identify all your hard drives
and partitions. Use the cascade list at the upper right corner of the
program to see all HDs and thumbdrives recognized by SystemRescueCD
during its boot. Next, write down the Linux names of the 2 partitions
(source and destination) with which you will be working. As you
can see in the screenshot below, the Linux names for my C: and
D: drives are sda1 and sda2, respectively.
By the way, "a2" means "hard drive #1, partition #2". Note that
the File System on the "destination" drive (sda2) is NTFS.
Write this down as you'll need this information later.
Out of the box, SystemRescueCD can only read one NTFS partition: the
"boot" one (C:). So, how can someone save the backup files
to another NTFS drive such as D:? The answer is
NTFS-3G,
a driver included in SRCD! Here is what you need to do....
First, refer to the note you made a few minutes ago while checking
out Gparted. According to Gparted, the Linux name for my "destination"
drive is sda2. Armed with that information, I can get back to
Terminal and enter the following command (note: Linux is
case-sensitive, so type it all in lower case):
ntfs-3g /dev/sda2 /mnt/windows
This command tells the NTFS-3G to mount the sda2
"device" (the destination partition) on "read/write" mode. It also
determines that the /mnt/windows directory should be used as
the "mounting point". Note that you do not need to mount the C:
drive (the "source"). Also, you don't need to worry about creating the
windows sub-directory inside mnt because both folders are
already part of the directory structure of SystemRescueCD.
By the way, if you are new to Linux, you'll find very odd that the
first "/" (slash) in /mnt/windows is actually a
folder! In fact, that's the system's root folder! Also, if you'd
like to check out NTFS-3G's help, type ntfs-3g -h or
visit the project's website.
And since i mentioned the web, it's probably a good time to say that
yes, it's possible to surf the web from inside SRCD! You can
do it using the disc's networking capabilities and built-in browser
(Firefox). To obtain Internet access, launch SRCD's network
connection wizard by typing the command below in the Terminal
window and following the prompts.
net-setup eth0
If you want to make sure NTFS-3G has indeed given you "read/write"
access to sda2 (the destination partition), launch
Midnight Commander from the contextual menu and navigate to
/mnt/windows. Once there, try to create a directory.
Remember that the first "/" on any path is Linux's root
directory! I know Midnight Commander looks odd for a file manager,
but rest assured that, despite its unusual appearance, MC can perform
a lot of the tasks commom to Windows Explorer, Konqueror and Nautilus.
Precious little jewel....
Now it's time to launch the program which will image your C:
drive. Right-click the screen and, from the menu, choose
Partimage.
The screenshot below shows how you should set it up in order to "save"
(ie, backup) your "source" partition (sda1) to a sub-directory named
backup in the "destination" partition. Remember that you mounted
D: onto /mnt/windows. So now, in order to write data to
D:, you must refer to its "mounting point".
For this guide, I'm naming my image file(s) partimage.gz, but
feel free to name yours whatever you want. Regarding the backup
directory, you do not need to create it before hand, because Partimage
will do it for you on the fly. But if you ever find yourself in
need to create or delete folders in your "destination" drive, launch
Midnight Commander and get it done.
Before moving on to the next step, make sure you have checked the
option Save partition on the bottom left. In this context, "save"
means "back up". Once you're all set (remember, Linux is case-sensitive!),
press [F5] to continue.
Now it's time to configure the details on how the saving should happen.
The options are quite self-explanatory and I suggest you accept the
defaults. If you enable Enter description (optional), you'll
be prompted to enter a short description about your backup. To continue,
press [F5] once more.
The remaining screens ask for confirmation regarding the settings
you've picked. If you are satisfied with everything that you have
configured to this point, choose [OK], otherwise go back a few
screens and change whatever you need. The screenshot below shows what
the Progress screen looks like.
This ends the guide on backing up a Windows partition. Now, when you
need to "restore" a backup to your C: drive, you'll boot
SystemRescueCD again and setup NTFS-3G and Partimage
in slightly different ways. Here is what you need to know to get
your system's backup restored to C:.
First you need to tell NTFS-3G to mount the partition that
holds the backup files (ie, gz.000, gz.001, gz.002,
etc). For example, lets say you need to restore a backup that was
saved to D:\backup, you'd need to enter the following command
on Terminal (remember, D: is sda2):
ntfs-3g /dev/sda2 /mnt/windows
Once the drive that holds the backup files is mounted to /mnt/windows,
it's time to launch Partimage and start the restoration process
per se. So this is how you'd setup Partimage to bring an old system
image back to life:
1) Partition to restore: sda1 (the C: drive)
2) Image file to use: /mnt/windows/backup/partimage.gz.000
3) Action to be performed: Restore partition
Note that you would only need to invoke the backup's very first file:
partimage.gz.000. Partimage would queue any subsequent files.
|