Welcome, Guest. Please Login
 
  HomeHelpSearchLogin FAQ Radified Ghost.Classic Ghost.New Bootable CD Blog  
 
Page Index Toggle Pages: 1
Send Topic Print
Partition to Partition Restore using Command Line (Read 18701 times)
Gamble
Ex Member




Back to top
Partition to Partition Restore using Command Line
Jul 25th, 2006 at 5:12pm
 
I'm having trouble doing a partition to partition restore using the command line.  Here is the basic set-up:

Ghost 8.0.0.984
Disk 1:1 - Dell utility partition - FAT
Disk 1:2 - Operating System(WinXPwithSP2) - NTFS
Disk 1:3 - Ghost Image(ghost.exe is this partition as well) - FAT32

I am able to do a restore using a Win98 boot disk and the Ghost GUI but can't get the syntax down for the command line.  I would eventually use the command line to do an automated restore.

Here is the syntax i have been using:

ghost -clone,mode=load,src=1:3\image.gho,dst=1:2

The error message is:
Usage Error 684
The location of the File Preservation Metadata File conflicts with the destination of the clone.  Use the -PFILE switch to specify a different location for the File Preservation Metadata File.

I have use the -pfile switch with no luck(probably user error).

Any suggestions would be greatly appreciated.
 
 
IP Logged
 

NightOwl
Radministrator
*****
Offline


"I tought I saw a puddy
tat..."

Posts: 5826
Olympia, WA--Puget Sound--USA


Back to top
Re: Partition to Partition Restore using Command L
Reply #1 - Jul 25th, 2006 at 7:39pm
 
Gamble

Looks like a syntax error.

*load* means you are using the partition from the image file (or possibly mulitiple partitions in an image) to load onto the *whole disk*--not just a partition.

*pload* means you are loading a partition from an image file to a *partition*--not the whole disk.

Here's the basic syntax:

-clone, MODE=pload, SRC=drive:partition\filename
:partition#
, DST=drive:partition

Your statement is also missing the partition # from within the image file to be selected for restoring--if the image file is of a single partition--the the partition # is *1*, and still must be specified.

Here's your statement:

ghost -clone,mode=load,src=1:3\image.gho,dst=1:2

Here's mine:

ghost -clone,mode=pload,src=1:3\image.gho:1,dst=1:2

Let me know if that works.

Here's a reference that also may help: 
Switches: Cloning
 

____________________________________________________________________________________________

No question is stupid ... but, possibly the answers are Wink !
 
IP Logged
 
Gamble
Ex Member




Back to top
Re: Partition to Partition Restore using Command L
Reply #2 - Jul 26th, 2006 at 3:48pm
 
That is the correct syntax.  Thanks for all your help!!
 
 
IP Logged
 
scj6771
Dude
*
Offline


I love YaBB 1G - SP1!

Posts: 22
usa


Back to top
Re: Partition to Partition Restore using Command Line
Reply #3 - Jan 19th, 2010 at 3:25pm
 
I am using the same version of Ghost and have only my C: drive and a partition off of that (D:) that contains the Ghost image. This is what I have and it does not see to be working:

ghost32 -clone,mode=pload,src=0\2530P_01-19-10\2530P:0,dst=0:0

PLEASE pardon my lack of knowledge, I usually just boot into BARTPE and image the machine by pulling the images off the server.

But I have created the image of the entire C: drive including the D: (which contains the Ghost image) and wish to image the machine from that image on the D: drive.

Can I do it from inside Windows?
 
 
IP Logged
 
NightOwl
Radministrator
*****
Offline


"I tought I saw a puddy
tat..."

Posts: 5826
Olympia, WA--Puget Sound--USA


Back to top
Re: Partition to Partition Restore using Command Line
Reply #4 - Jan 20th, 2010 at 8:57am
 
@
scj6771

Quote:
Can I do it from inside Windows?

No--you can not use Ghost32 that is running from the active OS to over-write that OS partition--it would over-write and stop all OS functions including Ghost32!

Quote:
ghost32 -clone,mode=pload,src=0\2530P_01-19-10\2530P:0,dst=0:0

Your syntax for the command line would not work as typed--Ghost starts the numbering of the HDDs on a system with *1* and not *0* for a HDD with NTFS partitions--so *C:* would be 1:1 and *D:* would be 1:2--so your command line would need to be altered to reflect that numbering system.

Other examples of command lines are shown at the end of this Symantec FAQ:  Switches: Cloning
 

