These are the simple tips for Cloning with Linux and this tips helps you to configuration with Command-line switches.
This chapter includes the following topics:
■ Supported configurations
■ Position of disk
■ Boot configuration
■ Norton Ghost utility support
Norton Ghost can copy or clone many different Linux distributions successfully.
However, Norton Ghost is sensitive to any possible changes in Ext2/3 file system
and LILO specifications. If changes are made to these specifications, Norton
Ghost may no longer support the Linux distribution. Symantec attempts to
release new builds of Ghost promptly to address such changes.
Norton Ghost is not sensitive to kernel versions. Use the -ial and -nolilo
command-line switches to resolve problems with any incompatibilities.
What is Command- line switches
Using Norton Ghost with swtches
Norton 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 Norton Ghost command-line switches are used to alter Norton Ghost
behavior and automate procedures.
If you are adding switches from the Advanced Options dialog box, some of these
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.
To list Norton Ghost command-line switches
◆ In the Ghost directory, type one of the following:
■ ghost.exe -h
■ ghost.exe -?
A hyphen (-) or a slash (/) must precede all switches except @. Switches are not
case sensitive. They can be entered in upper, lower, or mixed case.
Specifies a file that contains additional command-line switches that Norton Ghost should
read. Filename indicates the path and file name of the command-line switch file. The
command-line switch file can include any Norton Ghost command-line switch, except for
-afile and -dfile. The Norton Ghost command-line switch file must be a text file with each
switch on a separate line. This feature lets you exceed the DOS command-line limit of 150
For example, for the following command line:
The file Ghswitch.txt would read:
-afile=filename Replaces the default abort error log file name, Ghosterr.txt, with the
directory and file given in filename.
-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 loaded. This switch is the default behavior for Norton 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. Norton Ghost returns 0
on success and 1 or higher on failure or error.
-bfc Handles bad FAT clusters when writing to disk. If this switch is set, and the target
partition is FAT, Norton Ghost checks for and works around bad sectors. This option may
slow Norton Ghost operation substantially.
-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 small buffer where x = number of KB. The size
of the buffer is automatically calculated by Norton 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 “Clone switch usage” on page 166.
-cns Reverts the naming of spanned files to the system used by versions of Norton 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. For example:
With -cns Without -cns
The -CRC32 switch lets you make a list of the files on a disk or partition or create an
image file with CRC values and then verify 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 Norton Ghost contains the same files as the original.
Ignores CRC errors. CRC errors indicate data corruption. This switch overrides the CRC
error detection and may let a corrupted image file 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.
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:
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:
firstcluster 1|3 GB|33%disk
■ 1/3 of the partition size if the partition size is less than 2 GB
■ 1 GB if the partition size is less than 6 GB
■ 3 GB if the partition size is equal to or greater than 6 GB
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.
This switch cannot be included in the @ Ghost switch text file
Command-line switches 157
-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 Norton Ghost to look for files
on C, D, E, F, and G drives. The path remains the same.
Lets Norton 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.
Lets Norton Ghost resize FAT16 partitions to be larger than 2047 MB using 64 K clusters.
This is only supported by Windows NT and Windows 2000. Do not use on computers
with other operating systems
Limits the size of FAT16 partitions to 2047 MB. Useful when Windows NT FAT16
partitions are present on the disk and 64 K clusters are not wanted
Creates a CRC32 file, Ghost.crc, while creating an image file.
See “-CRC32 switch usage” on page 172.
Preserves the signature bytes on the destination disk when performing a disk-to-disk or
image-to-disk cloning operation
Clears the signature bytes on the destination disk when performing a disk-to-disk or
image-to-disk cloning operation.
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.
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
For example, if you are cloning a partition of type 0xA0 (some unknown partition id), and
Norton Ghost sees it as a valid FATx (FAT12/FAT16/FAT32) partition, then the partition id
is changed from 0xA0 to FATx.
This was default Norton Ghost behavior before Symantec Ghost 7.5. This switch allows
for backward compatibility.
Prefers the use of direct IDE access for IDE hard disk operations. This switch does not
have any effect when running Norton Ghost in Windows 98.
Prefers the use of direct ASPI/SCSI disk access for SCSI hard disk operations.
Prefers the use of Extended Interrupt 13h disk access for hard disk operations.
Shows the fingerprint details written on a hard disk created by Norton 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.
Uses all available disk space when creating partitions. By default, Norton Ghost often
leaves a small amount of free space at the end of the disk. Because partitions must be
aligned to cylinder boundaries, Norton Ghost may leave up to 5 MB free even when -fis is
Disables direct IDE access support for IDE hard disk operations.
This switch has the same functionality as the -noide switch.
Disables direct ASPI/SCSI access support for SCSI hard disk operations.
This switch has the same functionality as the -noscsi switch.
Disables extended INT13 support for hard disk operations.
Forces Norton Ghost to continue cloning even if the source contains bad clusters.
Causes Norton Ghost to exit to DOS after operation completion. By default, Norton Ghost
prompts the user to restart or exit when the operation has finished. If Norton 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 can be processed.
Includes Ghost.exe on a CD/DVD when writing an image to a CD/DVD.
-h or -? or -help Shows the Norton Ghost command-line switch Help page.
-ia The image all switch forces Norton Ghost to perform a sector-by-sector copy of all
partitions. When copying a partition from a disk to an image file or to another disk,
Norton 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
Forces a sector-by-sector copy of Linux partitions. Other partitions are copied as normal.
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, Norton 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.
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 Norton 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.
Norton 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
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
Adds a single-line image file description to the image file. This has the following
■ Cannot include any new lines
■ Cannot be used with -imgdescfile
■ Must be used with the clone switch
■ Clone switch mode must be create, dump, prcreate, or pdump
Specifies a text file that contains an image file description to be added to the image file.
This has the following restrictions:
■ Cannot be used with -imgdesc
■ Must be used with the clone switch
■ Clone switch mode must be create, dump, prcreate, or pdump
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.
-jl:x=filename Creates a log file to assist in diagnosing problems with TCP/IP connections. 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.
Shows the type code and information stored in the BIOS or the Pentium III Processor ID.
160 Command-line switches
Type Based On Value
M Manufacturer Compaq
P Product name Deskpro EN Series SFF
V Version Award Software
S Serial number H925CKH60020
U UUID 2DA9379B4707D31185E8C800A4F232BC
C M&P combined Compaq Deskpro EN Series SFF
I PIII ID 0000067200028E72A6994A20
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.
The LPT master mode switch causes Norton Ghost to automatically go into LPT master
mode, and is the equivalent of selecting LPT Master from the main menu.
The LPT slave mode switch causes Norton Ghost to automatically go into LPT slave mode,
and is the equivalent of selecting LPT Slave from the main menu.
Activates internal memory usage checking for Technical Support.
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.
Includes the hibernation and skip files in the image file. These files are excluded by
default.See “Hibernation and swap files” on page 69.
Disables the Image File Selection dialog box. Useful when opening directories with large
numbers of files and slow links.
Disables access to IDE devices.
Prevents Norton 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.
Does not attempt to patch the LILO boot loader after a clone. If you use the -nolilo switch,
you need to start from a floppy disk after the clone and then run /sbin/lilo as the root user
to reinstall LILO.
Disables access to SCSI devices using ASPI.
Disables NTFS contiguous run allocation.
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.
Enables NTFS internal diagnostic checking.
Ignores the NTFS volume CHKDSK bit. Norton Ghost checks the CHKDSK bit on an
NTFS volume before performing operations. When Norton 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.
By default, Norton Ghost copies partitions participating in an Windows NT volume set,
stripe set, or mirror set using image all sector-by-sector copying. This switch forces Norton
Ghost to ignore the Windows NT volume set partition status and image the partition as if
it were an NTFS partition to let it be intelligently imaged on a file-by-file basis. 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)
1 With Windows NT disk administrator, break the mirror set.
2 Using the -ntiid switch, clone one of the mirror partitions.
3 Resize as desired. Partitions can only be resized by Norton Ghost during a disk
operation. When performing a partition operation, the target partition size must
already be established.
4 After cloning, recreate the mirror set using the Windows NT disk administrator. The
disk administrator creates the partitions in the mirror set.
Ignores NTFS log file check (inconsistent volume).
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.
Specifies that the master boot record of the destination disk is to be preserved when
performing a disk-to-disk or image-to-disk cloning operation.
-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, Norton
Ghost prompts for one. You can enter a maximum of 10 alphanumeric characters.
The quiet mode switch disables status updates and user intervention.
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, Norton Ghost prompts the user to restart or exit. -rb tells
Norton Ghost to restart automatically after it completes the restore or copy. This is useful
when automating Norton Ghost in a batch command file.
Allows you to specify a series of commands (one per line) that Norton Ghost will execute
in sequential order.
Following is an example of script.txt:
The skip file switch causes Norton 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.
Skips the file User.dll in the Windows directory.
Skips any file called Readme.txt in any directory.
Skips any file ending with .dll in the Ghost directory.
Skips the program files directory (note the short file name).
Skips files as outlined in Skipfile.txt. For example, if Skipfile.txt contains:
This would skip all *.tmt files on any partition, the Windows directory, all *.exe files
on the first partition, and any file that ends with me.txt on the second partition.
-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 CDR/
RW. Ghost.exe automatically spans CD-R/RW disks if required.
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.
This divides the image into 200 MB segments.
-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.
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.
Forces Norton Ghost to keep the sizes of all destination partitions the same as in the source
partition (no resizing).
Forces Norton Ghost to keep the sizes of all destination partitions, except for the first one,
the same as in the source partition. The first partition uses the remaining disk space.
This switch can be used with or without the -clone switch.
Forces Norton Ghost to keep the sizes of all destination partitions, except for the last one,
the same as in the source partition. The last partition uses the remaining disk space.
This switch can be used with or without the -clone switch.
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
Forces Norton 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, Norton Ghost does not eject the
tape. It rewinds the tape before exiting to DOS.
Sets the ASPI driver to report a read/write as successful only when the data has been
transferred to the physical medium. Useful when using older or unreliable tape devices or
Specifies the tape block size in units of 512 bytes, where x is 1 to 128.
Allows control of tape speed, where x is 0 to F. 0 is the default. 1 to F increase tape speed.
Only use this when the tape does not work correctly at the speed used by Norton Ghost.
Sets the ASPI driver to report a read/write as successful only when the data has been
transferred to the tape drive. (It is possible that this occurs before the data is physically
written to the medium.)
-tcpm[:slave IP address]
The TCP/IP master mode switch causes Norton 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.
The TCP/IP slave mode switch causes Norton 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 178.
The USB master mode switch causes Norton Ghost to go into USB master mode
automatically, and is the equivalent of selecting USB Master from the main menu. This
switch should precede the -clone switch. For example,
ghost.exe -usbm -clone,mode=dump,src=1,dst=1:1\image.gho
The USB slave mode switch causes Norton Ghost to go into USB slave mode automatically,
and is the equivalent of selecting USB Slave from the main menu. This switch should
precede the -clone switch. See “Peer-to-peer connections” on page 178.
If this switch is set, Norton Ghost uses the disk’s verify command to check every sector on
the disk before it is written. This option may slow Norton Ghost operation substantially.
Shows the version number of Norton Ghost.
Runs compression when saving a disk or partition to an image file. The greater the
compression, the slower the transmission.
■ -z or -z1: Low compression (fast transmission)
■ -z2: High compression (medium transmission)
■ -z3 through -z9: Higher compression (slower transmission)
Continution of Supported configurations
Norton Ghost copies or clones any x86-based Linux system with full support for
Ext2/3 file systems (type 0x83) containing 1 KB, 2 KB, or 4 KB block sizes. Other
file systems, such as reiserfs, are cloned on a sector-by-sector basis and cannot be
resized during cloning.
Linux systems that use LILO as their boot loader in the MBR or in the active
Ext2/3 partition are supported with some exceptions. Any references to a disk
other than the first hard disk in the system (/dev/hda or /dev/sda) are not
supported. The /boot and root file systems must be on the first hard disk. /boot
can be a directory within the root file system.
Norton Ghost supports type 0 and type 1 Linux swap file systems (type 0x82).
Norton Ghost partially supports Linux extended partitions (type 0x85). It copies file systems inside these extended partitions, but restores them as DOS extended partitions. This is not known to cause problems with Linux systems after cloning.
Position of disk
Linux is sensitive to the position of the disk in hardware. A system running on the
primary master disk does not run if the disk is mounted as the primary slave or as
the secondary master. Norton Ghost does not resolve this issue.
Norton Ghost uses the file /etc/lilo.conf to determine the boot configuration. If
this file does not match the boot configuration, Norton Ghost may be unable to
patch LILO during cloning. The keyword, default, is not supported in Lilo.conf,
so the first target specified should be the default target.
If a different boot loader, such as grub, is used, or the preceding conditions are
not met, Norton Ghost clones the system but the new disk probably will not boot.
The system should be started from a floppy disk or CD, and the boot loader
should be reinstalled by running /sbin/lilo or an equivalent.
Warning: Always have a boot disk available in case of problems starting a Linux
system after cloning.
Norton Ghost utility support
Ghost Explorer substantially supports Ext2/3 file systems within image files,
including the restoration, deletion, and addition of files within these file systems.
Problems arise when files that have names that are illegal on Windows are
manipulated. Ghost Explorer cannot manipulate device files or symbolic links.
Sparse files are expanded on restoration, and hard links are broken.
GDisk does not create any Linux file systems or recognize any partitions within a
Linux extended partition.
These are the tips taken from the Symentec and work with your own risk.