Video Screencast Help
Search Video Help Close Back
to help
Not able to make it to Vision this year? Get a sampling in the Best of Vision on Demand group.

How To Create/Restore A Ghost Image Stored On A Local Machine And Hide/Unhide The Partition Containing The Image

Updated: 23 Apr 2010
Marcello D'Angelone's picture
0 0 Votes
Login to vote

The following Deployment Solution job assumes that the target machine has at least 2 partitions. The first partition contains the operating system, the other one the Ghost image.
 
To create the image and hide the partition:
 

1) Create a new Job, Select “Add” and “Run Script”

2) On the “Run this script copy and paste the text below

cd ghost
REM Create image of partition 1 disk1 and store the image on partition 2 disk1
ghost32 -clone,MODE=pcreate,SRC=1:1,DST=1:2\%COMPNAME%.gho -sure -fx
REM hide partition 2
gdisk32 1 /hide /P:2 /Y

3) Click Next and select “Automation pre-boot environment” in this example we use WinPE as PXE boot option. If you wish to use FreeDOS instead you should copy the script below:

cd ghost
REM Create image of partition 1 disk1 and store the image on partition 2 disk1
ghost -clone,MODE=pcreate,SRC=1:1,DST=1:2\%COMPNAME%.gho -sure -fx
REM hide partition 2
gdisk 1 /hide /P:2 /Y
 

To un-hide the partition, restore the image and hide the partition again

1) Create a new Job, Select “Add” and “Run Script”

2) On the “Run this script copy and paste the text below

cd Ghost
REM un-hide partition 2
gdisk32 1 /-hide /P:2 /Y
REM restore image from partition 2 to partition 1
ghost32 -clone,MODE=prestore,SRC=1:2\%COMPNAME%.gho:1,DST=1:1 -sure -fx
REM hide partition 2
gdisk32 1 /hide /P:2 /Y

3) Click Next and select “Automation pre-boot environment” in this example we use WinPE as PXE boot option. If you wish to use FreeDOS instead you should copy the script below:

cd Ghost
REM un-hide partition 2
gdisk 1 /-hide /P:2 /Y
REM restore image from partition 2 to partition 1
ghost -clone,MODE=prestore,SRC=1:2\%COMPNAME%.gho:1,DST=1:1 -sure -fx
REM hide partition 2
gdisk 1 /hide /P:2 /Y