Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Norton Ghost batch command usage is detailed


May 23, 2021 DOS Command learning manual



Norton Ghost batch command usage is detailed

Author: Unknown Source: Internet


. T he basic format of the Ghost batch file

Ghost-clone, mode, copy, load, dump, src, drive, file, drive: partition, dst, dri-ve, file, drive: partition,/fro/fx/rb/f32/Z(n)/sure( other parameters)


The meaning and usage of its main parameters are as follows:


-clone: clone means "clone" in English, and here it is a fixed format, meaning to force the execution of the .exe.


Mode: This parameter is used to set the use mode of .exe, and there are six modes to choose from: copy, pcopy, load, pload, dump, pdump. A mong them, copy, load, dump refers to the operation of the hard disk to the hard disk, plus pcopy, pload, pdump) in the same mode for the hard disk partition operation. F or example, "mode-copy" means cloning data from one hard drive to another hard drive of the same or greater capacity, and later means cloning data from one partition to another. " mode-load" means to extract a mirror file and restore it to a hard disk (or partition), and "mode-dump" means to make a hard disk (or partition) into a mirror file.


src: This parameter is used to set the data source position, with 1, 2, 3... R epresenting different sources, such as "src=1:1" indicates that the data originated from the first partition of the master disk, "src=2:2" indicates that the data originated from the second partition of the master disk, and "src=d:\ghost\sysbak.gh1" indicates that the data to be extracted is derived from the sysgbak.gho file in the Ghost directory of the second partition of the master disk.


dst: This parameter sets the target position of the data, which is used in the same way as src. F or example, "dst=1:1" means that the extracted data will be restored to the first partition of the master disk, "dst=2:2" means to the second partition from the disk, "dst=d:\ghost\sysbak.gh1" means that the backed up data will be saved in the host second partition ghost directory sysgbak.gho file.


/fro: This parameter is meant to skip all errors during cloning and is recommended to avoid.


/fx: The program exits automatically after execution and returns to the operating system. T his parameter can be used when crafting mirror files and restoring non-system partitions, but using them when restoring system partitions can cause a crash (refer to /rb when restoring system partitions).


/rb: Force a system restart after the program is executed.


/f32: Convert the FAT16 format to fat32 format.


/Z(n): Set the compression rate of the mirror file, which is only used when making the mirror file. A mong them, n=1 (/z1) means that the mirror file is not compressed, n=2 (/z2) is fast compression, n=3 to 9 is a high proportion of compression. I n practice, the author recommends the use of /z2 (fast compression), its speed and / z1 (not compressed) basically no difference, the mirror file is much smaller. H owever, if your hard drive is not very large, it is recommended to use /z9.


/sure: Answer "yes" automatically to all prompt questions. I n the Host.exe graphical interface operation, the program pops up a number of dialog boxes asking if you are sure to do so, usually with the options "Yes" and "Cancel", and /sure means "Yes" automatically selected to ensure that no manual interference is required during cloning.


In my case, I set up a directory called Host on disk D and backed up the mirror file in Area C with the name sysbak.gho. T he two batch files are as follows:


sysback .bat (backup):


Ghost-clone,mode=pdump,src=1:1,dst=d:\ghost\sysbak.gh1 /fx/z9/sure


Revert .bat (recovery):


Ghost-clone,mode=pload,src=d:\ghost\sysbak.gh1,dst=1:1 /sure /rb


. G HOST parameter detailed example (above you can not look but here must see, but also to record well)


ghost.exe -clone,mode=copy,src=1,dst=2 -sure

Hard drive to torture


ghost.exe -clone,mode=pcopy,src=1:2,dst=2:1 -sure

Copy the second partition of drive one to the first partition of hard drive number two


ghost.exe -clone,mode=pdump,src=1:2,dst=g:\bac.gho

The second partition of the first hard drive is made into an image file and placed in the g partition


ghost.exe -clone,mode=pload,src=g:\bac.gh2,dst=1:2

Restore the second partition to the second partition of the hard disk from the image file that has two partitions inside


ghost.exe -clone,mode=pload,src=g:\bac.gho,dst=1:1 -fx -sure -rb

