You’ve just reinstalled Windows from scratch—again—but this time you want to preserve your sparkling clean setup for instant restoration down the road. Instead of dropping cash on Norton Ghost or Acronis True Image, burn yourself a free, bootable Linux-based System Rescue CD. The System Rescue CD includes open source tools GParted and Partimage, which can create a new partition and save your fresh Windows installation as a restorable image for the price of zero dollars. Never stare at those creeping Windows installation progress bars again: With the System Rescue CD, you can have that fresh new Windows feeling any time you need it. Here’s how.
What’s a partition?
A partition separates a section of a physical disk into another virtual drive. When you split a hard drive into two partitions, you’re creating a separate disk that your operating system (like Windows), treats as a different drive letter—even though it’s the same physical disk. There are several handy uses for creating a separate partition on your computer:
- Run multiple operating systems. Want your XP and Vista too? How about diving into Linux? With separate drive partitions, you can install several operating systems and make your choice of what to work in on startup.
- Separate data and applications. Keep all your documents, music library, photos and videos on one partition and your operating system and programs on another. The separation makes data backup as well as a fresh operating system reinstall much easier.
- Speed up your computer. Most new computers these days come with monstrous-sized hard drives. Separating it into partitions will reduce drive fragmentation and speed up disk reads as you work.
- Back up the state of your operating system for easy restoration. Create a mirror image of your operating system and save it on a separate partition so you can restore your computer back to a past state any time in the future.
The last use is what we’re setting up today.
What’s a disk image?
A disk image is a giant file that saves the state of an entire disk. Disk images can re-create an entire disk drive—like the C: drive where you’ve got Windows installed.
At the end of this tutorial, you’ll split your C: drive into 2 partitions, and the second one will contain a disk image of the first. This way, next time you want to wipe your hard drive clean and start fresh with Windows, you can restore your backup image instead of suffering through Windows’ tedious installation again.
What you’ll need
- A DVD or CD burner.
- The System Rescue CD ISO file. Download it here.
- A PC with a good amount of free hard drive space.
- A sense of adventure.
Note: Before we begin, know that 1.) there is command line work ahead, and 2.) partitioning an existing hard drive is a risky undertaking that could go all kinds of wrong. Make sure your hard drive is well backed up before you begin.
Let’s get started.
1. Burn the System Restore CD. If your CD burner didn’t come with Nero or another disk burning utility, grab ISO Recorder to burn your boot CD.
2. Boot from the System Rescue CD. Put the CD in your drive and try booting up your PC. It may automatically start from the CD, but if not, restart again and watch for a message like “Press F2 to enter Setup”—and do so. Once you’re in setup mode (your BIOS) you can set the CD as the first drive in the boot sequence. If you haven’t done this before, see step 2 here for more info.
3. Start up the System Rescue CD. Once you’ve booted onto the CD, type the following command to start the graphical user interface:
rescuecd doxdetect dostartx
That command tells the CD to detect your video adapter type and start the X window system. Note: The System Rescue CD supposedly auto-detects your video setup, but when I ran the boot command without
doxdetect, my screen was all flickery and didn’t render windows correctly. Your mileage may vary.
The CD will load your computer’s hardware information. When it prompts you to “Load keymap” press Enter for the default. Once X is loaded, your X window desktop will look like this (apologies for the crappy screenshot):
4. Create a new partition with GParted. The Gnome Partition Editor (GParted) application is the third button down on the right-hand-side menu just above the Terminal. Double-click to launch it. GParted is a powerful partition editor that lets you shrink, expand, split, create and format partitions without disturbing the operating system already installed on a disk.
At first you’ll see a single partition within GParted—this is Windows’ C: Drive. Right-click on it and choose “Move/Resize.” From there, use the slider to shrink the main partition, making room for your new, secondary partition.
Words of warning: When I entered the exact number of MB for a 10GB partition, GParted moved the current partition to the right a bit on the drive. You can drag and drop it back to start at the beginning of the physical drive so you wind up with only 2 partitions, not 3.
In the end I freed up about 12GB of space for my secondary partition (12.07 to be exact), but you can make yours any size that works. You want to have enough space for your Windows drive images, and Windows took up about 12GB for me. (Your disk images will be compressed, but better safe than sorry.) Hit the Apply button to start the partition-resizing. Depending on how large your drive is, this can take awhile—and by awhile, I mean possibly all night and/or day.
When you’re done, you’ll see an area denoting “unallocated space” on the disk. Click on that and from the Partition menu choose “New.” Set the new partition file system to NTFS. Then, right-click on the new partition, and choose Format To>ntfs in order to make the secondary partition usable. Hit Apply to execute the action. Finally, you’ll have 2 partitions displayed on your disk map in GParted.
5. Mount the secondary partition. Now it’s time to put your new partition to work. Switch to the Terminal and type the following to make the secondary partition available:
ntfs-3g /dev/hda2 /mnt/windows
Now you can read and write to the disk. Let’s make a folder to save our disk images, with:
That will create a folder on your second partition called “winrestore.” We’ll use that space in the next step.
6. Image your Windows drive to the new partition. Now we can move into the second tool in this process, Partimage. Start it by simply typing
partimage in the Terminal. Partimage’s interface is old-school blue background with white text but it works the way you’d expect. First you’ll see your two partitions listed. Select /dev/hda1 (your C: drive) to image, and enter a name for the image files, like
windowsxp-clean.partimg. Make sure the option for “Save partition into a new image file” is selected (it is by default).
Hit the F5 key to continue to the next screen. Here you can select all the defaults (Gzip image files, enter descriptions, split files into 2GB’s each, etc.)
Hit F5 to continue. Partimage will ask you to enter an image description (like “Windows XP Clean Installation” and then it will warn you that its NTFS support is experimental. We’re adventurers, so we’re OK with that. Hit the OK button to start the imaging process, which can take a good amount of time, depending on how big your C: partition is.
After a bit of work, Partimage will tell you it’s out of disk space and ask where to save the image files. Here enter the path to the folder we created in the previous step:
Once Partimage finishes doing its thing, you’ll get the success message we all want at one point or another in our lives:
6. Boot into Windows and admire your new image files. Once you’re done you can restart your machine sans the System Rescue CD and boot back into Windows. On my first reboot, Windows sensed its innards had been messed with and it ran a checkdisk which went fine. Back in trusty Windows Explorer, you’ll see 2 hard drives instead of one—and your new drive will contain a folder called “winrestore” which is full of 2GB disk image files.
Next time your Windows install gets gummed up and you want to start fresh, boot into the System Rescue CD, start Partimage and choose “Restore partition from an image file” and you’ll be golden.
Update: One important thing to know: Partimage’s image files are not mountable and browsable the way Norton or Acronis images are. As far as I know, the image has to be completely restored to disk to access files within it. (Thanks to the commenters who brought this up.)
What’s your favorite way to image an operating system or manage partitions? Let us know in the comments.
Thanks to Jim Sheafer for mentioning the System Rescue CD.