____________________________________________________________________________________________

No question is stupid ... but, possibly the answers are Wink !
 
IP Logged
 
scj6771
Dude
*
Offline


I love YaBB 1G - SP1!

Posts: 22
usa


Back to top
Re: Partition to Partition Restore using Command Line
Reply #5 - Jan 20th, 2010 at 9:23am
 
Thanks NightOwl, I figured running Ghost32 from within Windows was not going to work.

What I am looking to do is to be able to remote into a machine if I had to and image a machine quickly. I want the Ghost image on the machine and maybe BARTPE? I am lookin for a all in one solution to quickly image a machine. Can I boot into a BARTPE partition somehow? I do it now using a thumbdrive, but again, I want to do everything from within the machine.

I hope this makes sense.
 
 
IP Logged
 

NightOwl
Radministrator
*****
Offline


"I tought I saw a puddy
tat..."

Posts: 5826
Olympia, WA--Puget Sound--USA


Back to top
Re: Partition to Partition Restore using Command Line
Reply #6 - Jan 20th, 2010 at 10:04am
 
@
scj6771

Quote:
I want to do everything from within the machine

This is doable--takes some setting up, but works fine once you get there--and, *yes*, it can probably be done from a BartPE partition--I'm not a BartPE person so don't know the details, but I've seen it referenced as doable--you need to put the needed commands in a batch file in the startup folder that references the needed batch file to run the needed steps as outlined below.

You would have to add a primary partition and make it bootable--if you want to use Ghost32, then you would have to boot with BartPE so you have a Windows based OS available.  Or, you could use *ghost.exe*--the DOS based Ghost and then you create a bootable partition that is DOS based.

You then use a Master Boot Record (MBR) program that allows for running it from a command line.  You  place the commands inside a batch file.  The commands would be to change the current OS partition to *inactive* and *hidden*, and then the make your Ghost partition *unhidden* and *active*.  The final command in the batch file would be to *re-boot*.  Once Windows closes down and re-boots the system, you would now be booting from your Ghost partition.

You would have the needed commands in place to run a batch file that tells whichever version of Ghost you are using to create the Ghost image file you want, and when completed, your batch file would run the MBR program again (which you would also have on the Ghost partition) to re-set the partitions so the Ghost partition is now *inactive* and *hidden*, and your Windows partition is *unhidden* and *active*--and the final command is to re-boot.  This then brings you back to your original OS.

You can then create a shortcut that you click to start the whole process of calling that Windows batch file--and, I've not done this, but I assume if you have *remote* access to a system, then you can remotely connect to the Windows OS, execute that batch file--and everything goes from there!

Lots of details to keep track of!  You need to get comfortable with the MBR program and changing boot partitions from *active* to *inactive* and from *unhidden* to *hidden*.  You have to be able to create an additional primary partition for booting from.  And, if using BartPE, you will have to figure out how to transfer it to a HDD partition for booting from--instead of from a flashdrive or optical disc.

Then, you just have to figure out the necessary command lines, and where to put them in batch files that will run the commands when you need them.
 

____________________________________________________________________________________________

No question is stupid ... but, possibly the answers are Wink !
 
IP Logged
 
scj6771
Dude
*
Offline


I love YaBB 1G - SP1!

Posts: 22
usa


Back to top
Re: Partition to Partition Restore using Command Line
Reply #7 - Jan 20th, 2010 at 2:07pm
 
