About command-line switches

Article:HOWTO63376  |  Created: 2011-12-15  |  Updated: 2011-12-15  |  Article URL http://www.symantec.com/docs/HOWTO63376
Article Type
How To

Subject


About command-line switches

The command-line switches are used during deployment of an image with Ghost and RapiDeploy imaging tools. In most cases, these switches apply to all versions of the Ghost executable. Any exceptions are noted in the switch description.

Table: Ghost command line switches

Command-line switch

Description

-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:

  1. CHS: Aligns to a track or cylinder boundary

  2. 1MB: Aligns with a boundary of 1 MB

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.

-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.

-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.

-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.

-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.

-fro

Forces Symantec Ghost to continue cloning even if the source contains bad clusters

-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.

-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

-limitswap

Limits the Linux swap space to 2GB.

-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.

-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.

-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

-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.

-ntexact

Attempts to arrange the restored NTFS volume in the same way as the source volume.

-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.

-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. Use of a password does not securely encrypt the contents of the image. 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.

-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: • GhostCast • Peer-to-peer • Creating an image on a mapped-network drive If the operation runs locally on a FAT partition, then the image splits at 4 GB.

-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 is supported.

-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.

-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.

-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.

-z

Runs compression when saving a disk or partition to an image file. The greater the compression, the slower the transmission, as follows: • -z or -z1: Low compression (fast transmission) • -z2: High compression (medium transmission) • -z3 through -z9: Higher compression (slower transmission)

Table: Command line switches with or without -cns

With-CNS

Without -CNS

Filename .gho

Filename .gho.

Filename .001

Filen001.ghs

Filename .002

Filen002.ghs

Table: RapiDeploy Command-line Switches

Command Line Switch

Description

-?

Shows command-line help.

-bsl:[maximum bandwidth]

Determines the maximum bandwidth to be used by the multicasting session. Example To limit the bandwidth to 5 Megabits per second, type rdeploy -bsl:5

-c[compression mode]

Sets the compression mode for image creation. Default balanced Modes • off (turn compression off) • size (make smallest image size with slight speed penalty) • speed (make a less compressed image in less time) • balanced (make a reasonable compressed image with a reduced speed penalty). Example To optimize image creation for speed, type rdeploy -mu -f[filename] -cspeed

-cfgfile:[filename]

Sets the configuration filename (default is lastrun.cfg). The configuration file provides information for post configuration. The default configuration file is lastrun.cfg that can be edited in a text editor with the specific information needed for the computer. This command is useful if you want to run imaging in a batch file using configuration information saved previously by the RapiDeploy program. (If you select the option to save settings in the RapiDeploy program, a configuration file will be created with the name lastrun.cfg.) You can rename lastrun.cfg and specify it in your batch file to apply configuration settings. Example If you have run RapiDeploy and have chosen the option to save configuration settings, you could rename lastrun.cfg to laptop1.cfg and use it in a batch file by typing the following: rdeploy -md -f[filename] -cfgfile:laptop1.cfg You can also put configuration files in a shared directory and load them from the network. See also -m[mode], -f[path & file name]

-checkdisk

Marks the partitions dirty so that checkdisk will run after the image is restored (works on all file systems). Note Post configuration will fail when this switch is used. Example rdeploy -mu -f[filename] -checkdisk See also -m[mode], -f[path & file name]

-d[hard disk number]

Specifies which hard disk to read from or write to, depending on whether you are uploading or downloading. This switch is used for computers that have more than one hard disk. Default Disk 1 Examples To download an image to disk 2, combine with the -md switch and type rdeploy -d2 -md -f[filename] To create an image from disk 2, combine with the -mu switch and type rdeploy -d2 -mu -f[filename] See also -m[mode], -f[path & file name]

-f[path & file name]

Used with the -m switch. In upload mode, it specifies the filename and location for storing an image file. In download mode it specifies which image file to restore. To create (upload) a regular image file, use an .img extension. To create a self-extracting executable image file, use an .exe extension Examples To upload an image file to disk g:, type rdeploy -mu -fg:\images\win98.img To upload a self-extracting executable image file, type rdeploy -mu -fg:\images\win98.exe See also -m[mode], -f[path & file name]

