CREATING AN AUTOMATED RECOVERY DISK

Introduction

 

This automated system recovery process consists of a bootable diskette image I have created as well as a program called rawwritewin.exe with will create the floppy diskette from this image file. You or your customer will need to supply Symantec’s Norton Ghost 2003 or higher. I have tested this with Ghost 2003, V8 and V9. The image will create a bootable diskette that will automate the recovery process. It consists of MS.DOS Version 6, several generic drivers for most common optical dives, a file to pre-configure Norton Ghost, and a somewhat complicated Autoexec.bat file that performs the automation process. I will explain later how these to last items work and inter-relate.

 

Recovery Disk Creation Procedure

 

Create an image file of the computer using Norton Ghost being sure to save the file as image.gho. This can be done to another hard drive, to a mapped network drive, or an external drive. You can also take the hard drive out of the machine and install it as a secondary drive in another machine and create the ghost image that way. It is ok to allow spanning if required, just configure Ghost to auto name the span image files. They will be image001.ghs, image002.ghs, etc. Make sue the span files are small enough to fit the optical media you intend to use. I recommend 650 meg for CD’s. Make sure you perform an integrity check on the image files to make sure they are valid.

 

Create a bootable CD/DVD using either the GhostRecovery.img file as your bootable source or use Rawwritewin.exe to create a bootable floppy diskette to use as the source.

Make sure Ghost.exe and the image.gho files are on the CD. If all image files and ghost.exe can fit on a CD or DVD that will work as well. Be sure to verify data when burning the disk.

Note: Roxio can use the .img file as it’s bootable source, however Nero requires a diskette.

 

Test the recovery disk on the system for which it was made. I will often temporarily swap the hard drive with another raw drive for this step. This will accurately simulate replacing a failed hard drive. Make sure you thoroughly test the recovered system.

 

Recovery Disk Usage

 

Recovering the system with a Ghost image file will restore the system to the state at the time the image was taken. All data will be lost so be sure to backup any user data before performing this procedure. The procedure is simple. Insert the recovery CD/DVD into the drive and boot the computer from the optical drive instead of the hard drive. Follow the simple prompts, and the system will be restored. There will be an opportunity to abort the process right before Ghost begins writing to the drive. This is provided in case the disk is booted accidentally.

 

Note: Once Ghost begins writing to the drive it cannot be undone. Make sure any important files and data have been backed up to another drive before performing a system recovery.

 

ALL DATA ON THE RESTORED DRIVE WILL BE REPLACED WITH THE ORIGINAL DRIVE IMAGE!


How It All Works

 

GHSWITCH.TXT:

 

There is a file on the diskette called ghswitch.txt. This configures Norton Ghost to do a few things. It contains the following lines.

 

-afile=r:\Ghosterr.txt

-clone,mode=restore,src=image.gho,dst=1-quiet

-sure

-rb

 

What it means:

 

-afile=r:\Ghosterr.txt

The first line relocates the Ghost error file to a Ramdrive so it can be written to. Otherwise Ghost would try to write to the optical drive and would cause unrecoverable errors.

 

--clone,mode=restore,src=image.gho,dst=1-quiet

This line tells Ghost to restore hard drive 1 with the image.gho file, and ignore all user prompts. If the image file is spanned across several disks, it will ask the user for the next disk, etc. until it is finished.

 

-sure

This line tells Ghost to not display the screen that warns the user that the system will need to be restarted

 

-rb

This line tells Ghost to reboot the system

 

AUTOEXEC.BAT

 

The other important file is the Autoexec.bat file which performs the following procedures.

 

Sets the time zone to GMT +5

Installs the mouse driver and the CD driver

Finds the drive letter of the RAM drive set up by the config.sys file. (This is required for redirects).

Sets an environment variable for the ramdrive and a substitution to drive “R:”

Copies several files over to the ram drive

Sets the comspec to the ramdrive thereby transferring control from the CD to the ramdrive

Prompts the user to allow restoration of the drive by pressing the F8 key allowing the user to abort.

Tests the key response from the user for the F8 key

Finds which drive is the optical drive with the restore disc

Changes to that drive

Prompts the user one more time allowing them to abort the process

Restores the drive from image.gho

Reboots the system

 


The process summary

 

This system will work on a system with as many as 7 partitions and optical drives. I set up a ramdrive since the bootable optical drive cannot be written to and if Ghost tries to have it’s error log file on the boot disk, it will cause an unrecoverable error when it tries to write to the log file. Since DOS assigns the first unused drive letter to the ramdrive, and I need to address that drive by drive letter, I need to find out which letter has been assigned to it. This is done with FINDRAM.EXE and FINDRAM.BAT with the use of errorcodes. This allows me to set an environment variable with the drive letter of the ramdrive. I can now substitute this drive letter with “R:”. This allows me to direct Ghost to the ramdrive no matter how may drives are in the machine. I then move a few important files to the ramdrive and transfer control of the operating system to it as well. This allows the swapping of the CD/DVD disc without causing command errors. I then prompt the user for a specific keystroke (F8) to continue the process and test their key response for the correct key. Any incorrect key will abort the process. If the correct key is pressed, I find which optical drive contains Ghost.exe and the image file. I then run Ghost.exe from that drive and the system restore begins.

 

This system has been tested with all operating systems from DOS to WinXP Professional, as well as FAT16, FAT32, and NTFS file systems. It will also work with raw unpartitioned and unformatted IDE hard drives.

 

If you require a more in depth explanation of the process, or have questions, please do not hesitate to contact me.

 

I this process does not serve your needs or specific requirements, a custom procedure can be written for you to accommodate network rollouts, external devices, as well as custom configurations.

 

Enjoy

Cliff Robertson

Clarify Technical Services

cliff@clarifytech.com