Radified Community Forums
http://radified.com/cgi-bin/yabb2/YaBB.pl
Rad Community Technical Discussion Boards (Computer Hardware + PC Software) >> Norton Ghost 2003,  Ghost v8.x + Ghost Solution Suite (GSS) Discussion Board >> command line access to image file on bootable CD
http://radified.com/cgi-bin/yabb2/YaBB.pl?num=1130506294

Message started by John Butler on Oct 28th, 2005 at 10:31am

Title: command line access to image file on bootable CD
Post by John Butler on Oct 28th, 2005 at 10:31am
Hi all,
  I have created a bootable CD with a ghost image on it using NightOwl's guide. However, I need to be able to launch ghost from the autoexec.bat and specify the image file to restore.

 So I would like to add the following statement to the autoexec.bat....

GHOST.EXE -clone,mode=load,src={my image file},dst=1

 However, since the ghost image is not part of the bootable disk image, I do not seem to have access to it from DOS. Is there a way I can get access to it or is there some way to specify it from the command line?

Thanks,
John

Title: Re: command line access to image file on bootable
Post by NightOwl on Oct 28th, 2005 at 11:24am
John Butler

When you create the startup files using the Guide, one of the steps is to create the *Autoexe.bat* file, and the last line is:

ghost.exe

That line loads the basic Ghost DOS interface.

If you want to load Ghost with specific command line switches, simply replace that line above with what you want before you create the bootable CD.

But, be aware, depending on the specific command line switches--your customized boot disk may perform only a specific function that you have defined, and not be useful for other general Ghost functions.

But, looking at your command line statement--what exactly are you trying to have the boot disc do for you?

You may need the *-sure* switch (and possibly other switches as well) to have Ghost perform the function *automatically*--otherwise you will have to respond to certain prompts.

Switches: Alphabetical list of switches

Your *src=XXXX* switch has to use the correct path to the image file.  

If it's on a FATxx HDD partition, then it needs to be the correct partition drive letter that is assigned when your DOS session boots.

If it's on a NTFS HDD partition, then it has to be in the form of *1:1, 1:2, 1:3.... or 2:1, 2:2, 2:3....* or whatever is the correct *drive #:partition#* that Ghost uses for NTFS partition designations.

If it's on the data portition of the boot CD, then you have to use the drive letter assigned during boot to designate the path to the optical drive.

As an alternative, using a general boot disk that loads Ghost--you can *Quit* Ghost, and then type the new command line that performs the specific task you wish to designate at the DOS prompt.  Ghost will then be re-loaded and perform based on the command line switches that you have used.

Putting the Ghost command line in *Autoexec.bat* is used to *automate* the Ghost function you're interested in--as opposed to typing it in each time you boot to DOS and load Ghost.

Title: Re: command line access to image file on bootable
Post by John Butler on Oct 28th, 2005 at 2:14pm
Thanks for the reply NightOwl,

I am attempting to setup the autoexec.bat to automatically restore a ghost image that is stored on the bootable cd.

The problem is that the boot CD that Ghost creates, or that is created from Roxio using a Windows boot disk, doesn't seem to map a drive to the data portion of the CD.

I am able to see the image from within Ghost but from the DOS prompt I cannot get to it. All that shows up in the A drive is the boot stuff and I get an invalid drive for all other driver.

For this reason, I don't know what path to put in for the souce in the command line.

Any ideas?
Thanks,
John

Title: Re: command line access to image file on bootable
Post by NightOwl on Oct 28th, 2005 at 2:35pm
John Butler  

I'm going to be out of town for the weekend starting after I post this reply--so I will not be able to follow up until probably Monday.

If you followed the Guide, then your optical drive should be assigned the drive letter *X:\*.

Post the content of your *autoexe.bat* and *config.sys* here if you are still having problems and I can look it over.

Report back with the results of your efforts.

Title: Re: command line access to image file on bootable
Post by John Butler on Oct 28th, 2005 at 3:34pm
Thanks again for the help.

Here is what I have...

Config.sys ############

LASTDRIVE = Z

#################

Autoexec.bat ###########

@echo off
SET TZ=GHO+05:00
MOUSE.COM
echo Loading...
CD GHOST
GHOST.EXE -clone,mode=load,src=X:\CDR00001.GHO,dst=1:3

##################

These are the files that were produced by Ghost. All I added what the -clone statement.

I get the following errors:

"Output error file to the following location - A:\ghosterr.txt" ...

If I say OK, I get -- "Cannot open ghosterr.txt" which makes sence since this is a CD.

If I hit Cancel, I get -- "Cannot open X:\cdr00001.gho"

Title: Re: command line access to image file on bootable
Post by NightOwl on Oct 31st, 2005 at 10:19am
John Butler

Not exactly sure what *guide* you are following--I usually am creating *customized*  *config.sys* and *autoexec.bat* files--and yours looks to be the *std ghost boot disk*.

What's missing are the startup files that *mount* your optical drives, and then assign drive letters to the mounted optical drive.

See the following link for an example of *config.sys* and *autoexec.bat* that have the needed files mentioned in their text file--see just after item #6 for the explanation of what the various files are doing and why.

You would have to add the appropriate lines to the startup files--and the actual files to the boot disk before burning it to the boot sector of the optical media in order to have access to optical drives.

Step-by-Step Instructions

If Ghost is compatible and recognizes your optical drive, Ghost can access the drive without *oakcdrom.sys* and *mscdex.exe*.  You will see the drives identified as *@CD-R1 (discription of optical drive)* rather than by *drive letter*.

But, Ghost will only use its built-in ability to access optical drives this way if Ghost created and burned the Ghost image directly to the optical media in the first place--an image that is first created to HDD and later burned by a third party burning program will not be *recognized* by Ghost unless the optical drive is mounted and assigned a drive letter in DOS.

Title: Re: command line access to image file on bootable
Post by John Butler on Nov 1st, 2005 at 9:26am
Thanks NightOwl.

I must have missed something the first time I tried to use your guide. I finally was able to get a bootable CD with an image on the same CD and kick off the restore from the autoexec.bat file.

Coolness.  ;D

John

Radified Community Forums » Powered by YaBB 2.4!
YaBB © 2000-2009. All Rights Reserved.