Note: Nice tutorial with screenshots online.

If you have ever reformatted a computer, reloaded it with software by loading the programs one by one, you know it can be a time-consuming process. As a matter of fact, I recall spending many an hour loading software with a book in hand (pleasure reading, not a manual!) just clicking “NEXT” at the appropriate moments. Of course, this was before I knew about creating an image of your hard drive. Now, with an image, the process can take as little as 20 minutes (unattended by me) to be up and going. This is a time-saver for me.

UPDATE 11/16/2009: You may want to read this summary article on a variety of backup/restore and reimaging options available for different operating systems. 

What is a hard drive (HD) image?
An image of your hard drive is essentially a digital copy of everything on the hard drive. This is important to have because the more we use a computer, the worse the registry on the computer can get. Most folks don’t have software programs like Raxco’s PerfectDisk ($40) to defragment the hard drive or Macecraft’s RegistrySupreme ($12) to clean up the computer’s registry. As such, you can have problems develop as programs are installed, removed (sometimes improperly), eventually degrading the speed of your system. Sometimes, the problem is not just the standard slowness of a system that results from installing/uninstalling programs.
Problems may develop after a spyware/malware or virus infestation, causing problems that even reinstalling your operating system can’t fix. When you reach that sad state of affairs, you have several options:
1) Reformat your computer, and reload all software. This can be very time-consuming. Only a short time ago, this process could be done fairly quickly in 1-2 hours. However, the size of software and the time it takes to copy it from CD to hard drive can be lengthy (4-5 hours). Worse, as a result of spyware/malware/viruses, you must complete Windows System Updates, install firewall software, antivirus software, and innoculate your computer against malware. Unfortunately, if you’re not careful, when you connect to the network to install these updates and get the programs, viruses will invade your computer BEFORE you can “put your shields up.” I recommend downloading the firewall, antispyware and antivirus software, putting it on a CD and having it ready. That way, your system is protected PRIOR to connecting to the network.
2) Using a previously saved image of the hard drive, re-image your computer. This means wiping out everything that was on your computer at the time of re-imaging with a copy of your hard drive. To ensure complete privacy, you may want to use Darik’s Boot-n-Nuke prior to reimaging, but that is only if you want to ensure all previous data was erased from the hard drive. “Erased” in this case means making the data completely unrecoverable, even by computer forensics. The copy of your hard drive that you have saved previously is a “pristine” copy or a snapshot of your computer system the way you wanted it to be before you started installing/uninstalling programs, had to deal with spyware/malware, etc. It’s a fresh start without the time consuming problem of reloading all your software.
Several questions come to mind, however, for option #2:
a) Where do I save a copy of my hard drive? The copy is obviously going to be very big and can’t be on my computer at the same time. So, where can it go?
Response: CD-ROMS and DVD media are not really the best way to save a copy of your media. While they are often used by technical support specialists, regular folks like you and I may find the process of creating an image of the hard drive, then burning it to CD problematic. Instead, I recommend purchasing an external 120gig USB hard drive. These hard drives are easy to connect to your computer and should be formatted when you receive them as FAT32. FAT32 is the most “easy to read” format for various operating systems (such as Windows, Mac, and Linux). Reformatting an external USB hard drive is as simple as reformatting a floppy.
Once reformatted to FAT32 (the same format used for Windows 98 systems, BTW), you have a drive that will allow you to back up your data. Most hard drives, even though they may be 80gigs or more, rarely have that much on them. That is, an image of your hard drive may only take up 4-6 gigs of your 120gig drive. So, you’ll be able to use your external 120gig HD for more than just a backup image of the hard drive.
b) How do I make an image of my hard drive? Don’t I need expensive, special software to make an image?
Response: While there are a variety of programs you can use, I prefer free, open source software (FOSS), as opposed to a program like Norton Ghost. As such, you can use a Linux program called PartImage. Even if you’re not familiar with Linux Operating System, you will be able to use PartImage to save a backup image of your computer. More details will be provided on how to accomplish this in a future blog entry.
Getting Ready
1) You’ll need to obtain a copy of the System Rescue CD. You can save the ISO file and then burn it to CD-ROM using the free BurnCDCC software. This CD-ROM will provide us with two critical pieces of software that we will need, namely run_qtparted and PartImage. Run_QtParted is actually a reference to a free software program that runs on Linux but does the same type of job as the Windows program, Partition Magic.
2) Buy an external USB 120gig Hard Drive.
Our next step will be to outline the process you will follow to first create the “image” of your hard drive, save it to your external hard drive, then how to use the SystemRescue CD and PartImage to reimage your computer’s hard drive.

Phase 1: Making a Backup of Your Hard Drive