Started digging around (http://www.911cd.net/forums//index.php?showtopic=18031) and it seems you can't do it from an Extended or Logical partition, so that option might be out.

It would be nice to have some kind of "all-in-one" fix at times. Even running a Windows XP repair from the recovery console means I gotta have the guy /gal bring in thier laptop to get it done, and if their is a virus or the machine is infected with spyware once again they have to bring it in.

Anyway, if I did want to use that command line to image a machine, what do you suggest I boot into? I mean if I can't run it from inside Windows (obviously) What would be the way to kick it off?
 
 
IP Logged
 
NightOwl
Radministrator
*****
Offline


"I tought I saw a puddy
tat..."

Posts: 5826
Olympia, WA--Puget Sound--USA


Back to top
Re: Partition to Partition Restore using Command Line
Reply #8 - Jan 23rd, 2010 at 12:52pm
 
@
scj6771

Quote:
it seems you can't do it from an Extended or Logical partition, so that option might be out

Well, it's out for sure if you use the *std boot loader* that's used by Microsoft.  As a standard, each HDD can have a max of 4 primary partitions.  You can use one of those primary partitions to create an *extended* partition--which can contain as many *logical partitions* as the number of available drive letters will allow.

So, your OS has to use one primary, if you have a second partition for data--that will use another primary (either as a primary partition--or as the needed extended partition to hold additional logical partitions), so there's two primary partitions still available--unless you have a Dell or other manufacturer who adds *utility and/or restore partitions* in addition to the basic OS partition--you will have to make decisions and choices about keeping those...

But, there are other boot loaders available that can actually use extended partitions for booting from--and having unlimited *primary partitions*.  You can learn more here:

Understanding MultiBooting and Booting Windows from an Extended Partition

BootIt NG (Next Generation)


Quote:
Anyway, if I did want to use that command line to image a machine, what do you suggest I boot into?

The simplest way is to use one of the available 4 primary partitions as an imaging boot partition used exclusively for performing the imaging procedures.  Another option for using Ghost32 and not using BartPE could be installing another functioning WinXP OS into that imaging boot partition--once you have hidden and made the main WinXP partition inactive--you can use Ghost32 from that unhidden and active imaging partition to do all of Ghost's procedures as long as it does not include over-writing or saving an image of that imaging partition to that imaging partition (you can save an image of the inactive, hidden WinXP partition though).  But, that method will obviously require a much larger partition to hold the whole WinXP system--BartPE or a DOS partition can be much smaller in size!

Quote:
I mean if I can't run it from inside Windows (obviously) What would be the way to kick it off?

Well, it all depends on what you want to set up--and under what circumstances you intend to start the Ghost process--i.e. are you going to start the process while booted to the main WinXP system--then you can simply run a batch file by clicking on a shortcut that calls it.  But, if your needs are for a system that's been *whacked* by the user so you can no longer boot into Windows--then you will have to have a booting solution that doesn't need an active WinXP that allows you to boot to it--i.e. an emergency boot option such as a floppy disk, bootable optical disc, bootable flash drive, or a boot loader other than the Microsoft way that allows you to boot to another bootable partition (See the Multibooting information above!).

If you're booted to WinXP--and you want to switch to the imaging boot partition--I use the following technique:

I use the program MBR Wizard v1.53 (the Windows version, not the DOS version):

Download page for MBRWizard - The MBR Management Utility

The MBR Wizard program should be placed in the root directory of the C: drive so it is found when you run the batch file.

Using NotePad, I create the following text file:

Quote:
mbrwiz /hide=0
mbrwiz /inactive=0
mbrwiz /active=2

SHUTDOWN -r -t 01

And then save it as *reboot.bat* to my root directory of C:

Then create a shortcut to that file that I place on my desktop called *Reboot to Ghost Imaging Partition*.  The above assumes that my WinXP OS is on partition 0 (zero)--MBRWiz starts partition numbering at zero), and my Ghost imaging boot partition is the third primary partition--so number 2 (my data partition is the 2nd partition--so partition 1 based on starting at zero).

You can find Windows shut down commands by Goggling:  SHORTCUTS TO SHUTDOWN & RESTART WINDOWS 2000 & XP

The above instructed the MBR Wizard program to change the current Active, Unhidden WinXP partition #0 to be Hidden, and Inactive (upon next re-boot!), and to make my Ghost imaging partition the Active partition on next re-boot.  That imaging partition has to be bootable and have whatever program files and command lines that are needed to perform whatever Ghost task I want--or one could simply run Ghost manually if you don't want an automated procedure.  You would have BartPE for Ghost 32--or a DOS boot partition for DOS *ghost.exe*.

You would then need a similar set of commands for MBR Wizard in the Ghost imaging partition to change everything back to the WinXP OS partition as being Active and Unhidden.  If the Ghost imaging partition is a DOS partition--then you would use the DOS based MBR Wizard program v1.52: 

Quote:
mbrwizd /hide=2
mbrwizd /inactive=2
mbrwizd /active=0
reboot.com


Note, you need a DOS based re-boot program if in DOS.  And, the MBR Wizard command to make a partition *active* automatically *unhides* it as well.

Fair warning--practice the above on a *non-essential* system or spare HDD until you are comfortable with the results--you want to be able to recover from a bad command made by mistake, etc. !
 

____________________________________________________________________________________________

No question is stupid ... but, possibly the answers are Wink !
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print