-forcebw

Forces the BootWorks partition to be restored. Use this switch when using PXE or to overwrite an existing BootWorks partition on the hard disk with the BootWorks partition in the image. Example To restore an image and have the BootWorks partition in the image replace an existing BootWorks partition on the hard disk, type rdeploy -md -f[filename] -forcebw See also -m[mode], -f[path & file name]

-forcegui

Forces the wizard to appear even if it doesn't have to. Use this switch to force the wizard to appear so that you can view or edit settings for each computer. Example To restore an image but first view or make changes in the settings, type rdeploy -md -f[filename] -forcegui See also -m[mode], -f[path & file name]

-forceoem

Forces the OEM partition to be restored. Use this switch to overwrite an OEM partition on the hard disk with an OEM partition in the image. Example To restore an image and have the OEM partition in the image replace an existing OEM partition on the hard disk, type rdeploy -md -f[filename] -forceoem See also -m[mode], -f[path & file name]

-frm:[name]

Specifies a FIRM file that contains a list of FIRM commands to be executed after a restore. A FIRM file is a text file containing FIRM commands to execute. Example After a computer has received an image, you can copy a file that is not in the image to the computer. For example, you may want to copy a .cfg file that a computer needs but is not in an image. rdeploy -md -f[filename] -frm:firm.txt In this example, you would have two files: • The FIRM file that includes the FIRM command to perform the copy, firm.txt • The file that you want copied to a computer, sample.cfg Both of these files must be in the RapiDeploy/FIRM application folder. The FIRM file, firm.txt, could have the following FIRM command: copy sample.cfg c:\sample.cfg In this example, after the image has been received, sample.cfg is copied from the RapiDeploy application folder on the server to the computer in the specified folder.

-h

Shows command-line help.

-i:[20..25]

Sets screen resolution. For information on setting VESA modes, see -ve:[31.34] Example To set screen resolution to VGA mode 23 (640x480x16), type rdeploy -i:23

-i[IDnumber]

Sets session ID when sending an image file to more than one computer. Use this switch with multicast sessions so the Master PC can identify Client PCs in the same session. Example To send an image to 10 Client PCs, type rdeploy -mdb -f[filename] -s9 -i5000001 Note -i500001 is given as an example. This value is an example of what the Deployment Server console would send for a session ID. See also -m[mode], -s[number of Client PCs], -f[path & file name]

-ip:[n.n.n.n:p]

Sets the multicast IP address and port. This can be used for two purposes: 1) To allow multicasting through a router that is set up to use a different multicast IP address, and 2) to separate multiple multicasting sessions more efficiently. If you are manually running multiple multicast sessions, you can specify a different multicast IP address for each session to allow the NIC itself to filter out unwanted packets from other sessions. This speeds up all sessions involved. Important Remember to put the port number at the end of the IP address after a colon. Example rdeploy -mdb -f[filename] -s9 -ip:224.2.0.3:401 See also -m[mode], -s[number of Client PCs], -f[path & file name]

-kap

Prevents rdeploy.exe from overwriting any existing partitions on the hard disk.

-kp[1-31]

(Download only) Prevents rdeploy.exe from overwriting a specified partition. n=partition 1 - 31 Example To keep partition 2 from being overwritten during imaging, type rdeploy -md -f[filename] -kp2 See also -m[mode], -f[path & file name]

-m[mode]

Sets the operating mode. Modes • u (Upload image) • d (Download image) • b (Multicast only) • ub (Upload and multicast image) • db (Download and multicast image) • client (Client mode) Examples To upload an image, type rdeploy -mu -f[filename] To designate a computer as a Client PC, type rdeploy -mclient See also -f[path & file name], -i[IDnumber]

-makeimx

Minimizes the number of disk swaps that occur when restoring a hard disk image that has been split across multiple CDs or other storage media. This switch causes RapiDeploy to create an .imx (IMage IndeX) file which contains data that may reside on other CDs. If RapiDeploy has access to the .imx file, it will not prompt you to insert any CD more than once. Use the -makeimx switch when you create an image. However, no switches are needed when restoring the image. Once the split image file has been created and you are ready to burn the image to CDs, put the .imx file on the CD with the first .img split image file. Subsequent split image files do not require the .imx file to be placed on the CD.