Restore the c disk with the bac.gho file of the g disk. W hen you're done, don't show any information and start directly.


ghost.exe -clone,mode=load,src=g:\bac.gho,dst=2,SZE1=60P,SZE2=40P

Restore the image file to the second hard drive and modify the partition size scale to 60:40


Restore the disk


Start by making a boot disk that contains .sys, Autoexec.bat, Command.com, Io.sys, Ghost.exe files (which can be done using windows as a program for the startup disk).

Autoexec .bat can include the following commands:

Ghost.exe-clone,mode=pload,src=d:\bac.gho,dst=1:1-fx-sure-rb

With the automatic restoration of files on the d disk, the ghost is automatically jumped out and restarted after the end.

Power on automatically do a backup of Zone C and generate a backup file in Zone D bac.gho.

ghost.exe-clone,mode=pdump,src=1:1,dst=d:\bac.gho-fx-sure-rb


Restore the disc


Includes files: Config .sys, Autoexec .bat, Mscdex .exe (CDROM executing program), Oakcdrom .sys (ATAPICDROM compatible driver), Ghost .exe

Config.sys s content is:

DEVICE=OAKCDROM. SYS/D:IDECD001

Autoexec.bat content is:

MSCDEX. EXE/D:IDECE001/L:Z

Ghost-clone,mode=load,src=z:\bac.gho,dst=1:1-sure-rb


You can modify the instance according to the specific instructions below


-clone must be used with parameters, it is also the most practical of all the switch .batchswitch, the following is the parameters defined by clone

-clone,

mode={copy│load│dump│pcopy│pload│pdump},

src={drive│file│drive:partition},

dst={drive│file│drive:partition}

Mode specifies which clone command to use

Copy hard drive-to-hard drive replication (disktodiskcopy)

Load file restored to hard drive (filetodiskload)

dump makes the hard drive into an image file (disktofiledump)

pcopy partition-to-partition replication (partitiontopartitioncopy)

pload file restored to partition (filetopartitionload)

pdump partition backed up as an image file (partitiontofiledump)


src specifies the location mode of the source partition used by the host runtime and its significance


The ode command corresponds to an example of the parameters used by the mode command src

COPY/DUMP

The source hard drive number.

Take 1 for the first hard drive


LOAD image file name

g: \back98?setup98.gho or device name (drive)


PCOPY/PDUMP

The source partition number.

1:2 represents the second partition of drive 1


PLOAD partition image file name with partition number or drive name plus partition number.

g: \back98?setup98.gh2, representing the second partition in the image file


The target position pattern used by dst to run the Host and its significance:

The mode command corresponds to an example of the parameters used by the mode command dst

COPY/DUMP purpose hard drive number.

2 for the second hard drive


LOAD hard disk image file name.

Example g: s back98 s setup98.gho


PCOPY/PLOAD destination partition number.

2:2 represents the second partition of hard drive 2


PDUMP partition image file name plus partition number.

g:\back98\setup98.gh2


SZEn specifies the size of the destination partition used

The size of the nth destination partition specified by n is xxxxMBSZE2, which means that the size of partition 2 is 800MB

The size of the purpose partition specified by n-mmP is a percentage of the mm of the entire hard disk.

Other parameters

-fxo Force replication to continue when a bad block appears in the source object

-fx does not display "pressctrl-alt-deltoreboot" directly under DOS when the ghost completes the work of the new system


-ia fully performs sector-to-sector replication. W hen a partition is copied from one image file or from another hard disk, Ghost checks the source partition before deciding whether to copy the file and directory structure or to copy the image (sector-to-sector). P resets are in this form. H owever, there may be times when a specific location on the hard disk may contain hidden files related to system security. Only sector-to-sector replication can be replicated correctly

-pwdand-pwd=x encrypts the image file


-Rb lets the system restart after the restore or replication is complete


-Sure can be used with clone. G host won't show "proceedwithdiskclone-destinationdrivewillbeoverwritten?" T ips


Fully understand the above parameters from today we do not have to deal with the GHOST interface.