Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

What did I do wrong? (Ghost Command Line)

Updated: 21 May 2010 | 3 comments
Sam MacCutchan's picture
0 0 Votes
Login to vote
This issue has been solved. See solution.

Hello,

 

I had a server where the C: partition was running low on space. I wanted to use Ghost to extend the partition by imaging the C: and then putting it back at a larger size.

 

The drive was setup like this:

 

 

49MB Hidden utility partition.

12GB C: (Operating System)1000GB D: (Data) 270GB Unused unpartitioned space.


I made an image of the C: and then ran the following Ghost command:

 

 

ghost32 -CLONE,mode=RESTORE,src=F:\image.gho,dst=1:2 -SZE1=23000M

(F: is an external USB disk where I created the image.)

 

Obviously I misunderstood something as that command restored the C: partition to the disk at the correct size but it blew away all of the other partitions and I was left with a huge chunk of unpartitioned unused space on the drive.

 

Did I need to specify the sizes of the other partitions even though I wasn't restoring them? Should I have used mode=COPY instead of mode=RESTORE?

 

Any suggestions or pointers would be very appreciated. I have backups so I haven't lost anything but I'd still like to understand what I did wrong so that I can try this again (on a test machine) and get it right.

 

Thanks.

 

-Sam

 

 

discussion Filed Under:

Comments

James DJ Lee's picture
27
Jan
2009
0 Votes 0
Login to vote

Hi Sam MacCutchan,

 

I assume that you create an image of disk rather than partition.

in this case, unless you specify given values for the size, ghost will automatically adjust the size of each partition. so in this case, only first partition will be resized to 23000M.

one thing I noticed is that you are doing disk restore and give destination as partition.

 

if you want to restore as a disk, command line should be like

ghost32 -clone,mode=restore,src=f:\image.gho,dst=1 -sze1=23000M

 

if you want to restore to a specific partition, command line should be like

ghost32 -clone,mode=prestore,src=f:\images:gho:2,dst=1:2 -sze2=23000M

 

above will restore second partition from the image file to second partition in disk 1 and set the size as 23000M. however, if you are using the same disk, it will fail since your existing 2nd partition is too small.

(12GB and trying to make it 230 GB)

 

if you want to increase the size of c:, I would recommend the following.

 

1. create a disk image of your existing disk to USB drive.

(ghost32 -clone,mode=create,src=1,dst=f:\image.gho)

2. ghost image will contain 3 partitions. (hidden, c:, d:)

3. restore an image as a disk and resize the 2nd partition. 1st partition is hidden partition.

(ghost32 -clone,mode=restore,src=f:\image.gho,dst=1 -sze2=23000M)

4. this will resize c: to 23000M and it will resize D: as well to use all unused space.

if you don't want to do that, you can set size for D: as specific value.

 

regards,

James Lee

 

bornslippy's picture
27
Jan
2009
0 Votes 0
Login to vote

Or you could use a partition utility to expand partition sizes. (PartitionMagic is one example)

Sam MacCutchan's picture
28
Jan
2009
0 Votes 0
Login to vote

James,

 

Thanks for your help. I will try that next time.