-mconv

Used with the -f switch to convert an existing image file (.img) to a self-extracting .exe file. (Does not upload or download; just converts the file.) Example To convert a file named WIN98.IMG, type rdeploy -mconv -fwin98.img See also -f[path & file name]

-mig:[filename]

Used to specify a migration file. Prompts before overwriting the drive. This is used mainly by PC Transplant Pro.

-nobw

Makes sure that a BootWorks partition does not exist in the destination, is not on the disk when restoring, and is not in the image when creating. Example To remove an existing BootWorks partition from a hard disk and exclude the BootWorks partition from being downloaded with an image, type rdeploy -md -f[filename] -nobw See also -m[mode], -f[path & file name]

-nocancel

Doesn't allow the user to cancel the imaging task.

-nooem

Makes sure that an OEM partition does not exist in the destination, is not on the disk when restoring, and is not in the image when creating. Example To remove an existing OEM partition from a hard disk and exclude the OEM partition in an images from being restored, type rdeploy -md -f[filename] -nooem See also -m[mode], -f[path & file name]

-noprompt

Prevents any need for user interaction, for example, clicking OK after an error occurs. This is very useful in scripting situations where there won't be a user present to hit a key.

-nt64k (Download only)

(NT computers only) Enables a 64K cluster size with a FAT16 partition. This allows you to resize a FAT16 partition up to 4 GB rather than the normal 2 GB limit. Example To change the size, type rdeploy -md -f[filename] -nt64k See also -m[mode], -f[path & file name]

-p[partition]

Specifies which partition to process. Parameters • n Number (1-31) uploads the partition (each partition must be designated separately) • b images the BootWorks partition (works for both hidden and embedded types) • oem images the oem partition Examples To upload an image of partition 2, type rdeploy -mu -p2 -f[filename] To upload multiple partitions, type rdeploy -mu -p2 -p3 -p4 -f[filename] To upload the BootWorks partition, type rdeploy -mu -pb -f[filename] To upload the oem partition, type rdeploy -mu -poem -f[filename] See also -m[mode], -f[path & file name]

-password:[pwd]

Specifies the image password. Passwords are case sensitive. Example To create a password-protected image file, type rdeploy -mu -f[filename] -password:Altiris To restore that file, type rdeploy -md -f[filename] -password:Altiris See also -m[mode], -f[path & file name]

-raw

Treats all partitions as raw. The Master PC reads and images a partition by sectors rather than by files. This switch makes the image drive geometry dependent (must have the same heads, cylinders, and tracks as the image source). Used mostly by Altiris Technical Support for troubleshooting, or it could be used to make sure that any extra data residing outside of the file system is included in the image.

-restoresig

Causes RapiDeploy to restore the unique disk signature in the MBR of the hard disk from which the image was created. Normally, RapiDeploy does not transfer the disk signature to the target computer when deploying an image. This switch can be used when restoring an image to the same or similar systems. The -szf switch may be needed in combination with the -restoresig switch. Example One This -restoresig switch has been added to the Distribute Disk Image job in the XP Embedded folder in the Samples folder to protect the Write Filter Partition. It is required for all Restore Image jobs for XPe Thin Clients. Example Two The -restoresig switch is needed when restoring an image to a Citrix Metaframe Server to preserve the alternate drive mappings. In this situation the -szf switch is also required. Note This switch will function only if no production partitions are being preserved on the hard drive when deploying the disk image.

-s[number of Client PCs]

Specifies the number of Client PCs included in a multicast session. When the Master PC detects the specified number of Client PCs, it automatically starts the multicast session. The number specified does not count the Master PC. Example To set the number of Client PCs that will be connecting to the Master PC in a multicast session to 9 computers, type rdeploy -mdb -f[filename] -s9 See also -m[mode], -f[path & file name]

-span

Prompts between each piece of an image file (if set when using the -split command), allowing you to insert new media. Example To prompt between each file in the image set, type rdeploy -mu -f[filename] -split:500 -span See also -m[mode], -f[path & file name]

-split:[n]

