AndysTechPage.com
Disk Preparation
Automate Norton Ghost
Ghost runs nicely from a batch file..
Disk Preparation


I reckon you can't go better than imaging software, for the ultimate backup of an operating system and I've always favoured Norton Symantec's Ghost. It just works.. One of the many things I like about Ghost is that the process can be automated.

Why automate? Well whenever I build a machine up for someone, I always partition the hard disk into a primary and a logical drive. I take an image of the C: drive and copy the image file to D: and also to CD/DVD. That way, if when Windows dies/gets infected with a virus/the user deletes something they shouldn't/I don't want to be disturbed, the user can just chuck the bootable CD in and reimage the C: drive with no further ado.

Naturally the user has been previously trained to copy all data to the D: drive [right-click on My Documents and relocate to a new target folder on D:]. Meanwhile Andy gets to continue sipping his pina colada somewhere in the Bahamas without incident..

The following activity really brings it all together, requiring an understanding of disk partitioning, the manual use of Norton Ghost, creating and using a boot disk, creating batch files and using autoexec.bat and finally creating a bootable CD [most of this is under Disk Preparation]. The steps are fairly straightforward; create a ghost image of the partition, create a boot disk which will become the bootable part of the CD. The command for Norton ghost is just a single line in the autoexec.bat file:

ghost -clone,mode=pload,src=filename.GHO:1,dst=1:1 -sure -rb

The scrawly stuff after ghost is the switches which tell Ghost what to do with the image file. Here's a breakdown of the commands:

ghost ghost.exe, the file which is the whole program in fact..
filename.gho:1 specifies source partition of image (even when it's only a 1 partition image..)
clone specifies the cloning operation that you want Ghost to perform
mode=pload copy a partition from an image file to a local drive.
dst=1:1 Drive number:Partition number of destination drive; 1:2 = 2nd partition on first drive.
Alternatively..
mode=load copy the contents of an image file to a disk, including all partitions in the image file
dst=1 the number of the destination physical drive; use 2 for drive two, etc..
src= location of ghost image file; spell it correctly and get the path right..
sure don't ask for confirmation, I know what I'm doing..
rb reboot after imaging

Thus when the disk boots up, the final command will be the last line of autoexec.bat which will cause the disk/partition to be imaged from the specified file, with no user intervention required. Just make sure the user knows to eject the disk before the reboot..

For more information on disk imaging parameters, consult the following references, straight from the horse's mouth..

http://service1.symantec.com/SUPPORT/ghost.nsf/pfdocs/1998082612540625
http://service1.symantec.com/SUPPORT/ghost.nsf/docid/1998082413392025


andystechpage.com

- A.


Put 13.09.2004 | | Refresh Page |