★ [GSS - Ghost] 고스트 스위치 정리 - 한글 [Symantec Ghost 8.0 Reference Guide]
★ [GSS - Ghost] 고스트 스위치 정리 - 영문 [Symantec Ghost 11.5 Implementation Guide]
★ [GSS - Ghost] 고스트 스위치 정리 - 영문 [Symantec Ghost 11.5 Implementation Guide]
* 이 글은 고스트 솔루션 슈트 2.5 에 포함된 가이드인 Symantec Ghost Implementation Guide 중 고스트와 그 스위치에 관련된 부분만을 따로 발췌하여 정리한 것입니다. 사실 이 글 하나로 고스트에 대한 정리는 모두 끝났다고 해도 과연이 아닐 정도로 거의 대부분의 고스트에 관한 정보가 이 가이드 안에 모두 포함되어 있습니다. 일부 오타가 확실한 정보는 수정하였습니다.
* 영문으로 보기 힘드신 분들은 좀 지난 버전이지만 8.0 의 한글 메뉴얼을 참고하세요. [괜히 정리한 거 썩히는 것도 왠지 억울하고;;;]
* 영문으로 보기 힘드신 분들은 좀 지난 버전이지만 8.0 의 한글 메뉴얼을 참고하세요. [괜히 정리한 거 썩히는 것도 왠지 억울하고;;;]
About Symantec Ghost switches
Symantec Ghost can be run in the following ways:- Interactively with no command-line switches
- Interactively with selected switches
- Automated in batch files (batch mode)
The Symantec Ghost command-line switches are used to alter Symantec Ghost behavior and automate procedures.
A hyphen (-) or a slash (/) must precede all switches except @filename. Switches are not case sensitive.
If you are adding switches from the Advanced Options dialog box, some of the switches, for example the -clone switch, are not applicable to your task. Because you are already performing a backup, restore, or clone operation, the -clone switch is redundant.
Listing command-line switches
The Ghost switches can be listed in the command-line.To list Symantec Ghost command-line switches
- In the Ghost directory, type one of the following:
- ghost.exe -h
- ghost.exe -?
Command-line switches
This section describes the command-line switches that you can use with Ghost. In most cases, these switches apply to all versions of the Ghost executable. Any exceptions are noted in the switch description.
※ 스위치에 링크가 있는 경우 클릭하시면 관련 글로 이동합니다.
@filename | @filename specifies a file that contains additional command-line switches that Symantec Ghost should read. Filename indicates the path and file name of the command-line switch file. The command-line switch file can include any Symantec Ghost command-line switch. The Symantec Ghost command-line switch file must be a text file with each switch on a separate line. This lets you exceed the DOS command-line limit of 150 characters. For example: ghost.exe @ghswitch.txt For this command-line switch, the Ghswitch.txt file reads: -clone,mode=pcreate,src=1:2,dst=g:\part2.gho -fcr -sure |
||||||||||||||||||||||||
-ad=image file name -addDisk=image filename |
Mounts the specified vmdk, pqi, v2i, or iv2i image file ("add" the image as a disk). Once added, a vmdk disk can be used in all normal operations, and pqi, v2i, or iv2i disks are mounted as read-only. | ||||||||||||||||||||||||
-afile=filename | Replaces the default abort error log file name, Ghosterr.txt, with the directory and file given in filename. | ||||||||||||||||||||||||
-align=chs -align=1mb |
Lets you override the way in which the partitions are aligned when an individual partition or disk full of partitions is restored. This switch aligns the partition to the boundary as follows:
By default, a partition is aligned on the destination computer as it was on the source computer. Note: The 1MB alignment option supports Windows Vista. |
||||||||||||||||||||||||
-auto | Automatically names spanned image files during creation. Using this switch avoids the user prompt that asks for confirmation of the next destination location for the remainder of the image file that is being restored. This switch is the default behavior for Symantec Ghost. |
||||||||||||||||||||||||
-batch | Batch mode switch. Prevents abort messages from waiting for user acknowledgment and removes user interaction prompts. The return value of Ghost.exe must be checked to identify whether the operation was successful. Symantec Ghost returns 0 on success and 1 or higher on failure or error. See “Batch file example” on page 547. |
||||||||||||||||||||||||
-bfc | Handles bad FAT clusters when writing to disk. If this switch is set and the target partition is FAT, Symantec Ghost checks for and works around bad sectors, and all free sectors are verified. This option may slow Symantec Ghost operation substantially. |
||||||||||||||||||||||||
-blind | Prevents any GUI display. The blind switch must be used with switches that do not require any user input, for example, the clone switch. Using this switch lets you execute Ghost operations on a computer with no video adapter. | ||||||||||||||||||||||||
-bootcd | When writing an image directly to a CD/DVD writer, makes the CD/DVD bootable. You need a bootable floppy disk in drive A. If you use the -sure switch with -bootcd and a floppy disk is not in drive A, then a non-bootable CD/DVD is created. | ||||||||||||||||||||||||
-buffersize=x | Ghost creates an image file using a buffer of size x where x = number of KB. The default size of the buffer is automatically calculated by Symantec Ghost. The buffersize switch lets you override this size. You can set the buffer size value from 1 to 32. | ||||||||||||||||||||||||
-chkimg,filename | Checks the integrity of the image file indicated by filename. | ||||||||||||||||||||||||
-clone | Ghost.exe operation switch. This switch allows automation of Ghost.exe operations and has a series of arguments that define the operation parameters. See “Using the clone switch” on page 539. |
||||||||||||||||||||||||
-cns | Reverts the naming of spanned files to the system used by versions of Symantec Ghost prior to Symantec Ghost 6.5. If this switch is not used, then the naming of spanned files conforms to Microsoft application guidelines. You do not need to use this switch when reading an existing file. Use this switch when the first five characters in a file name must be unique. Note: Symantec Ghost supports long file names. Table A-1 lists some examples of how spanned files are named.
|
||||||||||||||||||||||||
-CRC32 | The -CRC32 switch lists the files on a disk or partition or creates an image file with CRC values and then verifies the list against the original or a copy. The purpose is to allow both quick listing of the contents of an image file and verification that a disk created by Symantec Ghost contains the same files as the original. See “Using the -CRC32 switch” on page 548. |
||||||||||||||||||||||||
-crcignore | Ignores CRC errors. CRC errors indicate data corruption. This switch overrides CRC error detection and may allow a corrupted image file to be used. Using this switch leaves the corrupted files in an unknown state. You can use this switch to help you extract files from a corrupted image file. | ||||||||||||||||||||||||
-cvtarea | Creates a file, Cvtarea.tmp, that is the location of the MFT when the FAT32 partition is converted to NTFS. This switch operates in a similar manner to the cvtarea program that Microsoft provides in Deploy.cab on the Windows XP installation CD. For more information, see the Microsoft Web site: http://www.microsoft.com/whdc/system/winpreinst/ntfs-preinstall.mspx The file is created in the root directory of the partition during a partition or disk restore and is created as a contiguous space on the disk. The largest size allowed is 4 GB. If the file is larger than this, it is truncated to 4 GB. The syntax for this switch is as follows: -cvtarea,filename=xxx,size=yyy{%disk,%free,KB,MB,GB},firstcluster=zzz{%disk,%free,KB,MB,GB} The default settings are as follows:
|
||||||||||||||||||||||||
-dd | Dumps disk metrics information to the dump log file, Ghststat.txt. The file location can be altered using the -dfile=filename switch. | ||||||||||||||||||||||||
-dfile=filename | Changes the path and file name of the dump log file created using the -dd switch. | ||||||||||||||||||||||||
-disabledrive=drive | The specified drive is not available in the file requestor dialogs. You can use this switch with Ghost.exe only. | ||||||||||||||||||||||||
-dl=number | Specifies the number of hard disks present. Valid numbers are between 1 and 8. This may help when the BIOS does not report the number of drives correctly. | ||||||||||||||||||||||||
-dlist=drives | Specifies a list of drives to search for span files. If a span file cannot be found, then the drive letters in dlist are substituted one by one to look for the file on other drives. For example, the command ghost -dlist=CDEFG instructs Symantec Ghost to look for files on C, D, E, F, and G drives. The path remains the same. |
||||||||||||||||||||||||
-f32 | Lets Symantec Ghost convert all FAT16 volumes to FAT32 volumes when the destination partition to convert is larger than 256 MB in size. Ensure that the installed operating systems can access the volumes that will be converted to support FAT32. | ||||||||||||||||||||||||
-f64 | Lets Symantec Ghost resize FAT16 partitions to be larger than 2047 MB using 64 KB clusters. This is only supported by Windows 2000. Do not use on computers with other operating systems. | ||||||||||||||||||||||||
-fatlimit | Limits the size of FAT16 partitions to 2047 MB. | ||||||||||||||||||||||||
-fcr | Creates a CRC32 file, Ghost.crc, while creating an image file. See “Using the -CRC32 switch” on page 548. |
||||||||||||||||||||||||
-fdsp | Preserves the signature bytes on the destination disk when performing a disk-to-disk or image-to-disk cloning operation. | ||||||||||||||||||||||||
-fdsz | Clears the signature bytes on the destination disk. This is the default for disk-to-disk and image-to-disk operations. | ||||||||||||||||||||||||
-femax | When an extended partition is created in a disk-to-disk or image-to-disk operation, the femax switch ensures that the extended partition takes up all free space. | ||||||||||||||||||||||||
-fgpt | Forces the disk to restore to a GPT disk. | ||||||||||||||||||||||||
-ffatid | Forces the FAT partition id. This switch changes the partition id to the recommended partition id for the FAT partition within the destination image file or the destination partition table. This switch only takes effect if the source is a disk or partition, not an image file. For example, if you are cloning a partition of type 0xA0 (some unknown partition id), and Symantec Ghost sees it as a valid FATx (FAT12/FAT16/FAT32) partition, then the partition id is changed from 0xA0 to FATx. This was default Symantec Ghost behavior before Symantec Ghost 7.5. This switch allows for backward compatibility. |
||||||||||||||||||||||||
-ffi | Prefers the use of direct IDE access for IDE hard-disk operations. | ||||||||||||||||||||||||
-ffs | Prefers the use of direct ASPI/SCSI disk access for SCSI hard-disk operations. | ||||||||||||||||||||||||
-ffx | Prefers the use of Extended Interrupt 13h disk access for hard-disk operations. | ||||||||||||||||||||||||
-finger | Shows the fingerprint details written on a hard disk created by Symantec Ghost. The fingerprint details include the process used to create the disk or partition and the time, date, and disk on which the operation was performed. Reports the presence of a Ghost fingerprint with the following return code:
|
||||||||||||||||||||||||
-fis | Uses all available disk space when creating partitions. By default, Symantec Ghost often leaves a small amount of free space at the end of the disk. Because partitions must be aligned to cylinder boundaries, Symantec Ghost may leave up to 8 MB free even when -fis is specified. | ||||||||||||||||||||||||
-fmbr | Forces the disk to restore to a MBR-based disk. | ||||||||||||||||||||||||
-fmount | Force mounting of volumes even if they have not been cleanly unmounted. | ||||||||||||||||||||||||
-fni | Disables direct IDE access support for IDE hard-disk operations. | ||||||||||||||||||||||||
-fns | Disables direct ASPI/SCSI access support for SCSI hard-disk operations. | ||||||||||||||||||||||||
-fnx | Disables extended INT13 support for hard-disk operations. | ||||||||||||||||||||||||
-force1394 | Forces FireWire support to start, even when the FireWire controller is being run by something else. The -force1394 switch attempts to take over the FireWire Host Controller. To enable native BIOS support you must restart the computer. Note the following:
|
||||||||||||||||||||||||
-forceusb | Forces USB support to start, even when the USB controller is being run by something else. The -forceusb switch attempts to take over the USB Host Controller and then attempts to return it to the previous state once the Ghost operation is complete. This works for controllers as follows:
Note the following:
|
||||||||||||||||||||||||
-forcevolumesnapshot | Forces an attempt to use volume SNAPSHOT on volumes in preference to standard volume locking. | ||||||||||||||||||||||||
-fpr | Forces destination partitions to be resized proportionally to their original size. By default, Ghost evenly distributes free space to the destination partitions based on the amount of free space that is available in each source partition. The fpr switch determines the size of the destination partitions based on the size of the source partitions. | ||||||||||||||||||||||||
-fro | Forces Symantec Ghost to continue cloning even if the source contains bad clusters. | ||||||||||||||||||||||||
-ftxp | This switch prevents Ghost from updating the transactional NTFS (TxF) Resource Manager GUIDs. You can use this switch to keep the same identity in transactions for a single computer that you are restoring from an image. The ftxp switch maintains all existing transactions in progress instead of flushing them as part of the volume GUID change. | ||||||||||||||||||||||||
-fx | Causes Symantec Ghost to exit to DOS or Win PE after an operation is complete. By default, Symantec Ghost prompts the user to restart or exit when the operation has finished. If Symantec Ghost is run as part of a batch file, it is sometimes useful to exit back to the DOS prompt after completion so that further batch commands are processed. For more information, see the -rb switch. |
||||||||||||||||||||||||
-ghostoncd | Includes Ghost.exe on a CD/DVD when writing an image to a CD/DVD. | ||||||||||||||||||||||||
-h or -? or -help | Shows the Symantec Ghost command-line switch Help page. | ||||||||||||||||||||||||
-hasfingerprint | Reports the presence of a Ghost fingerprint with the following:
The display to the screen can be interpreted by any script language that is executing Ghost. However, it is easiest to use the return value. |
||||||||||||||||||||||||
-ia | The image all switch forces Symantec Ghost to perform a sector-by-sector copy of all partitions. By default, when copying a partition from a disk to an image file or to another disk, Symantec Ghost examines the source partition and decides whether to copy just the files and directory structure or to do a sector-by-sector copy. If it understands the internal format of the partition, it defaults to copying the files and directory structure. Generally, this is the best option. However, if a disk has been set up with special hidden security files that are in specific positions on the partition, the only way to reproduce them accurately on the target partition is through a sector-by-sector copy. If you use this switch to create an image of a dynamic disk, then the image must be restored to a disk with identical geometry. | ||||||||||||||||||||||||
-ial | Forces a sector-by-sector copy of Linux partitions. Other partitions are copied normally. | ||||||||||||||||||||||||
-ib | The image boot switch copies the entire boot track, including the boot sector, when creating a disk image file or copying disk-to-disk. Use this switch when installed applications, such as boot-time utilities, use the boot track to store information. By default, Symantec Ghost copies only the boot sector and does not copy the remainder of the boot track. You cannot perform partition-to-partition or partition-to-image functions with the -ib switch. | ||||||||||||||||||||||||
-id | The image disk switch is similar to -ia (image all), but also copies the boot track, as in -ib (image boot), extended partition tables, and unpartitioned space on the disk. When looking at an image with -id, you see the unpartitioned space and extended partitions in the list of partitions. The -id switch is primarily used by law enforcement agencies that require forensic images. When Symantec Ghost restores from an -id image, it relocates partitions to cylinder boundaries and adjusts partition tables accordingly. Head, sector, and cylinder information in partition tables is adjusted to match the geometry of the destination disk. Partitions are not resizeable. You will need an identical or larger disk than the original. Symantec Ghost does not wipe the destination disk when restoring from an -id image. Geometry differences between disks may leave tracks on the destination disk with their previous contents. Use the -ia (image all) switch instead of the -id switch when copying partition-to-partition or partition-to-image. An individual partition can be restored from an image created with -id. |
||||||||||||||||||||||||
-ignoreLVM | Disable parsing of Linux LVM volumes. | ||||||||||||||||||||||||
-imgdesc | Adds a single-line image file description to the image file with the following restrictions:
|
||||||||||||||||||||||||
-imgdescfile=filename | Specifies a text file that contains an image file description to be added to the image file with the following restrictions:
|
||||||||||||||||||||||||
-ir | The image raw switch copies the entire disk, ignoring the partition table. This is useful when a disk does not contain a partition table in the standard PC format, or you do not want partitions to be realigned to track boundaries on the destination disk. Some operating systems may not be able to access unaligned partitions. Partitions cannot be resized during restore and you need an identical or larger disk. | ||||||||||||||||||||||||
-ja=sessionnm | Connects to the GhostCast Server using the specified session name. Set the disk and possibly partition to be cloned on the GhostCast Server. | ||||||||||||||||||||||||
-jaddr=<ip_address> | Use the IP address for the GhostCast Server. | ||||||||||||||||||||||||
-jl:x=filename | Creates a log file to assist in diagnosing GhostCasting and TCP/IP peer-to-peer problems. The amount of information logged is set by the log level x. The log level x can be E (errors), S (statistics), W (warnings), I (information), or A (all) in increasing order of logging detail. The file name indicates the path and file name of the log to be created. In general, the error and statistic levels do not affect session performance. All other levels may reduce performance and should be used for diagnostic purposes only. | ||||||||||||||||||||||||
-jm=[u|d|m] | Use unicasting, direct broadcast, or multicasting. | ||||||||||||||||||||||||
-js=n | Sets to n the number of router hops Symantec Ghost is allowed to cross in an attempt to find the GhostCast Server. (Default is 16.) | ||||||||||||||||||||||||
-limitswap | Limits the Linux swap space to 2GB. | ||||||||||||||||||||||||
-lockinfo | Shows the type code and information stored in the BIOS or the Pentium III Processor ID. Table A-2 shows some examples of type codes and provides example values.
|
||||||||||||||||||||||||
-locktype=Type | Lets you lock an image file for use with a specific set of computers defined by the type chosen and the source computer. For example, ghost -locktype=P creates an image that can be used only on systems that have the same product name type as the source computer. On computers with multiple processors, the processorID bios lock option does not work as intended when running Ghost32.exe. In this situation, do not create or restore images with the -locktype parameter set to I. Other -locktype values work as intended. |
||||||||||||||||||||||||
-lpm | The LPT master mode switch causes Symantec Ghost to automatically go into LPT master mode and is the equivalent of selecting LPT Master from the main menu. | ||||||||||||||||||||||||
-lps | The LPT slave mode switch causes Symantec Ghost to automatically go into LPT slave mode and is the equivalent of selecting LPT Slave from the main menu. | ||||||||||||||||||||||||
-mcyl=[1022|1023] | Forces the cylinder value to either 1022 or 1023 when the cylinder value is insufficient to address the whole partition. This switch works in DOS only. When Ghost restores the partitions on an MBR disk, it initializes the starting sector, the sector count, and ending sector of the partition. Ghost stores the starting sector and ending sector in an MBR disk as a cylinder, head, and sector address. Ghost also stores an absolute start sector and count. The cylinder value has a maximum value of 1023. However, the cylinder maximum of 1023 is often insufficient to represent the size of the partition. When the cylinder maximum is insufficient, the cylinder is set to a predetermined value. Ghost sets the cylinder maximum to 1022 for FAT partitions and 1023 for other partitions. For some tools, the cylinder value must be set specifically for the tool to recognize that it is insufficient. |
||||||||||||||||||||||||
-nfwm | Turn off firewall manipulation. This switch applies to Vista and Linux only. |
||||||||||||||||||||||||
-noauto | Disables the automatic naming of spanned image files during creation. The user is prompted for confirmation of the next destination location for the remainder of the image file that is being restored. | ||||||||||||||||||||||||
-noautoskip | Includes the hibernation and skip files in the image file. These files are excluded by default. See “Hibernation and swap files” on page 321. |
||||||||||||||||||||||||
-nofile | Disables the Image File Selection dialog box. Useful when opening directories with large numbers of files and slow links. | ||||||||||||||||||||||||
-noide | Disables access to IDE devices. This is equivalent to -fni for IDE disks, but noide also affects ATAPI CD writers, tape drives, and other IDE devices. | ||||||||||||||||||||||||
-noindex | Prevents Symantec Ghost from creating an index when creating an image file. This slightly reduces the size of the image file and saves memory, but Ghost Explorer is much slower in reading the image file. This switch is useful if you are saving an image file from a large disk with very little memory. | ||||||||||||||||||||||||
-nolilo | Does not attempt to patch the LILO or GRUB boot loader after a clone. If you use the -nolilo switch, you can restart your computer from a floppy disk or CD after a clone and then run /sbin/lilo or the GRUB install script as the root user to reinstall the boot loader. | ||||||||||||||||||||||||
-noOSdisk | Prevents Ghost from creating the virtual OS volumes disk. By default Ghost creates a virtual disk to represent each volume (drive letter or Linux device) available from the OS. This allows you to create and restore images of volumes that Ghost cannot otherwise enumerate on a hard disk, for example, virtual disk partitions mounted as drive letters. |
||||||||||||||||||||||||
-noOSlayout | Prevents Ghost from updating the OS after a restore. By default, Ghost passes information about the restore to Windows, which then makes updates. This switch disables that function and preserves the disk exactly as restored. |
||||||||||||||||||||||||
-noscsi | Disables access to SCSI devices using ASPI. This is equivalent to -fns for SCSI disks, but noscsi also affects SCSI CD writers, tape drives, and other SCSI devices. | ||||||||||||||||||||||||
-no1394 | Disables FireWire | ||||||||||||||||||||||||
-nousb | Disables USB support. | ||||||||||||||||||||||||
-novolumesnapshot | Prevents Ghost from creating a volume SNAPSHOT. | ||||||||||||||||||||||||
-ntc- | Disables NTFS contiguous run allocation. | ||||||||||||||||||||||||
-ntchkdsk | Sets the CHKDSK bit set on a copied NTFS volume. This causes Windows NT to check the integrity of the volume when it is started. | ||||||||||||||||||||||||
-ntd | Enables NTFS internal diagnostic checking. | ||||||||||||||||||||||||
-ntexact | Attempts to arrange the restored NTFS volume in the same way as the source volume. | ||||||||||||||||||||||||
-ntic | Ignores the NTFS volume CHKDSK bit. Symantec Ghost checks the CHKDSK bit on an NTFS volume before performing operations. When Symantec Ghost indicates that the CHDSK bit is set, you should run CHKDSK on the volume to ensure that the disk is in a sound state before cloning. | ||||||||||||||||||||||||
-ntiid | This switch forces Symantec Ghost to ignore the partition table system ids and instead to check the partition contents when detecting NTFS file systems. This switch is useful when the system id is not set to 0x07 for partitions containing NTFS file systems. The partitions would otherwise be inefficiently imaged sector-by-sector. This switch can be used when it is necessary to image a Windows NT4 FTDisk mirrored partition. Take care when using this switch. Do not use the -ntiid switch with volume sets and stripe sets. To clone mirrored partitions (also known as Windows NT software RAID partitions), do the following:
|
||||||||||||||||||||||||
-ntil | Ignores NTFS log file check (inconsistent volume). | ||||||||||||||||||||||||
-or | The override switch allows the override of internal space and integrity checks and lets you put a very big image into a small partition. The operation fails if it is unable to write to the limited partition size. This switch lets you override spanning, which fails if there is limited space. Avoid using this switch. | ||||||||||||||||||||||||
-pfile | Saves the File Preservation Metadata File that holds the location of preserved files to a specified location. By default, it is saved to the current directory. For example: ghost - pfile=c:\pathname Where pathname is the directory for the File Preservation Metadata File. |
||||||||||||||||||||||||
-pmbr | Specifies that the master boot record of the destination disk is to be preserved when performing a disk-to-disk or image-to-disk operation. | ||||||||||||||||||||||||
-prefghst | If Symantec Ghost has a choice, it attempts to use internal Ghost file system access as opposed to using the operating system for file system access. This switch is intended for use under instruction from Symantec Technical Support when troubleshooting. |
||||||||||||||||||||||||
-prefos | If Symantec Ghost has a choice, it attempts to use the operating system for file system access as opposed to using the internal Ghost file system access. This switch is intended for use under instruction from Symantec Technical Support when troubleshooting. |
||||||||||||||||||||||||
-preserve | Preserves the specified files. The task fails if the specified files do not exist. To preserve files or directories other than the image file, the syntax is as follows: -preserve=filepath[=newpath] [,filepath[=newpath]...] Each filepath can refer to an individual file or a directory. All files and subdirectories of a specified directory are preserved. If a file does not exist, then the restore fails. After a Clone step in a task, all preserved files are added back to the partition that is specified by the-preservedest=n switch. Ghost renames them to newpath where it is specified. You must use -preserve with -preservedest. If you are running Ghost from a CD, you must use the -pfile switch with the -preserve command. You also must specify a writeable location for the file-preservation metadata file. Otherwise, Ghost tries to write the file-preservation metadata file to the CD. Because the CD is read-only. the data cannot be written, and the process fails. |
||||||||||||||||||||||||
-preservedest=n | Where n is the number of the partition relative to the destination disk, not relative to the partitions being restored. Specifies the partition to which files specified with the preserve switch are restored. | ||||||||||||||||||||||||
-preservedimagedeleteafterclone | Deletes a preserved image file once the restore has completed successfully. This switch overrides the default, which is to retain the preserved image file. | ||||||||||||||||||||||||
-preserveifexists | Preserves the specified files if they exist. The task does not fail if the specified files do not exist. To preserve files or directories other than the image file, the syntax is as follows: -preserveifexists=filepath[=newpath] [,filepath[=newpath]...] Each filepath can refer to an individual file or a directory. All files and subdirectories of a specified directory are preserved. If a file does not exist, then the restore fails. After a Clone step in a task, all preserved files are added back to the destination specified by the -preservedest=n switch, renaming them to newpath where specified. You must use the -preserveifexists switch with -preservedest. |
||||||||||||||||||||||||
-pwd and -pwd=x | Specifies that password protection be used when creating an image file. x indicates the password for the image file. If no password is given in the switch, Symantec Ghost prompts for one. You can enter a maximum of 10 alphanumeric characters. |
||||||||||||||||||||||||
-quiet | The quiet mode switch disables status updates and user intervention. | ||||||||||||||||||||||||
-rb | Restarts after finishing a restore or copy. After completing a restore or copy operation, the target computer must be restarted so that the operating system can restore the new disk/partition information. Normally, Symantec Ghost prompts the user to restart or exit. The -rb switch tells Symantec Ghost to restart automatically after it completes the restore or copy. This is useful when automating Symantec Ghost in a batch command file. For more information, see the -fx switch. |
||||||||||||||||||||||||
-recover | Sets the default to recover preserved files if a previous restore has failed and the File Preservation Metadata File still exists. If this switch is not used, the default is set to abort. | ||||||||||||||||||||||||
-script | Allows you to specify a series of commands (one per line) that Symantec Ghost will execute in sequential order. For example: ghost -script=script.txt Following is an example of script.txt: -clone,mode=create,src=2,dst=1:1\drv2.gho -chkimg,1:1\drv2.gho -clone,mode=create,src=2,dst=c:\part2.gho -chkimg,c:\part2.gho In this example 1:1 is equivalent to c:\. |
||||||||||||||||||||||||
-skip=x | The skip file switch causes Symantec Ghost to exclude the indicated files during a create or restore operation. A skip entry can specify a single file, a directory, or multiple files using the * wildcard. File names must be given in short file name format and all path names are absolute. Only FAT system files can be skipped. It is not possible to skip files on NTFS or other file systems. The skip switch may only be included in the command line once. To specify multiple skip entries, they must be included in a text file indicated using -skip=@skipfile. The format of the skip text file, skipfile, matches the format used with the CRC32 vexcept option. For example, as follows:
When using the skip switch with a wildcard extension, only those files with an extension are skipped. For example: -skip=asdf.* skips asdf.txt but does not skip asdf. |
||||||||||||||||||||||||
-span | Enables spanning of image files across volumes. Do not use this switch if you are running Ghost.exe to write an image file directly to a CD-R/RW. Ghost.exe automatically spans CD-R/RW disks if required. |
||||||||||||||||||||||||
-split=x | Splits image file into x MB spans. Use this switch to create a forced-size volume set. For example, if you want to force smaller image files from a 1024-MB drive, you could specify 200-MB segments. For example: ghost.exe -split=200 This divides the image into 200-MB segments. If this switch is not used then an image is split at 2 GB in the following operations:
If the operation runs locally on a FAT partition, then the image splits at 4 GB. If this switch is explicitly set to 0, the image does not split. |
||||||||||||||||||||||||
-sure | Use the -sure switch in conjunction with -clone to avoid being prompted with the final question “Proceed with disk clone - destination drive will be overwritten?” This command is useful in batch mode. | ||||||||||||||||||||||||
-sze | Sets the size for the destination partitions for either a disk restore or disk copy operation. When numbering partitions in the -sze switch, do not include the hidden Ghost partition. This switch is intended to be used in the Additional command line in the Console. All functionality of -sze switches are supported. See “Setting a destination size for the clone switch” on page 544. |
||||||||||||||||||||||||
-szee | Forces Symantec Ghost to keep the sizes of all destination partitions the same size as in the source partition (no resizing). This switch can be used with or without the -clone switch. See “Setting a destination size for the clone switch” on page 544. |
||||||||||||||||||||||||
-szef | Forces Symantec Ghost to keep the sizes of all destination partitions, except for the first one, the same size as in the source partition. The first partition uses the remaining disk space. This switch can be used with or without the -clone switch. See “Setting a destination size for the clone switch” on page 544. |
||||||||||||||||||||||||
-szel | Forces Symantec Ghost to keep the sizes of all destination partitions, except for the last one, the same size as in the source partition. The last partition uses the remaining disk space. This switch can be used with or without the -clone switch. See “Setting a destination size for the clone switch” on page 544. |
||||||||||||||||||||||||
-tapebuffered | Default tape mode. Sets the ASPI driver to report a read/write as successful as soon as the data has been transferred to memory. Useful when using older or unreliable tape devices or sequential media. | ||||||||||||||||||||||||
-tapeeject | Forces Symantec Ghost to eject the tape following a tape operation. If the tape drive does not support remote ejection, you must eject and insert the tape manually before further use. Earlier versions ejected the tape by default. By default, Symantec Ghost does not eject the tape. It rewinds the tape before exiting to DOS. | ||||||||||||||||||||||||
-tapebsize=x | Specifies the tape block size in units of 512 bytes, where x is a number between 1 and 128. | ||||||||||||||||||||||||
-tapespeed=x | Allows control of tape speed, where x is 0 to F. 0 is the default. 1 to F increases tape speed. Only use this when the tape does not work correctly at the speed used by Symantec Ghost. | ||||||||||||||||||||||||
-tapeunbuffered | Sets the ASPI driver to report a read/write as successful only when the data has been transferred to the tape drive. This can occur before the data is physically written to the medium. | ||||||||||||||||||||||||
-tcpm[:slave IP address] | The TCP/IP master mode switch causes Symantec Ghost to go into TCP/IP master mode automatically and is the equivalent of selecting TCP/IP Master from the main menu. The IP address of the slave computer may be specified. See “Peer-to-peer connections” on page 552. |
||||||||||||||||||||||||
-tcps | The TCP/IP slave mode switch causes Symantec Ghost to go into TCP/IP slave mode automatically and is the equivalent of selecting TCP/IP Slave from the main menu. See “Peer-to-peer connections” on page 552. |
||||||||||||||||||||||||
-unpreserveimage | After a failed restore, do not preserve the image file that was used on the failed restore. | ||||||||||||||||||||||||
-usbm | The USB master mode switch causes Symantec Ghost to go into USB master mode automatically and is the equivalent of selecting USB Master from the main menu. See “Peer-to-peer connections” on page 552. |
||||||||||||||||||||||||
-usbs | The -usbs switch causes Symantec Ghost to go into USB slave mode automatically and is the equivalent of selecting USB Slave from the main menu. See “Peer-to-peer connections” on page 552. |
||||||||||||||||||||||||
-vdw | If the -vdw switch is set, Symantec Ghost uses the disk's verify command to check every sector on the disk before it is written. This option may slow Symantec Ghost operation substantially. | ||||||||||||||||||||||||
-ver | Shows the version number of Symantec Ghost. | ||||||||||||||||||||||||
-vmdkType=val | When creating a virtual disk (the virtual disk is the destination of the clone), this switch specifies the type of vmdk disk to create. The valid values are:
|
||||||||||||||||||||||||
-vmdkSplit | When creating a virtual disk (the virtual disk is the destination of the clone), this switch specifies the vmdk should be split into 2GB maximum extent size. | ||||||||||||||||||||||||
-vmdkAdapter=val | When creating a virtual disk (the virtual disk is the destination of the clone), this switch specifies the type of disk adapter for the created vmdk. The valid values are:
Note: For SCSI adapters, choose busLogic for the Windows 2000 family or Windows XP. Choose lsiLogic for later operating systems. |
||||||||||||||||||||||||
-vmdkSize=val | When creating a virtual disk (the virtual disk is the destination of the clone), this switch specifies the size in MB of the of the created vmdk disk. | ||||||||||||||||||||||||
-z | Runs compression when saving a disk or partition to an image file. The greater the compression, the slower the transmission, as follows:
See “Image files and volume spanning” on page 316. |
Accessing files
Table A-3 lists the formats that you can use to access files.Format | Example |
---|---|
Drive letter | c:\My Images\image.gho |
Disk and partition This lets you specify an otherwise inaccessible file, for example, a file located on a file system not recognized by DOS, such as NTFS, or a file on a hidden partition. It provides an alternative to using drive letters. |
src=1:2\image.gho In this example, Image.gho resides on an NTFS file system on the second partition of the first disk. This format cannot be used with the -afile=filename switch. |
Using the clone switch
Some cloning switches for use in Ghost can be specified on the GhostCast Server.The syntax for the clone switch is:
-clone,MODE={operation},SRC={source},DST={destination},[SZE{size},SZE{size}.......]
Defining the type of clone command
MODE defines the type of clone command.The syntax is as follows:
MODE={copy | restore | create | pcopy | prestore | pcreate}
Table A-4 lists the mode commands.
Switch | Action |
---|---|
copy | Disk-to-disk copy |
restore Note: The load switch is replaced by the restore switch. The load switch is still fully functional and is interchangeable with restore. |
File-to-disk restore |
create Note: The dump switch is replaced by the create switch. The dump switch is still fully functional and is interchangeable with create. |
Disk-to-file backup |
pcopy | Partition-to-partition copy |
prestore Note: The pload switch is replaced by the prestore switch. The pload switch is still fully functional and is interchangeable with prestore. |
File-to-partition restore |
pcreate Note: The pdump switch is replaced by the pcreate switch. The pdump switch is still fully functional and is interchangeable with pcreate. |
Partition-to-file backup (allows multipartition Ghost backup selection) |
Cloning combination options
Table A-5 illustrates the possible cloning operations that you can perform.Mode | Source | Destination |
---|---|---|
copy |
|
|
restore |
|
|
create |
|
|
pcopy |
|
|
prestore |
|
|
pcreate |
|
|
Setting a source for the clone switch
The syntax for this switch is as follows:SRC={disk | file | multicast | tape | cd writer }
SRC defines the source for the operation that is selected by the clone mode option.
Table A-6 lists the source switches.
Switch | Source | Explanation |
---|---|---|
disk | drive number | Source disk drive number. Numbers start at 1. For example: SRC=1 A partition on a drive can also be specified. Numbers start at 1. For example: SRC=1:2 |
file | filename | The source image file name. For example: SRC= g:\source.gho A partition in an image file can also be specified. For example: SRC=g:\source.gho:2 Files can also be read from a CD-ROM drive. The following files types are supported: .gho, .vmdk, .pqi, .v2i, .iv2i. Note: .pqi, .v2i, and .iv2i are only available in Ghost32 with the v2idisklib.dll present. |
multicast | @mcsessionname | The name of the multicast session. |
tape | @MTx | The tape drive number. Numbers start at 0. For example: SRC=@MT0 A partition on a tape can also be specified. For example: SRC=@MT0:3 |
CD ROM | @CDx | The CD or DVD drive number. If you have a CD reader and a CD writer, in the Ghost.exe user interface you would see @CD1 and @CD2. The number is optional if you are specifying an operation from the command line. You can specify partitions for the image stored on a CD for a restore operation. For example: SRC=@CD1:2 |
Preservation file | @PF | An image file that was preserved during a restore that failed. For example: ghost -recover -clone,mode=[p] load, src=@pf,... |
Operating System Volumes | @OS | SRC=@OS will take an image containing all volumes that have been mounted by the operating system, enabling an image to contain volumes from multiple drives. For example: SRC=@OS:C:D clones the mounted volumes C:\ and D:\ |
Setting a destination for the clone switch
The syntax for this switch is as follows:DST={disk | file | multicast | tape | cdwriter}
DST defines the destination location for the operation.
Table A-7 lists the destination options for cloning.
Switch | Destination | Explanation |
---|---|---|
disk | drive number | The destination disk drive number, such as DST=2. A partition on a drive can also be specified. For example: DST=2:1 To create a new partition, type a destination partition one greater than the existing number of partitions, if there is enough free space. |
file | filename | The destination image file name. For example: DST= g:\destination.gho Note: The file type may be .gho or .vmdk. If the specified .vmdk file exists, Ghost treats it as a normal disk. If the vmdk file does not exist, Ghost will create it from scratch. There are additional -vmdk switches to control the creation of .vmdk files. |
multicast | @mcsessionname | The name of the multicast session. |
tape | @MTx | The tape drive number. Numbers start at 0. For example: DST=@MT0 |
cd/dvdwriter | @CDx | The CD or DVD writer drive number. Numbers start at 1. For example: DST=@CD1 If you have a CD reader and a CD writer, in the Ghost.exe user interface you would see @CD1 and @ CD2. The number is optional if specifying an operation from the command line. |
Operating System Volumes | @OS | DST=@OS:D restores a partition to the mounted volume D:\. |
Setting a destination size for the clone switch
The SZE switch sets the size of the destination partitions for either a disk restore or disk copy operation. This is optional. Multiple partition size switches are supported.The number of size switches depends on the number of partition sizes that you want to specify. There may be none.
You can use the sze switch in the Advanced command-line options in the Console.
SZE{E | F | L | n={xxxxM | mmP| F | V}}
Table A-8 lists the destination size switches.
Switch | Explanation |
---|---|
n=xxxxM | Indicates that the nth destination partition is to have a size of xxxxMB (for example, SZE2=800M indicates partition two is to have 800 MB). |
n=mmP | Indicates that the nth destination partition is to have a size of mm percent of the target disk. Due to partition size rounding and alignment issues, 100% physical use of disk space may not be possible. |
n=F | Indicates that the nth destination partition is to remain the same size on the destination as it was on the source. This is referred to as a fixed size. |
n=V | Indicates that the partition may be made bigger or smaller depending on how much disk space is available. This is the default. |
E | Indicates that the sizes of all partitions remain fixed. |
F | Indicates that the sizes of all partitions except the first remain fixed. The first partition uses the remaining space. |
L | Indicates that the sizes of all partitions except the last remain fixed. The last partition uses the remaining space. |
Examples of clone switch usage
Table A-9 describes clone switches and their functions.Switch | Function |
---|---|
ghost.exe -clone,mode=copy,src=1,dst=2 | Copies local disk one to local disk two. |
ghost.exe -lpm -clone,mode=create,src=2,dst=c:\drive2.gho | Connects a master computer using LPT to another computer running Ghost.exe in slave mode and saves a disk image of local disk two to the remote file c:\drive2.gho. The slave computer can be started with ghost.exe -lps. |
ghost.exe -clone,mode=pcopy,src=1:2,dst=2:1 -sure | Copies the second partition of local disk one to the first partition of local disk two without the final warning prompt. |
ghost.exe -clone,mode=restore,src=e:\savedsk.gho,dst=1 -sure | Restores the disk image file Savedsk.gho that is held on the server drive that is mapped locally to drive E onto local disk one. Performed without the final warning prompt. This example is typical of a command line included in a batch file to automate workstation installations from a network file server. |
ghost.exe -clone,mode=pcreate,src=1:2,dst=g:\part2.gho | Saves the second partition of disk one to an image file on mapped network drive G. |
ghost -clone,mode=prestore,src=g:\part2.gho:2,dst=1:2 | Restores partition two from a two-partition image file on mapped drive G onto the second partition of the local disk. |
ghost.exe -clone,mode=restore,src=g:\3prtdisk.gho,dst=2,sze1=60P,sze2=20P | Restores disk two from an image file and resizes the destination partitions into a 60:20:20 allocation, assuming that the image contains 3 partitions. |
ghost.exe -clone,mode=copy,src=1,dst=2,sze2=F | Clones a two-partition disk and keeps the second partition on the destination disk the same size as on the source disk and lets the first partition use the remaining space, leaving no unallocated space. |
ghost.exe -clone,mode=create,src=1,dst=2:3\image.gho | Saves disk one to the image file image.gho located on the third partition of the second disk. This works only if the third partition of the second disk is an NTFS file system. |
ghost.exe -clone,mode=prestore,src=2:3\image.gho:5,dst=4:2 | Restores the fifth partition of the image file image.gho, which is located on the third partition of the second disk, to the second partition on the fourth disk. This switch only works if the third partition on the second disk is NTFS. |
ghost.exe -clone,mode=restore,src=g:\3prtdisk.gho,dst=1,sze1=450M,sze2=1599M,sze3=2047M | Restores disk one from an image file and resizes the first partition to 450 MB, the second to 1599 MB, and the third to 2047 MB. |
ghost.exe -clone,mode=restore,src=g:\2prtdisk.gho,dst=1,szeL | Restores a disk from an image file and resizes the last partition to fill the remaining space. |
ghost.exe -clone,src=@MCsessionname,dst=1 -sure | Restores disk one from an image file being sent from the GhostCast Server with the session name “sessionname” without the final warning prompt. |
ghost.exe -clone,src=1,dst=@MCsessionname -sure | Creates an image file of disk one to an image file being created by the GhostCast Server with the session name “sessionname” without the final warning prompt. |
ghost.exe -clone,mode=create,src=2:2,dst=@MT0 | Creates an image file of the second partition on disk 2 onto the first tape drive. |
ghost.exe -clone,mode=pcreate,src=2:1:4:6,dst=d:\part146.gho | Creates an image file with only the selected partitions. This example selects partitions 1, 4, and 6 from disk 2. |
ghost.exe -clone, mode=restore,src=VirtualMachine.vmdk,dst=1 | |
ghost.exe -clone, mode=prestore,src=VirtualMachine.vmdk:1,dst=1:1 | |
ghost32.exe -clone, mode=create,src=@OS,dst=allvols.gho | Includes all mounted volumes in the image. |
ghost32.exe -clone, mode=pcreate,src=@OS:C:D,dst=2vols.gho | Includes the specified volumes in the image. |
Batch file example
This example restores disk one from an image file sent by the GhostCast Server using session name SN and resizes the first partition to 450 MB, the second to 1599 MB, and the third to 2047 MB. This is done in a batch file with no user intervention. The batch file commands change depending on the success or failure of the Symantec Ghost operation.Batch file contents:
@ECHO OFF
ghost.exe -clone,src=@mcSN,dst=1,sze1=450M,sze2=1599,sze3=2047M -batch
IF ERRORLEVEL 1 GOTO PROBLEM
ECHO Symantec Ghost exited with value 0 indicating success.
REM ** Add any commands required to run if Symantec Ghost
REM succeeds here**
GOTO FINISH
:PROBLEM
ECHO Symantec Ghost returned with an Error value 1 or higher
ECHO Symantec Ghost operation was not completed successfully
REM **Add any commands required to run if Symantec Ghost
REM fails here **
:FINISH
ECHO Batch File Finished
Using the -CRC32 switch
CRC checking works file-by-file with FAT partitions. NTFS partitions are CRC-checked within an image file by each MFT table. It is not possible at present to obtain a list of files failing a CRC check with an NTFS file system. When a CRC file is created for an NTFS partition, only a single CRC value is generated. You can also create a CRC file from an image file and verify it against a disk.The full syntax for this switch is as follows:
-CRC32,action={create|verify|pcreate|pverify|dcreate|dverify},src={{disk}|{partition}|{file}},crcfile={file}|{partition},vlist={file},vexcept={file}
Table A-10 describes the parameters that can be used with the -CRC32 switch.
Parameter | Explanation |
---|---|
create | Create an ASCII CRC32 file from a disk |
verify | Verify a disk from a CRC32 file |
pcreate | Create an ASCII CRC32 file from a partition |
pverify | Verify a partition from an ASCII CRC32 file |
dcreate | Create an ASCII CRC32 file from an image file |
dverify | Verify an image file from an ASCII CRC32 file |
crcfile | ASCII CRC32 file (default=Ghost.crc) |
vlist | Verification list file (default=Ghost.ls) |
vexcept | Verification exception file (no default) |
Examples of -CRC32 usage
Table A-11 provides some examples of how you can use the -CRC32 switch.Switch | Function |
---|---|
ghost.exe -fcr | Creates a CRC32 file (called Ghost.crc) while making an image file. |
ghost.exe -fcr=d:\test.crc | Creates a CRC32 file (called Test.crc) while making an image file. |
ghost.exe -crc32,action=create,src=1,crcfile=ghost.crc | Creates a list of files and CRC32 values for a disk. |
ghost.exe -crc32,action=dverify,src=x:dumpfile.gho,crcfile=ghost.crc | Verifies the list against an image file. |
ghost.exe -crc32,action=pverify,src=1:2,crcfile=filename.crc:2 | Verifies a partition on a disk with multiple partitions. This example verifies that partition 2 on disk 1 is the same as partition 2 in the CRC file. |
ghost.exe -crc32,action=create | Creates an ASCII CRC32 file from the primary hard drive. Note that the default disk is the primary drive. The default ASCII CRC32 file is Ghost.crc. |
ghost.exe -crc32,action=create,src=2,crcfile=myfile.txt | Creates an ASCII CRC32 file, Myfile.txt. This example uses disk 2 as the source drive and the output file. |
ghost.exe -crc32,action=verify | Verifies the contents of the primary disk against a default ASCII CRC32 file, Ghost.crc (in the current directory). The default disk is the primary drive. The default verification list file is Ghost.ls. Note: If you want to keep Ghost.crc then copy Ghost.crc to a new location to ensure that it is accessible after you restart the computer. |
ghost.exe -crc32,action=verify,src=1,crcfile=myfile.txt,vlist=myfile.out | Verifies the contents of the primary disk, 1, against the CRC32 file, Myfile.txt. Same as previous example, but specifies the disk, CRC file, and list file. This example uses disk 1 as the source drive, Myfile.txt as the ASCII CRC32 file, and Myfile.out as the verification list file. |
ghost.exe -crc32,action=verify,src=1,crcfile=myfile.txt,vlist=myfile.out,vexcept=myfile.exc | Verifies the contents of the primary disk against a CRC32 file. Same as above with the inclusion of the EXCEPTION argument that excludes compared files based upon its entries. |
Files not checked with CRC
The switch vexcept=filename specifies files that are not checked with CRC. This is normally used to exclude files that are always changed on start up. A sample exception file follows:[ghost exclusion list]
\PERSONAL\PHONE
[partition:1]
\WINDOWS\COOKIES\*.*
\WINDOWS\HISTORY\*
\WINDOWS\RECENT\*
\WINDOWS\USER.DAT
\WINDOWS\TEMPOR~1\CACHE1\*
\WINDOWS\TEMPOR~1\CACHE2\*
\WINDOWS\TEMPOR~1\CACHE3\*
\WINDOWS\TEMPOR~1\CACHE4\*
[partition:2]
*\*.1
[end of list]
The exclusion list is case-sensitive. All files should be specified in uppercase. The (*) wildcard symbol follows UNIX rules, and is more powerful than the MS-DOS (*) wildcard. In particular, it matches the (.) character, as well as any other character, but other characters can follow the *. Therefore, a wildcard of *br* matches any files containing the letters br, such as, Brxyz.txt, Abr.txt, and Abc.dbr.
The specification of \WINDOWS\COOKIES\*.* in the previous example means match all files in the \WINDOWS\COOKIES subdirectory that have extensions. To match all files with or without extensions, use WINDOWS\COOKIES\*.
Use short file names in exclusion files. Files specified before the first [Partition:x] heading are used to match files in any partition.
A directory of * matches any subdirectory, regardless of nesting. The previous exclusion file matches any file with an extension of .1 in any subdirectory on the second partition. Apart from this, use wildcards for files, not for directories.
About numbering the Virtual Partition
Ghost.exe does not see the Virtual Partition when it runs from the command line. The numbering of the partitions is consistent with the numbering that appears when you run the Ghost.exe user interface.If you use GDisk to view the disk, the Virtual Partition is displayed with the volume label VPSGHBOOT. Therefore, the partition numbering that you can see in GDisk is not the same as the partition numbering in Ghost.exe.
★ [GSS - Ghost] 고스트 스위치 정리 - 한글 [Symantec Ghost 8.0 Reference Guide]
★ [GSS - Ghost] 고스트 스위치 정리 - 영문 [Symantec Ghost 11.5 Implementation Guide]
★ [GSS - Ghost] 고스트 스위치 정리 - 영문 [Symantec Ghost 11.5 Implementation Guide]