Let’s assume that you’ve just reloaded your computer with the latest and greatest. However, since you’re worried about spyware/viruses, you’re going to back this up before you do anything else. Follow these steps below:
1) Put the System Rescue CD in your CD-ROM Drive.
2) Restart your computer and boot off the CD.
3) Press ENTER at the appropriate locations, ignoring questions about your favorite language, etc.
4) Once you’re past all the screens that tell you what’s happening as you start up, you’ll finally be taken to a command prompt.
5) Your next step is to mount the external USB HD; this just means that the computer needs to recognize that the hard drive is there.
6) To accomplish that, you first have to create a directory. Do this by typing in the following:
mkdir /mnt/udrive
7) After creating this directory, you’re now ready to connect the external USB hard drive (from now on known as “udrive”). When you plug it into the USB port in the back of your computer, you will see the type of drive it is pop up onto the screen. It may “stall” with that information on the screen. After a few seconds, simply press ENTER on your keyboard to go back to the command prompt.
8) To mount the drive, you will need to get some more information about the udrive. To accomplish, type the following:
fdisk -l
This will give you a listing of the hard drives. One of them will be your computer, the other will be the udrive. The udrive will look something like this:
/dev/scsi/host0/bus0/target0/lun0/part1
9) To mount the udrive, you will need to type the following:
mount -t vfat /dev/scsi/host0/bus0/target0/lun0/part1 /mnt/udrive
10) Once the udrive has been mounted successfully, change to that directory by typing the following:
cd /mnt/udrive
11) You should now be able to type in the following letters (no numbers) to get a listing of all the files:
ls -l
12) You are now ready to run PartImage. To do that, type partimage at the command prompt.

13) Select the hard drive you want (you probably won’t have as many choices as I do…only two, your actual hard drive and the udrive). Type in the image file name to create/use, and select SAVE PARTITION INTO A NEW IMAGE FILE. Then, press F5 on your keyboard. This will take you to the next step.
14) At this next step, select no compression and leave the other choices as is. Go to the next window by pressing the function key, F5.

15) On the next screen, you’ll be asked to enter a description. Keep it short or don’t type anything at all. It’s up to you. Press ENTER to move past this screen. Press ENTER again to get past the summary page with OK on it.

16) As soon as you press ENTER, the backup will begin.
16) When the back up is complete, you will find yourself back at a screen that you can exit quickly.
17) When back at the command prompt, note that you can check to see if the backup was completed by typing in the following:
ls -l
This will give you a list of files that look like:
backuphd.000
backuphd.001
The number of files will depend on the size of your backup.
Phase 2: Reimaging Your Hard Drive
Now that you’ve created your backup, you can choose to drop that image on any other computer that is the same (for example, you have a lab full of D505 laptops or desktop computers that you want to reimage).
1) Put the System Rescue CD in your CD-ROM Drive.
2) Restart your computer and boot off the CD.
3) Press ENTER at the appropriate locations, ignoring questions about your favorite language, etc.
4) Once you’re past all the screens that tell you what’s happening as you start up, you’ll finally be taken to a command prompt.
5) Your next step is to mount the external USB HD; this just means that the computer needs to recognize that the hard drive is there.
6) To accomplish that, you first have to create a directory. Do this by typing in the following:
mkdir /mnt/udrive
7) After creating this directory, you’re now ready to connect the external USB hard drive (from now on known as “udrive”). When you plug it into the USB port in the back of your computer, you will see the type of drive it is pop up onto the screen. It may “stall” with that information on the screen. After a few seconds, simply press ENTER on your keyboard to go back to the command prompt.
8) To mount the drive, you will need to get some more information about the udrive. To accomplish, type the following:
fdisk -l
This will give you a listing of the hard drives. One of them will be your computer, the other will be the udrive. The udrive will look something like this:
/dev/scsi/host0/bus0/target0/lun0/part1
9) To mount the udrive, you will need to type the following:
mount -t vfat /dev/scsi/host0/bus0/target0/lun0/part1 /mnt/udrive
10) Once the udrive has been mounted successfully, change to that directory by typing the following:
cd /mnt/udrive
11) You should now be able to type in the following letters (no numbers) to get a listing of all the files:
ls -l
12) You are now ready to run PartImage. To do that, type partimage at the command prompt.

13) Select the hard drive you want to reimage (/dev/sda1 probably) (you probably will have two choices, your actual hard drive and the udrive). Type in the image file name to create/use, and select RESTORE NEW IMAGE FILE TO PARTITION . Then, press F5 on your keyboard. This will take you to the next step. You’ll confirm the descriptions and then the process will begin.

I need to add some screenshots (I once had them but they “fell” out).


Subscribe to Around the Corner-MGuhlin.net