Breaks an image into multiple files of a specified size during an upload (in megabytes). Example To set the file size to 500 MB, type rdeploy -mu -f[filename] -split:500 See also -m[mode], -f[path & file name]

-szf

Use this switch to set fixed sizing for all partitions. By using this switch, RapiDeploy will use the original sizes that existed on the computer from which the image was created. Example If the original size of the partition to be downloaded was 250 MB and you want the destination partition to remain 250 MB, use the -szf switch. If the target disk has 500 MB of free space, you'll have a 250 MB fixed partition and 250 MB of free space.

-sz[parameter]

Resizes partitions during imaging. Syntax rdeploy -sz[#]:[x{m|p}] where # is the partition number and x is the size based on the number of megabytes or a percentage. Parameters • [x]m (Resize partitions in megabytes) • [x]p (Resize partitions as a percentage of hard disk size for primary partitions or the percentage of the extended partition for logical drives) Examples If the size of partition 2 being downloaded is 300 MB and you want it to fit in half of the 500 MB of disk space on the client disk, type rdeploy -sz2:50p -md -f[filename] This resizes the 300 MB partition to 250 MB, leaving the other 250 MB unused. You can set the target size for multiple partitions on the same command-line by including multiple instances of the switch: rdeploy -sz1:200m -sz2:50p -md -f[filename] See also -m[mode], -f[path & file name]

-text

Run in text mode instead of GUI mode. To use this switch, all settings must be specified at the command-line. Examples rdeploy -md -f[filename] -text or rdeploy -mu -f[filename] -text If you want to save a list of command-line parameters to a text file, you can use the -text parameter rdeploy -? -text > rdparams.txt See also -m[mode], -f[path & file name]

-threshold:[n]

This option applies only to the "Restore and Send" (-mdb) mode. We have found that when using a small number of clients, it is faster to perform individual downloads on each client than it is to multicast to all of them. There is a point where it becomes more efficient to multicast than it is to perform individual downloads. This "threshold" is where it becomes faster to multicast than to do individual downloads and can be specified by the -threshold:[n] command line parameter. Depending upon the network environment, this number may vary. You should perform a few tests to pick a good threshold value for your network. It may be a small number, like four, or it could be much larger, like 15. Once you have found this threshold value, you can specify this number on the command line and then RapiDeploy will, depending on the number of clients that connect, have them do individual downloads or have them multicast. The number [n] specifies the minimum number of clients that will need to connect to the master in order for it to multicast. For example, if you specify -threshold=5, and four or fewer clients connect to the master PC, it will have them all do individual downloads of the image. If five or more clients connect to that master, it will multicast to them. This becomes more important when multicasting across subnets with a router that does not support multicasting. If you start one master and nine clients (10 PCs total), three of which are on one side of the router and seven of which are on the other side, RapiDeploy will detect that there are only three on one side of the router and do individual downloads to them. It will also detect that seven are on the other side and multicast to them. RapiDeploy does all of this automatically. All you must supply is the threshold value to let RapiDeploy determine when it should multicast or not. Example Suppose you have determined that the threshold value for your network is five. In other words, you have found that multicasting from one master to five or more clients is faster than doing individual downloads to those clients and the master. You could then specify the following threshold value on the command line: rdeploy -mdb -f[filename] -s9 -threshold:5 See also -m[mode], -f[path & file name], -s[number of Client PCs]

-ve:[31.34]

Set VESA screen resolution. Example To set screen resolution to VESA mode 31 (640x480x256), type rdeploy -ve:31

-w[n]

When multicasting, specifies the maximum number of minutes to wait for Client PCs to connect. If all Client PCs connect, it will start right away. Default: 5 minutes (or until the specified number of Client PCs is connected). Example To set the timeout to wait for PC Clients to 10 minutes, type rdeploy -w10 -mdb -f[filename] -s9 See also -m[mode], -s[number of Client PCs]

-x

Causes the image to be saved as a self-extracting file. This setting will automatically be set if the image file name specified by the -f parameter ends with .EXE.

See Setting up Deployment Solution


Legacy ID



v51169377_v61911175


Article URL http://www.symantec.com/docs/HOWTO63376


Terms of use for this information are found in Legal Notices