Symantec GHOST IMAGING FOUNDATION 7.1 - V1.0, GHOST IMAGING FOUNDATION 7.1 User Manual

SymantecGhost Imaging Foundation
7.1
SymantecGhost Imaging Foundation
The softwaredescribed inthis bookis furnishedunder alicense agreementand maybe used only in accordance with the terms of the agreement.
Legal Notice
Copyright © 2008 Symantec Corporation. All rights reserved.
Symantec, the Symantec Logo are trademarks or registered trademarks of Symantec Corporation or its affiliates in the U.S.and other countries. Other names may betrademarks of their respective owners.
The product described in this document is distributed under licenses restricting its use, copying, distribution, and decompilation/reverse engineering. No part of this document may be reproduced in any form by any means without prior written authorization of Symantec Corporation and its licensors, if any.
THE DOCUMENTATIONIS PROVIDED "ASIS" AND ALLEXPRESS OR IMPLIEDCONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLYINVALID.SYMANTEC CORPORATIONSHALLNOT BELIABLE FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING, PERFORMANCE, OR USE OF THIS DOCUMENTATION. THE INFORMATION CONTAINED IN THIS DOCUMENTATION IS SUBJECT TO CHANGE WITHOUT NOTICE.
The LicensedSoftware andDocumentation aredeemed tobe commercial computer software as definedin FAR 12.212 and subject to restricted rights as defined in FAR Section52.227-19 "Commercial Computer Software - Restricted Rights" and DFARS 227.7202, "Rights in Commercial Computer Software or Commercial Computer Software Documentation", as applicable, and any successor regulations. Any use, modification, reproduction release, performance, displayor disclosure of the Licensed Software and Documentation by the U.S. Government shall be solely in accordance with the terms of this Agreement.
Symantec Corporation 20330 Stevens Creek Blvd. Cupertino, CA 95014
http://www.symantec.com
Technical Support
Symantec Technical Support maintains support centers globally. Technical Supports primary role is to respond to specific queries about product features and functionality.The Technical Support group also creates content forour online Knowledge Base. The Technical Support group works collaboratively with the other functional areas within Symantec to answer your questions in a timely fashion. Forexample, theTechnical Support group works with Product Engineering and SymantecSecurity Response to provide alerting servicesand virus definition updates.
Symantecs maintenance offerings include the following:
A range of support options that give you the flexibility to select the right
amount of service for any size organization
Telephone and Web-based support that provides rapid response and
up-to-the-minute information
Upgrade assurance that delivers automatic software upgrade protection
Global support that is available 24 hours a day, 7 days a week
Advanced features, including Account Management Services
For information about Symantecs Maintenance Programs, you can visit our Web site at the following URL:
www.symantec.com/techsupp/
Contacting Technical Support
Customers with a current maintenance agreement may access Technical Support information at the following URL:
www.symantec.com/techsupp/
Before contacting Technical Support, make sure you have satisfied the system requirements that are listed in your product documentation. Also, you should be at the computer on which the problem occurred, in case it is necessary to replicate the problem.
When you contact Technical Support, please have the following information available:
Product release level
Hardware information
Available memory, disk space, and NIC information
Operating system
Version and patch level
Network topology
Router, gateway, and IP address information
Problem description:
Error messages and log files
Troubleshooting that was performed before contacting Symantec
Recent software configuration changes and network changes
Licensing and registration
If yourSymantec product requires registration or a license key, accessour technical support Web page at the following URL:
www.symantec.com/techsupp/
Customer service
Customer service information is available at the following URL:
www.symantec.com/techsupp/
Customer Service is available to assist with the following types of issues:
Questions regarding product licensing or serialization
Product registration updates, such as address or name changes
General product information (features, language availability, local dealers)
Latest information about product updates and upgrades
Information about upgrade assurance and maintenance contracts
Information about the Symantec Buying Programs
Advice about Symantec's technical support options
Nontechnical presales questions
Issues that are related to CD-ROMs or manuals
Maintenance agreement resources
If you want to contact Symantec regarding an existing maintenance agreement, please contact the maintenance agreement administration team for your region as follows:
contractsadmin@symantec.comAsia-Pacific and Japan
semea@symantec.comEurope, Middle-East, and Africa
supportsolutions@symantec.comNorth America and Latin America
Additional enterprise services
Symantec offers a comprehensive set of services that allow you to maximize your investment in Symantec products and to develop your knowledge, expertise, and global insight, which enable you to manage your business risks proactively.
Enterprise services that are available include the following:
These solutions provide early warning of cyber attacks, comprehensive threat analysis, and countermeasures to prevent attacks before they occur.
Symantec EarlyWarning Solutions
These servicesremove theburden ofmanaging andmonitoring securitydevices and events, ensuring rapid response to real threats.
Managed Security Services
Symantec Consulting Services provide on-site technical expertise from Symantec andits trustedpartners. SymantecConsulting Servicesoffer avariety of prepackaged and customizable options that include assessment, design, implementation, monitoring,and management capabilities. Each is focused on establishing andmaintaining the integrity and availability of your IT resources.
Consulting Services
Educational Services provide a full array of technical training, security education, security certification, and awareness communication programs.
Educational Services
To access more information about Enterprise services, please visit our Web site at the following URL:
www.symantec.com
Select your country or language from the site index.
Technical Support .......... ..... ..... ..... ..... ..... ..... ..... ..... ..... ......... ..... ..... ..... ..... ..... ..... . 4
Chapter 1 Using Symantec Ghost as a stand-alone
program . ..... ..... ..... ..... ..... ..... ..... ..... ..... .............. ..... ..... ..... 13
About Ghost.exe . ..... ..... ..... ..... ..... .............. ..... ..... ..... ..... ..... ..... .... 13
Using Ghost.exe on a stand-alone computer ......... ..... ..... ..... ..... ..... .... 14
Starting Ghost.exe ... ..... ..... ..... ..... ..... ..... ..... ..... ..... ......... ..... ..... ..... 15
Using Ghost.exe with a mapped network drive .... ..... .............. ..... ..... .. 15
Establishing a peer-to-peer connection with Ghost.exe .... ..... ......... ..... . 16
About splitting images in a peer-to-peer operation ... ..... ..... ..... ..... 19
Creating a backup image file ..... ......... ..... ..... ..... ..... ..... ..... ..... ..... .... 19
Backing up a hard disk to an image file . .............. ..... ..... ..... ..... .... 19
Backing up a partition to an image file . ..... ..... ..... ..... ..... ..... ..... ... 21
Restoring from an image file .... ..... ..... ......... ..... ..... ..... ..... ..... ..... ..... 23
Restoring a hard disk from an image file . ..... ..... ..... ..... ..... ......... . 23
Restoring a partition from an image file .... ......... ..... ..... ..... ..... .... 25
Cloning disks and partitions . ..... ..... ..... ..... .............. ..... ..... ..... ..... .... 26
Cloning disk to disk ..... ..... ......... ..... ..... ..... ..... ..... ..... ..... ..... ..... 27
Cloning partition to partition . ......... ..... ..... ..... ..... ..... ..... ..... ..... . 28
Verifying integrity ..... ..... ..... .............. ..... ..... ..... ..... ..... ..... ..... ..... .. 30
Adding switches to your Ghost.exe operation ..... ..... ..... .............. ..... .. 30
Running Ghost32.exe in Windows ..... ..... ..... ..... ..... ..... ......... ..... ..... .. 31
Compatibility with Ghost.exe ... ..... .............. ..... ..... ..... ..... ..... .... 32
Chapter 2 Symantec Ghost support for image files and
disks ..... ..... ..... .............. ..... ..... ..... ..... ..... ..... ..... ..... ..... ....... 33
About Symantec Ghost image files ... ..... ..... ..... ..... ..... ..... ..... ..... ..... .. 33
Image files and compression . ......... ..... ..... ..... ..... ..... ..... ..... ..... ..... ... 34
Performance on a network ..... ..... ..... .............. ..... ..... ..... ..... ..... . 34
Image files and CRC32 ..... ..... ..... ..... ..... .............. ..... ..... ..... ..... ..... .. 35
Image files and volume spanning ..... ..... ..... ......... ..... ..... ..... ..... ..... ... 36
Limitations on the image file size ..... ..... ..... .............. ..... ..... ..... .. 36
Size-limited image files . ..... ..... ..... ..... ..... ..... ..... ..... ..... ......... .... 36
Spanned image files .............. ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... 36
Spanning across multiple volumes and limiting span sizes . ..... ..... . 37
Contents
Restoring from a spanned image ..... ..... ......... ..... ..... ..... ..... ..... ... 38
Image files and tape drives .... ..... ..... ..... ..... ..... ..... ......... ..... ..... ..... ... 38
Drives with BitLocker Drive Encryption ..... ..... ..... ..... ..... ..... ............. 39
Dynamic disks in Windows Vista/XP/2003/2000 ..... ..... ..... ..... ..... ..... .. 39
Support for Disk Drive Overlays (DDO) ..... ..... ..... ..... ......... ..... ..... ..... . 40
Hibernation and swap files ............. ..... ..... ..... ..... ..... ..... ..... ..... ..... ... 41
Backing up or migrating a server ... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... 42
Resolving SID and configuration issues ..... ..... ..... ..... .............. .... 42
Chapter 3 Modifying image file contents with Ghost
Explorer ..... ..... ..... ..... ..... ..... ..... ..... ..... ......... ..... ..... ..... ..... . 43
Using Ghost Explorer .............. ..... ..... ..... ..... ..... ..... ..... ..... ..... ......... 43
Viewing image files and their properties .... ..... ..... ..... ..... ......... ..... ..... 44
Launching a file . ..... ..... ..... ..... ......... ..... ..... ..... ..... ..... ..... ..... ..... ..... 45
Extracting a file or directory from an image file ..... ..... ..... .............. .... 46
Modifying image files .... ..... ..... ......... ..... ..... ..... ..... ..... ..... ..... ..... .... 46
Listing the contents of an image file . ..... ..... ..... ..... ..... ..... ..... ..... ..... .. 47
About image file spans ............ ..... ..... ..... ..... ..... ..... ..... ..... ..... ......... 47
Setting the default split options ..... ..... ..... ..... ..... ..... ..... .............. ..... 48
Compiling an image file . ..... ..... ..... ..... ..... ..... ..... ..... ..... ......... ..... ..... 48
Using Ghost Explorer from the command line . ..... .............. ..... ..... ..... 49
Using Ghost Explorer with long file names . .............. ..... ..... ..... ... 50
Chapter 4 Running DeployAnywhere from the command
line . ..... ..... ..... ..... ..... ..... ..... ..... ..... ......... ..... ..... ..... ..... ..... .... 51
Running DeployAnywhere from the command line ..... ..... ..... ..... ......... 51
Evaluating the target volume ... ..... ..... ..... ..... ..... ..... ..... ..... ..... ... 52
Retargeting the image . ..... ..... ..... ..... ..... ..... ..... .............. ..... ..... . 53
Adding new drivers to the Ghost Deploy Anywhere driver
database . ..... ..... ..... ..... ..... ......... ..... ..... ..... ..... ..... ..... ..... ..... .... 53
Chapter 5 Managing partitions using GDisk . ..... ..... .............. ..... ..... .. 55
About GDisk ..... ..... ..... ..... ..... ..... ..... ..... ......... ..... ..... ..... ..... ..... ..... . 55
Running GDisk ... ..... ..... ..... ..... ..... ......... ..... ..... ..... ..... ..... ..... ... 56
Overview of the main command-line switches ..... ..... ..... .............. ..... . 57
Online Help for command-line switches ..... ..... ..... ..... ..... ..... ..... .. 58
Switches common to all GDisk commands ......... ..... ..... ..... ..... ..... 58
Creating a partition ... ..... ..... ..... ..... ..... ......... ..... ..... ..... ..... ..... ..... ... 61
Reinitializing the Master Boot Record . ..... .............. ..... ..... ..... ..... ..... . 63
Reinitializing GPT disks .... ..... ..... ......... ..... ..... ..... ..... ..... ..... ..... ..... . 64
Showing information about disks .... ..... ..... ..... ..... ..... ..... ..... ..... ..... ... 64
Contents8
Performing multiple GDisk operations using batch mode ..... ..... ..... ..... 65
Deleting and wiping your disk ... ..... ..... ..... ..... ..... ..... ......... ..... ..... .... 66
Wiping Host Protected Areas (HPA)/PARTIES ..... ..... ..... ..... ..... .... 69
Confirming a disk wipe ..... ..... .............. ..... ..... ..... ..... ..... ..... ..... . 70
Activating or deactivating a partition .... ..... ..... ..... ..... ..... ..... ..... ..... .. 71
Hiding or unhiding a partition ..... ..... ..... ..... .............. ..... ..... ..... ..... .. 71
Modifying the Windows 2000/XP boot menu ... ..... ..... ..... ..... ..... ......... 72
Specifying the boot.ini path and file name . ..... ..... ..... ..... ..... ..... ... 73
Displaying the list of current boot entries ..... ..... ......... ..... ..... ..... . 73
Adding an entry to boot.ini ... .............. ..... ..... ..... ..... ..... ..... ..... .. 73
Removing an entry from boot.ini ... ..... ..... ..... ..... ..... ..... ..... ..... .... 76
Setting the default boot option and timeout . ..... .............. ..... ..... .. 76
Support for large hard-disks .... ..... ..... .............. ..... ..... ..... ..... ..... ..... 76
Chapter 6 Manipulating files and directories using
OmniFS ..... .............. ..... ..... ..... ..... ..... ..... ..... ..... ..... ......... ... 79
About OmniFS .... ..... ..... ..... ..... ..... ..... ..... .............. ..... ..... ..... ..... .... 79
OmniFS operating environments . ..... ..... ..... ..... ..... ..... ..... ......... ..... .. 80
Using OmniFS ... ..... ..... ..... ..... ..... ..... ..... ..... .............. ..... ..... ..... ..... 80
Access method switches ... ..... ..... ..... ..... ..... ..... ..... ..... .............. . 81
Accessing files and folders with names that contain spaces ..... ..... .. 83
Listing drive identifiers .... ..... ..... ..... ..... ..... ..... ..... .............. ..... . 83
OmniFS operations ..... ..... ..... ..... ..... ..... ..... ......... ..... ..... ..... ..... ..... .. 84
Setting the attribute for a file ... ..... ..... ..... ..... ..... ......... ..... ..... .... 84
Copying files and directories .... ..... .............. ..... ..... ..... ..... ..... .... 85
Renaming files and folders .... ..... ..... ......... ..... ..... ..... ..... ..... ..... .. 85
Deleting a file ..... ..... ......... ..... ..... ..... ..... ..... ..... ..... ..... ..... ........ 86
Deleting a folder ......... ..... ..... ..... ..... ..... ..... ..... ..... ..... .............. 86
Listing a folder ..... ..... ..... ..... ..... ..... ..... ..... .............. ..... ..... ..... . 86
Listing all volumes on a computer ... ..... ..... ..... ..... ..... ..... ..... ..... .. 86
Listing the commands ... ..... ..... ..... ..... ..... .............. ..... ..... ..... .... 87
Displaying the OmniFS version and copyright .... ..... ..... ..... ..... ..... 87
Creating a directory . ..... ..... ..... ..... ..... ..... ......... ..... ..... ..... ..... .... 87
Using OmniFS to recover files ... ..... ..... ..... ..... ..... ..... ..... ..... ..... ........ 87
Using a script file ..... .............. ..... ..... ..... ..... ..... ..... ..... ..... ..... ......... 89
OmniFS scenarios ..... ..... ..... ..... .............. ..... ..... ..... ..... ..... ..... ..... ... 90
Using OmniFS from the command line .... ..... ..... ..... ..... ......... ..... . 90
Using OmniFS with a script file . ..... ..... ......... ..... ..... ..... ..... ..... ... 90
Using OmniFS with a batch file ... ..... ..... ..... ..... ..... ..... ..... ..... ...... 90
OmniFS error handling . ..... ..... ..... .............. ..... ..... ..... ..... ..... ..... ..... 91
Correcting the date and time ... ..... ..... ..... ..... ..... ......... ..... ..... ..... ..... . 91
9Contents
Chapter 7 Editing registry keys and values using
GhRegEdit . ..... ..... ..... ..... .............. ..... ..... ..... ..... ..... ..... ..... . 93
About GhRegEdit .... ..... ..... ..... ..... ..... ..... ..... ......... ..... ..... ..... ..... ..... 93
Using GhRegEdit .... ..... ..... ..... ..... ......... ..... ..... ..... ..... ..... ..... ..... ..... . 94
Chapter 8 Using GhostCasting to create and restore
images . ..... ..... ..... ..... ..... .............. ..... ..... ..... ..... ..... ..... ..... . 101
About GhostCasting .... ..... ..... ..... ..... ..... ..... ......... ..... ..... ..... ..... ..... 101
Splitting images in a GhostCast operation ......... ..... ..... ..... ..... .... 102
Preparing for GhostCasting ..... ..... ......... ..... ..... ..... ..... ..... ..... ..... .... 103
About creating the model computer ... ..... ..... .............. ..... ..... .... 103
Creating a GhostCast Server . ..... ..... ..... ..... ..... .............. ..... ..... ..... .. 103
Starting a GhostCast session .... ..... ..... ..... ..... ..... ..... ..... ..... ..... ....... 104
Creating an image file .... ......... ..... ..... ..... ..... ..... ..... ..... ..... ..... ....... 105
Connecting a computer to a session ... ..... ..... ..... ..... ..... ..... ..... ... 105
Restoring an image file onto client computers ..... ..... ..... ..... ............. 106
Controlling the GhostCast session from the server .... ..... .............. ..... 108
Setting Auto Start parameters . ......... ..... ..... ..... ..... ..... ..... ..... ..... .... 111
Setting the data transfer mode . .............. ..... ..... ..... ..... ..... ..... ..... .... 111
Controlling the amount of network bandwidth used ... ..... ..... ..... ..... ... 113
Viewing and changing GhostCast Server session options .... ..... ..... ..... 114
Running Ghost.exe on a client computer ... ..... ..... ..... ..... ..... ............. 115
Chapter 9 GhostCasting from the command line .... ..... ..... ..... ..... .. 117
About running GhostCast Server from the command line .... ..... ..... ..... 117
Starting the GhostCast session .............. ..... ..... ..... ..... ..... ..... ..... ..... 118
GhostCast Server command-line options .... ..... ..... ..... ..... ..... ..... ..... . 118
Command-line option examples using GhostCast Server .... .......... 119
Chapter 10 GhostCasting and IP addresses . ..... ..... ..... ......... ..... ..... ... 123
About IP addresses for GhostCasting ..... ..... ..... ..... ..... ..... ..... ..... ..... . 123
Locally specified IP addresses ... ..... ..... ..... ..... ......... ..... ..... ..... ..... ... 123
Examples of Wattcp.cfg client configuration files . ..... ..... ..... ..... .. 124
About using BOOTP/DHCP to assign IP addresses . ..... ..... ..... ......... .... 124
BOOTP/DHCP automatically defined IP address ........ ..... ..... ..... .. 124
Appendix A GDisk disk-wipe specifications .... ..... ..... ......... ..... ..... ..... . 125
About GDisk disk-wipe specifications .... ..... ..... ..... ..... ..... ..... ..... ..... . 125
Clearing, sanitizing, and viewing hard disks ..... ..... ..... ..... ..... ..... ..... . 125
About completeness of coverage .... ..... ..... ......... ..... ..... ..... ..... ..... .... 127
Contents10
Determining disk size ..... ..... ......... ..... ..... ..... ..... ..... ..... ..... ..... ..... .. 129
Appendix B Command-line switches ..... ..... ..... ..... ..... ..... ..... ..... ..... ...... 131
About Symantec Ghost switches ..... ..... ..... ..... ..... ......... ..... ..... ..... ... 131
Listing command-line switches . ..... ..... ..... ..... ......... ..... ..... ..... .. 132
Command-line switches . ..... ..... ..... .............. ..... ..... ..... ..... ..... ..... ... 132
Accessing files ... ..... ..... ......... ..... ..... ..... ..... ..... ..... ..... ..... ..... ........ 148
Using the clone switch ..... ......... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... 148
Defining the type of clone command .... .............. ..... ..... ..... ..... .. 149
Setting a source for the clone switch ... ..... ..... ..... .............. ..... ... 151
Setting a destination for the clone switch .... ..... ..... ..... ..... ..... ..... 152
Setting a destination size for the clone switch .... ..... ..... ..... ..... .... 154
Examples of clone switch usage ..... ......... ..... ..... ..... ..... ..... ..... ... 154
Batch file example ... ..... ..... ..... ..... ..... ..... ..... ..... .............. ..... .. 156
Using the -CRC32 switch . ..... ..... .............. ..... ..... ..... ..... ..... ..... ..... .. 157
Examples of -CRC32 usage ... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... 158
Files not checked with CRC ..... ..... ..... ..... ..... ..... ..... ..... ..... ........ 159
About numbering the Virtual Partition ..... ..... ..... ..... .............. ..... .... 159
Appendix C Ghost for Linux ..... ..... ..... ......... ..... ..... ..... ..... ..... ..... ..... ..... ... 161
Supported configurations ..... ..... ..... ..... ..... .............. ..... ..... ..... ..... . 161
Supported Linux distributions for cloning ... ..... .............. ..... ..... . 164
Supported Linux distributions for running Ghost .... ..... ..... ..... ..... ..... 165
Symantec Ghost utility support ..... ..... ..... ..... ..... ......... ..... ..... ..... .... 165
Appendix D Configuring firewalls . ..... ..... ..... ..... ..... ..... ..... ..... .............. .. 167
Symantec Ghost port configuration ..... ..... ..... ..... ..... ..... ..... ..... ..... .. 167
Appendix E Troubleshooting ..... ..... ..... ..... ..... ..... ..... ..... ..... ......... ..... ..... . 171
Ghost.exe errors messages ... ..... ..... ..... ..... ..... ......... ..... ..... ..... ..... .. 171
Ghost.exe problems ..... ..... ..... .............. ..... ..... ..... ..... ..... ..... ..... .... 172
Vista volume containing system restore points ..... ..... ..... ........... 173
Starting from a PXE image on a Dell Dimension 8100
computer .... ..... ..... ..... ..... .............. ..... ..... ..... ..... ..... ..... .. 173
About using Ghost with NTFS files ..... ..... ..... ..... ..... ..... ............ 173
Symantec GhostCast errors . ..... ..... ..... ..... ..... ..... ..... ......... ..... ..... ... 175
Symantec Ghost and legacy network cards ..... ..... ..... ..... ..... ..... ..... ... 177
Problems running Symantec Ghost ........ ..... ..... ..... ..... ..... ..... ..... ..... 177
Cloning Windows 2000/XP computers .... ..... ..... ..... ..... ..... ..... .... 177
Vista partition restore ..... ..... ..... .............. ..... ..... ..... ..... ..... ..... 177
Joining client computers to Active Directory Domains ... ......... ..... 177
11Contents
Cannot start from drive A ... ..... ..... ..... ......... ..... ..... ..... ..... ..... .. 178
Windows blue screen .... ..... ..... ......... ..... ..... ..... ..... ..... ..... ..... .. 178
Missing hibernation file . ..... ..... .............. ..... ..... ..... ..... ..... ..... .. 178
About cancelling a Ghost.exe operation .... ..... ..... ..... ..... ..... ....... 179
Index ... ..... .............. ..... ..... ..... ..... ..... ..... ..... ..... ..... ......... ..... ..... ..... ..... ..... ..... ..... .... 181
Contents12
Using Symantec Ghost as a stand-alone program
This chapter includes the following topics:
About Ghost.exe
Using Ghost.exe on a stand-alone computer
Starting Ghost.exe
Using Ghost.exe with a mapped network drive
Establishing a peer-to-peer connection with Ghost.exe
Creating a backup image file
Restoring from an image file
Cloning disks and partitions
Verifying integrity
Adding switches to your Ghost.exe operation
Running Ghost32.exe in Windows
About Ghost.exe
Ghost.exe is a stand-alone program run within DOS that lets you copy disks or partitions from one computer to another. You can use Ghost to create image files and restore them.
1
Chapter
Note: For Ghost32, VMDK images are supported for all normal operations, and PQI and V2I images are supported as a source (but not as a destination) in all cloning operations. You must have v2DiskLib.dll in the same directory as Ghost32.exe.
The informationabout Ghost.exe is also true for Ghost for Linux,with the following limitations:
Direct writing to CD or tape is not supported.
Peer to peer connections over printer cable or USB cable are not supported.
Using Ghost.exe on a stand-alone computer
The following is an overview of how to start and run Ghost.exe.
Note: Ghost.exe does not fit on a single floppy disk. Ghost.exe is concatenated on a RAM drive in DOS and executed from the RAM drive. The concatenation is transparent.
To use Ghost.exe on a stand-alone computer
1
Start Ghost.exe.
See “Starting Ghost.exe” on page 15.
Add command-line switches, if necessary.
See “About Symantec Ghost switches” on page 131.
2
If necessary, establish a peer-to-peer connection.
See “Establishing a peer-to-peer connection with Ghost.exe” on page 16.
3
Select the Ghost.exe operation:
Disk or partition to image file
Disk or partition from image file
Disk to disk
Partition to partition
Check image or disk
4
Do one of the following:
Select the source hard disk or partitions.
Select the image file.
Using Symantec Ghost as a stand-alone program
Using Ghost.exe on a stand-alone computer
14
5
Do one of the following for operations other than checking an image:
Select the destination hard disk or partition.
Select the image file.
Warning: Make sure that you select the correct destination. The destination
disk is completely overwritten with no chance of recovering any data.
6
Complete the Ghost.exe operation.
Starting Ghost.exe
Ghost.exe is a DOS-based application that runs in DOS mode outside of Windows. You cannot run Ghost.exe within Windows Vista/XP/2000, Linux, OS/2, or other non-DOS operating systems. You can run Ghost.exe on a non-DOS operating system by using a Ghost boot package. The Ghost boot package lets you start the computer in DOS.
To start Ghost.exe
Do one of the following:
At the DOS prompt, type the following command:
progra~1\symantec \ghost\ghost.exe
Start the computer in
DOS mode.
After thefirst DOS boot disk loads you are prompted to insert the second Ghost boot disk. Ghost starts automatically.
You cancreate aDOS boot disk on a computer that is running Windows or DOS. Additional DOS drivers might be required to runGhost.exe. If you cannot access some hardware or network resources, such as a CD-R/RW drive, you can use the GhostBoot Wizard to create a boot disk that containsthe necessary drivers.
Use a DOS boot disk to
start the computer.
When the computer starts Ghost starts automatically.
You can use the Ghost Boot Wizard to create a DOS boot package.
Use a DOS boot
package to start the
computer.
Using Ghost.exe with a mapped network drive
When you access a mapped network drive you must be aware of the following:
15Using Symantec Ghost as a stand-alone program
Starting Ghost.exe
You must use a mapped network boot package created from the Ghost Boot
Wizard.
If the boot package contains Ghost.exe then you cannot save the package to a
floppy disk set. You can save the package to a USB flash drive or an ISO image.
If you run Ghost.exe from any location other than A: then you must reset the
environment variable to the correct location of Wattcp.cfg before you start Ghost.
DOS driverscannot handle large files over a mapped networkdrive. Therefore,
Ghost sets a 2 GB split limit when writing to a mapped network drive. Before you access a large image file over a mapped network drive you should split the image file into spans that are no greater than 2 GB.
See “About image file spans” on page 47.
If you have restarted the computer with a boot package that does not contain Ghost. exe then the computer restarts to a command prompt, for example D:\. You must reset the Wattcp environment variable to D:\net\wattcp.cfg. You can then start Ghost.exe from the mapped network drive.
If you have restarted the computer with a boot package that contains Ghost.exe then Ghoststarts after the computer has restarted. If GhostCastingor peer-to-peer services are not available from the menu then ensure that Ghost is reading a Wattcp.cfg thathas SHARE_MODE=1.Exit Ghost and then at the command prompt, reset the Wattcp environment variable. For example, if you are at the command prompt D:\, then reset the Wattcp environment variable to D:\net\wattcp.cfg, ensuring thatD:\net\wattcp.cfg hasSHARE_MODE=1. You can then restart Ghost from either D:\ or from a mapped network drive.
To reset the environment variable to the correct location of Wattcp.cfg
1
On the command line, type the following:
set wattcp=<drive>\net\wattcp.cfg
2
Press Enter.
Establishing a peer-to-peer connection with Ghost.exe
Note: The Linux version of Ghost supports peer to peer connections over TCP
only. It does not support LPT or USB connections.
If you are using an LPT, USB, or TCP peer-to-peer connection, then you must set up theconnection between computers before a clone, backup, orrestore operation.
The computers must be physically connected using one of the following:
Using Symantec Ghost as a stand-alone program
Establishing a peer-to-peer connection with Ghost.exe
16
A parallel connection cableLPT
A USB 1.1 cableUSB
A network connectionTCP peer-to-peer
In a peer-to-peer operation, one computer is designated the master computer, and the other is designated the slave computer.
Table 1-1 describes the possible Ghost.exe processes and the master/slave
relationships that exist within these processes.
Table 1-1
Master and slave computers
SlaveMasterAction
Computer containing destination disk
Computer containing source disk
Disk-to-disk clone
Computer receiving destination image file
Computer containing source disk
Back up disk to image file
Computer containing source image file
Computer containing destination disk
Restore disk from image file
Computer containing destination partition
Computer containing source partition
Partition-to-partition clone
Computer receiving destination image file
Computer containing source partition
Back up partition to image file
Computer containing source image file
Computer containing destination partition
Restore partition from image file
Select which computer is the master (the computer from which you control the connection) and which is the slave (the other computer participating in the connection). All operator input must occur on the master computer.
You must have two Ghost boot packages with which to start both the master and slave computers. You can create the boot packages using the Ghost Boot Wizard.
Note: You must createboth bootpackages inthe sameversion ofSymantec Ghost. You cannot use one boot disk that was created in Symantec Ghost 8.0 and one boot disk that was created in Symantec Ghost 11.5 in the same task.
17Using Symantec Ghost as a stand-alone program
Establishing a peer-to-peer connection with Ghost.exe
To establish a peer-to-peer connection with Ghost.exe
1
Do one of the following:
On the master computer, insert the first Ghost boot disk into the floppy
disk drive, and then restart the computer. Repeat this step on the slave computer.
Restart the master computer and the slave computer by using the Ghost
boot package.
2
If you are using a floppy disk set, then, when prompted, insert the second Ghost boot disk into the floppy disk drives of the master computer and the slave computer.
Ghost.exe starts automatically.
3
On the slave computer, on the main menu, do one of the following:
Click Peer to peer > USB > Slave to start the computer as the slave computer.
USB connection
Click Peer to peer > LPT > Slave to start the computer as the slave computer.
LPT connection
Click Peer to peer > TCP/IP > Slave to start the computer as the slave computer.
Make note of the IP address that is displayed in the Slave Connect dialog box.
TCP/IP connection
4
On the master computer, on the main menu, do one of the following:
Click Peerto peer> USB > Master to start the computer as the master computer.
USB connection
Click Peerto peer > LPT > Master to start the computer as the master computer.
LPT connection
Click Peer to peer > TCP/IP > Master to start the computer as the master computer.
Type the IP address that is displayed on the slave computer.
TCP/IP connection
Using Symantec Ghost as a stand-alone program
Establishing a peer-to-peer connection with Ghost.exe
18
About splitting images in a peer-to-peer operation
When you perform a peer-to-peer operation, an image is split when it reaches 2 GB in size unless you have set the split size to another value using the -split command switch. If this switch is explicitly set to 0, the image does not split.
See “About Symantec Ghost switches” on page 131.
Creating a backup image file
You can create a backup of a hard disk or one or more partitions.
The backup is saved as an image file, which you can store on the following:
Second hard disk
Second partition on your hard disk (partition backup only)
LS120 Superdisk, JAZ, or ZIP disk
CD-R/RW or DVD-R/RW/+R/+RW
FireWire hard disk
USB 1.1/2.0 hard disk
Tape
Locally mapped network file server
Another computer using a peer-to-peer connection
Compression may affect the speed of your operation. When you select a compression level, Ghost.exe estimates the amount of space available for the destination image file. If there is insufficient space, Ghost.exe prompts you to enable spanning of image files.
Backing up a hard disk to an image file
When you back up a hard disk, a copy of the entire disk is saved as an image file.
19Using Symantec Ghost as a stand-alone program
Creating a backup image file
To back up a disk to an image file
1
On the Ghost.exe main menu, do one of the following:
Click Local > Disk > To Image.Local
Click Disk > To Image.Peer-to-peer connection
2
In the Source Drive dialog box, select the source disk.
The Source Drive dialog box shows details of every disk that Ghost.exe finds on the local computer.
3
In the File Locator dialog box, type the image file destination and name.
4
In the Image file description dialog box, type a description of the image file.
You can modify this description on the Console or in Ghost Explorer.
5
Click Save.
6
When you are prompted to select the compression level, select one of the following:
For no compressionNo
For low compressionFast
For high compressionHigh
See “Image files and compression” on page 34.
7
In the Compress Image dialog box, select a compression option.
8
If Ghost detects that there is not enough space for the image file, you are prompted to enable spanning.
9
Check the details and ensure that the correct options are selected.
Using Symantec Ghost as a stand-alone program
Creating a backup image file
20
10
Do one of the following:
Click Yes.
The system performs an integrity check of the file structure on the source disk. The source disk is then copied to the destination image file.
If you need to cancel the process, press Ctrl+C, but be awarethat thisaction leavesthe destinationimage file in an unknown state.
To proceed with the image file
creation
Click No.To return to the menu
11
If spanning is required, do one of the following:
Insert the next media, then click OK.
Click Browse, then select the location of the next span of the image file.
See “Image files and volume spanning” on page 36.
12
Verify the integrity of the image file.
See “Verifying integrity” on page 30.
Backing up a partition to an image file
You can create an image file from one or more partitions to use as a backup or to clone onto another partition or disk.
To back up a partition to an image file
1
On the main menu, do one of the following:
Click Local > Partition > To Image.Local
Click Partition > To Image.Peer-to-peer connection
2
In the Source Drive dialog box, select the source drive.
The Source Drive dialog box contains the details of every disk that Ghost.exe
finds on the local computer.
3
In the Source Partition dialog box, select the source partitions to include in
the destination image file.
The Source Partition dialog box contains the details of all the partitions on
the selected source disk. You can select multiple partitions.
4
Click OK.
21Using Symantec Ghost as a stand-alone program
Creating a backup image file
5
In the File Locator dialog box, select the image file destination and name.
6
In the Image file description box, type a description of the image file.
7
Click Save.
8
When you are prompted to select the compression level, select one of the following:
For no compression.No
For low compression.Fast
For high compression.High
See “Image files and compression” on page 34.
9
In the Compress Image dialog box, select a compression option.
10
If Ghost detects that there is not enough space for the image file, you are prompted to enable spanning.
11
In the Proceed with partition image creation? dialog box, do one of the following:
Click Yes.
The system performs an integrity check of the file structure on the source partitions. The source partitions are then copied to the destination image file.
If you need to cancel the process, press Ctrl+C, but be awarethat thisaction leavesthe destinationimage file in an unknown state.
To proceed with the image file creation
Click No.To return to the menu
12
If spanning is required, do one of the following:
Insert the next media, then click OK.
Click Browse, then select the location of the next span of the image file.
See “Image files and volume spanning” on page 36.
13
Verify the integrity of the image file when it has been created.
See “Verifying integrity” on page 30.
Using Symantec Ghost as a stand-alone program
Creating a backup image file
22
Restoring from an image file
You can restore a hard disk or a partition.
The restore is made from a previously created image file that is stored on one of the following:
Second hard disk
Second partition on your hard disk
LS120 Superdisk, JAZ, or ZIP disk
CD-R/RW or DVD-R/RW/+R/+RW
FireWire hard disk
USB 1.1/2.0 hard disk
Tape
Mapped network drive
Drive on another computer (peer-to-peer)
Drive or partition being restored
Restoring a hard disk from an image file
When you restore a hard disk, it is overwritten by the contents of the image file.
To restore a disk from an image file
1
On the main menu, do one of the following:
Click Local > Disk > From Image.Local
Click Disk > From Image.Peer-to-peer connection
2
In the File Locator dialog box, do one of the following:
Type the path and file name of the image file.
Click Browse to locate the image file.
Specify the drive or device and select the full path name. The image file may reside on a local drive or on a locally mapped network file server. When using a peer-to-peer connection, the image file is located on the slave computer.
3
Press Enter.
23Using Symantec Ghost as a stand-alone program
Restoring from an image file
4
In the Destination Drive dialog box, select the destination disk.
Choose carefully as this is the disk that will be overwritten.
The Destination Drive dialog box shows the details of every drive that Ghost.exe finds on the local computer.
5
In theDestination Drive Details dialog box, confirm orchange the destination disk partition layout.
The Destination Drive Details dialog box shows a suggested partition layout for the destination disk. By default, Ghost.exe tries to maintain the same size ratio between new disk partitions.
You can change the size of any target FAT, NTFS, or Linux Ext2/3 partition by entering the new size in megabytes.
You cannot enter a value that exceeds the available space, is beyond the file system's limitations, or is not large enough to contain the data held in the source image.
Warning: The Destination Drive Details dialog box shows a suggestedpartition layout for the destination drive once the cloning process is completed. This partition layoutmay mirror the source drive layout. Therefore,the destination drive details appear similar to the source drive.
6
Click OK.
7
Do one of the following:
Click Yes.
Ghost.exe creates the destination disk using the source image file disk details. If you need to abort the process, press Ctrl+C, but be aware that this leaves the destination disk in an unknown state.
To proceed with the disk cloning.
Click No.To return to the menu.
Warning: Only click Yes if you are sure that you want to proceed. The destination disk is completely overwritten with no chance of recovering any data.
8
If prompted toinsert an image span, when prompted, do one of thefollowing:
Insert the next media, then click OK to continue.
Using Symantec Ghost as a stand-alone program
Restoring from an image file
24
Click Browse to restore from a different location, then type the location
and file name of the image file span.
9
Restart the computer when the disk image restore is complete.
10
Verify the integrity of the destination disk.
See “Verifying integrity” on page 30.
You canalso run Symantec Disk Doctor, Chkdsk, ScanDisk,or a similar utility
to verify the integrity of the destination disk.
Restoring a partition from an image file
When you restore a partition, it is overwritten by the data from an image file.
To restore a partition from an image file
1
On the main menu, do one of the following:
Click Local > Partition > From Image.Local
Click Partition > From Image.Peer-to-peer connection
2
In the File Locator dialog box, do one of the following:
Type the path and file name of the image file.
Click Browse to locate the image file.
Specify the drive or device and select the full path name. The image file may reside on a local drive or on a locally mapped network file server. When using a peer-to-peer connection, the image file is located on the slave computer.
3
Press Enter.
4
In the Source Partition dialog box, select the source partition from the image
file.
The Source Partition dialog box contains the details of all of the partitions
in the image file.
5
In the Destination Drive dialog box, select the destination disk.
The Destination Drive dialog box contains the details of every disk that
Ghost.exe finds on the local computer.
25Using Symantec Ghost as a stand-alone program
Restoring from an image file
6
In the Destination Partition dialog box, select the destination partition.
Select an existing partition carefully as this is the partition that will be overwritten.
The DestinationPartition dialog box contains the details ofall of the partitions on the selected destination disk. You can create a new partition if space is available. If you create a new partition, it can be resized during the cloning operation.
7
In the Proceed with partition restore? dialog box, do one of the following:
Click Yes.
Ghost.exe overwritesthe destination partition using the partition details contained in the image file. If you need to abort the process, press Ctrl+C, but be aware that this leaves the destination partitionin an unknown state.
To proceed with the partition cloning.
Click No.To return to the menu.
Warning: Only click Yes if you are sure that you want to proceed. The destination partition is completely overwritten with no chance of recovering any data.
8
If prompted toinsert an image span, when prompted, do one of thefollowing:
Insert the next media, then click OK to continue.
Click Browse to restore from a different location, then type the location
and file name of the image file span.
9
Restart the destination computer when the partition copy is complete.
10
Verify the integrity of the destination partition.
See “Verifying integrity” on page 30.
You canalso run Symantec Disk Doctor, Chkdsk, ScanDisk,or a similar utility to verify the integrity of the destination partition.
Cloning disks and partitions
By default, Ghost.exe tries to maintain the same size ratio between new disk partitions. However, you should note the following:
Using Symantec Ghost as a stand-alone program
Cloning disks and partitions
26
You canchange the size of any destination FAT, NTFS, orLinux Ext2/3partition
by entering the new size in megabytes.
You cannot enter a value that exceeds the available space, is beyond the file
system's limitations, or that is not large enough to contain the data held in the source partition.
Cloning disk to disk
When you clone disk to disk, Ghost.exe copies the contents of one hard disk onto another.
To clone disk to disk
1
On the Ghost.exe main menu, do one of the following:
Click Local > Disk > To Disk.Local
Click Disk > To Disk.Peer-to-peer connection
2
In the Source Drive dialog box, select the source disk.
The Source Drive dialog box shows the details of every disk that Ghost.exe
finds on the local computer.
3
In the Destination Drive dialog box, select the destination disk.
Choose carefully as this is the disk that will be overwritten.
If a peer-to-peer connection method is used, the destination disk can be any
of the slave computer's disks. However, if this is a local disk-to-disk copy,
then the source disk is unavailable for selection.
4
Confirm the destination disk layout.
Warning: The Destination Drive Details dialog box shows a suggestedpartition
layout for the destination drive once the cloning process is completed. This
partition layoutmay mirror the source drive layout. Therefore,the destination
drive details appear similar to the source drive.
5
Click OK.
27Using Symantec Ghost as a stand-alone program
Cloning disks and partitions
6
When theProceed with disk clone?prompt appears, do oneof the following:
Click Yes.
The system performs an integrity check of the file structure on the source disk, and then copies the source disk to the destination. If you need to abort the process, press Ctrl+C, but be aware that this leaves the destination disk in an unknown state.
To proceed with the disk cloning.
Click No.To return to the menu.
Warning: Only click Yes if you are sure that you want to proceed. The destination disk is overwritten with no chance of recovering any data.
7
Restart the computer.
Warning: You should remove one of the hard disks before you restart your computer. If you leave two hard disks in the computer, damage can occur to both of the bootable operating systems.
8
Verify the integrity of the destination disk.
See “Verifying integrity” on page 30.
You canalso run Symantec Disk Doctor, Chkdsk, ScanDisk,or a similar utility to verify the integrity of the destination disk.
Cloning partition to partition
When you clone partition to partition, Ghost.exe copies the contents of one partition onto another.
To clone from partition to partition
1
On the main menu, do one of the following:
Click Local > Partition > To Partition.Local
Click Partition >To Partition.Peer-to-peer connection
2
In the Source Drive dialog box, select the source disk.
The Source Drive dialog box shows details of every disk that Ghost.exe finds on the local computer.
Using Symantec Ghost as a stand-alone program
Cloning disks and partitions
28
3
In the Source Partition dialog box, select the source partition.
The Source Partition dialog box shows the details of all of the partitions on
the selected source disk.
4
In the Destination Drive dialog box, select the destination disk.
The DestinationDrive dialog box shows the details of every diskthat Ghost.exe
finds on the destination computer. For peer-to-peer connections, the slave
computer is the destination.
5
In the Destination Partition dialog box, select the destination partition.
Select anexisting partition carefully as thisis the partition that is overwritten.
The Destination Partition dialog box shows the details of all of the partitions
on the selected destination disk. If this is a local partition-to-partition copy,
then thesource partition is unavailable for selection.However, you can create
a new partition if space is available. If you create a new partition, it can be
resized during the cloning operation.
6
Click OK.
7
When the final Proceed with Partition Copy? prompt appears, do one of the
following:
Click Yes.
If you need to abort the process, press Ctrl+C, but be aware that this leaves the destination disk in an unknown state.
To proceed with the partition
copy.
Click No.To return to the menu.
Warning: Only click Yes if you are sure that you want to proceed. The
destination partition is completely overwritten with no chance of recovering
any data. This is the last chance to back out.
8
Restart the destination computer when the partition copy is complete.
9
Verify the integrity of the destination partition.
See “Verifying integrity” on page 30.
You canalso run Symantec Disk Doctor, Chkdsk, ScanDisk,or a similar utility
to verify the integrity of the destination partition.
29Using Symantec Ghost as a stand-alone program
Cloning disks and partitions
Verifying integrity
After a backup, restore, or clone operation, check the integrity of the partition, hard disk, or image file.
To verify the integrity of an image file
On the computer on which the image file is saved, on the main menu, do one of the following:
Click Local > Check > Image FileLocal
Click Check > Image File.Peer-to-peer connection
To verify the integrity of a disk
1
On the main menu, do one of the following:
Click Local > Check > Disk.Local
Click Check > Disk.Peer-to-peer connection
2
Select the source disk to verify.
3
Click OK.
4
Click Yes to start the disk check.
Adding switches to your Ghost.exe operation
You can include a number of options (or switches) that can also be entered using the commandline. These switches are set in the Ghost.exe userinterface as follows:
Using Symantec Ghost as a stand-alone program
Verifying integrity
30
To add switches to your Ghost.exe operation
1
On the main menu, click Options.
2
Select from the following the options to include in your current cloning task.
-span, -auto, -cns, -crcignore, -fcrSpan/CRC
-f32,-f64, -fatlimitFAT 32/64
-sure, -fro, -rb, -fxMisc
-ia, -ib, -id
-tapeeject, -tapesafe, -tapeunbuffered,
-tapebuffered
Image/Tape
-pwd, -locktype=typeSecurity
See “About Symantec Ghost switches” on page 131.
3
On the Save Settings tab, click Save Settings to confirm the list of active
switches listed.
4
Click Accept to include the settings in the current task.
Running Ghost32.exe in Windows
Ghost32.exe is a Win32 version of Ghost.exe. It is designed to run on Microsoft Windows Vista/XP/2000. You can use Ghost32.exe to perform most Ghost operations on hard drives that are accessible from these operating systems. The hard drives must be able to communicate with the GhostCast Server.
If you run Ghost32.exe in Windows, note the following information:
The partition on which Windows is installed cannot be overwritten.
In Windows2000, if you are overwriting a disk,you must restart the computer.
In Windows XP/2003 Server, you should not have to restart the computer.
Hard-disk sizes might appear smaller than their actual sizes. Ghost32.exe can
only access the shown destination size. The remaining space is not used.
Ghost32.exe doesnot supportmount-point volumeson WindowsVista/XP/2000
computers.
Hot imaging, which is the ability to capture an image of a computer without
leaving Windows, issupported forWindows XPand Vista. The captured image is based on volume snapshots.
You canuse the forcevolumesnapshot switch to force an attempt touse volume SNAPSHOT on volumes in preference to standard volume locking.
31Using Symantec Ghost as a stand-alone program
Running Ghost32.exe in Windows
Before executing Ghost32 on Windows 9x-based computers, ensure that the following files are in the same directory as Ghost32.exe:
Int86_32.dll
Int86_16.dll
You can find these files in the Symantec Ghost Solution Suite folder.
To run Ghost32 in Microsoft Vista, you must run the command prompt as an administrator.
To run the command prompt as an administrator
1
On the taskbar, click Start > All Programs > Accessories, right-click Command Prompt and click Run as administrator.
2
In the User Account Control dialog box, type the administrator credentials.
3
Click OK.
Compatibility with Ghost.exe
Ghost32.exe shares the following functions with Ghost.exe:
Both Ghost.exe and Ghost32.exe can be a master or slave in a TCP/IP
peer-to-peer operation.
Image files that are created with Ghost.exe and Ghost32.exe are
interchangeable.
Ghost32.exe differs from Ghost.exe in the following ways:
You can run Ghost32.exe in Microsoft Windows Vista/XP/2000.
LPT peer-to-peer is not supported.
USB peer-to-peer is not supported.
You cannot use Ghost32.exe with a disk or partition that has files open during
the operation. For example, the system partition.
When writing to CD/DVD, Ghost32.exe is not copied onto the CD/DVD.
Using Symantec Ghost as a stand-alone program
Running Ghost32.exe in Windows
32
Symantec Ghost support for image files and disks
This chapter includes the following topics:
About Symantec Ghost image files
Image files and compression
Image files and CRC32
Image files and volume spanning
Image files and tape drives
Drives with BitLocker Drive Encryption
Dynamic disks in Windows Vista/XP/2003/2000
Support for Disk Drive Overlays (DDO)
Hibernation and swap files
Backing up or migrating a server
About Symantec Ghost image files
You cancreate image files by using the Symantec Ghostexecutable, the GhostCast Server, or the Symantec Ghost Console.
Symantec Ghost supports VMWare Disk images (.vmdk files) for both creating and restoring images. Note that .vmdk files do not have a Description field, and cannot be used in Ghost Explorer. Symantec Ghost supports Backup Exec System Recovery (.v2i, .iv2i) and DeployCenter Library (.pqi) images for restoring a computer only.
2
Chapter
The image files created with Symantec Ghost have a .gho or .ghs extension by default. They contain the entire disk or partitions of the disk. Image files support the following:
Various levels of compression
CRC32 data integrity checking
Splitting of media files
Spanning across volumes
Symantec Ghost images contain only the actual data on a disk. If you have a 9 GB drive with only 600 MB of data, the Symantec Ghost image is approximately 600 MB, or is smaller if you use compression.
You can use Ghost Explorer to selectively recover individual files from an image file without restoring the complete disk or partition. You can also use Ghost Explorer to edit Ghost images.
Image files and compression
Image filescreated in Symantec Ghost support several levelsof data compression. When Symantec Ghost is in interactive mode, three compression options are available: none, fast, and high. The Symantec Ghost command-line switch -z provides access to nine levels of compression.
See “About Symantec Ghost switches” on page 131.
As a rule, the more compression you use, the slower Symantec Ghost operates. However, compressioncan improvespeed when there is a data transfer bottleneck. There is a big difference in speed between high compression and no compression when creating an image file on a local disk. Over a network connection, fast compression is often as fast as, or faster than, no compression. Over a parallel cable, high compression is often faster than no compression because fewer bytes are sent over the cable. Decompressionof high-compressed images is muchfaster than the original compression. The level of compression that you select depends on your individual requirements.
The compression option is not available when you take an image of a drive that uses BitLocker Drive Encryption.
Performance on a network
One advantageof Symantec Ghost is speed. It takesminutes to install an operating system such as Windows XP, onto 10 or 100 computers. Many factors affect performance.
Symantec Ghost support for image files and disks
Image files and compression
34
When you use Symantec Ghost across a network, use thefast compressionoption. If disk space is at a premium, you can use higher compression, but it can affect speed. The fastest performance over a network is usually achieved with GhostCasting.
Using a 10 MB/second Ethernet network, a 25-60 MB/minute server speed is common.
The following factors influence this range:
Using up-to-date drivers
LAN traffic
Choice of network hubs or switches, including brand and model
Compression
On a100 MB/second Ethernet network, it is possible to achieve80-300 MB/minute under ideal conditions. This speed is influenced by computer hardware and LAN performance. Greater performance is achieved with faster computers, NICs, and hard disks.
Image files and CRC32
Cyclic RedundancyChecking (CRC) is a data error checking technique. CRC ensures that the original data written to the image file is the same as the data on the disk. CRC32 is a CRC technique that uses a 32-bit value to store error checking information.
When an image file is created, CRC32 details are embedded into the file to ensure that image file corruption is detected when the image is restored to disk. CRC32 is currently included on a file-by-file basis with FAT partitions and on a volume basis for NTFS partitions.
In addition to image file error detection, the CRC values are used to verify that image files and partitions or disks are identical. This offers an additional method to detect bad sector writes and other drive anomalies that may be missed during normal imaging checks.
You can generate a text file thatcontains CRC values and associated file attributes using the -CRC32 command-line switch.
See “Using the -CRC32 switch” on page 157.
35Symantec Ghost support for image files and disks
Image files and CRC32
Image files and volume spanning
You can capture an image in a single file or span an image across a number of files.
Standard image files consist of a single file that contains the contents of the complete disk or required partitions. This type of image file is used for storing system configurations on server network drives for later restoration, or on other hard drivesand tape drives where the volume is largeenough to hold the complete image file.
Limitations on the image file size
The maximum file size is determined by the file system. If Ghost is writing an image onto a FAT32-formatted disk, the maximum file size is 4 GB. If the image is written to an NTFS-formatted disk, there is no maximum file size. Ghost writes to an image file until a write failure occurs. If the write failure occurs because the maximum file size is reached or because there is no more space left on the disk, then Ghost spans the image and creates a new image-file segment.
Size-limited image files
There are situations in which it is not practical to have a standard image file. Symantec Ghost can split an image file into segments (known as spans) that are limited to a user-specified size. For example, you may want to keep files created on your network drive limited to 100 MB so that you can transfer them easily in the future. This option is most commonly used to limit span sizes to 620 MB for later transfer to a CD.
If you access a large image file over a mapped network drive verify that the file is no biggerthan 2GB. TheDOS drivers cannot successfully access large files over a mappednetwork drive. By splitting the file intospans, you enable Ghost to access a large image file.
See “About image file spans” on page 47.
Spanned image files
Spanned image files are similar to size-limited image files. The difference is that each segment file (or span) of the image file is limited by the actual volume size of the media to which the image is being saved. This lets you specify a drive and file name and lets Symantec Ghost determine when to request another volume or location for the remaining data. This is very useful when using ZIP, JAZ, LS120 Superdisk, and other drive types.
Symantec Ghost support for image files and disks
Image files and volume spanning
36
Spanning must be executed locally. If you try to span over a peer-to-peer connection (LPT,USB, TCP/IP, or GhostCasting), a disk fullerror message appears. However, splitting can be used in all situations.
Symantec Ghost also allows size limiting of spans when spanning volumes to ensure that no span exceeds the maximum size.
See “Spanning across multiple volumes and limiting span sizes” on page 37.
With allimage files, the only constraint on the selection of the destinationvolume is that it must not be part of the source selection. For example, it cannot be on a source disk or partition if that disk or partition is to be included in the image.
The spanned files are named according to Microsoft application guidelines.
For example, as follows:
First file: Filename.gho
Second file: Filen001.ghs
Third file: Filen002.ghs
You can use the -cns switch for an alternative naming standard.
For example, as follows:
First file: Filename.gho
Second file: Filename.001
Third file: Filename.002
See “About Symantec Ghost switches” on page 131.
Spanning across multiple volumes and limiting span sizes
When youcreate an image file from a disk or partition, the destination drive might have insufficientspace to store the image file.If Symantec Ghost determines that this isthe case, it alerts you and askswhether to enable spanning. Symantec Ghost assumes that compression reduces the size of the image by one-third when it determines whether the image will fit. Alternatively, you can use the -span and
-split command-line switches to configure Symantec Ghost to use image file size limiting.
See “Command-line switches” on page 132.
Before it saves the disk contents to the image file, Symantec Ghost shows the source and destination details and offers a chance to cancel. The default is to cancel.
Once the process starts, the image file creation continues until the destination volume is full.
37Symantec Ghost support for image files and disks
Image files and volume spanning
If you started spanning onto a JAZ disk and want to span a 3.0 GB drive onto JAZ disks, youcan choose to continue on JAZ disks. If you want to span across different forms of media, you can select a different type once the first portion of the span has completed. You cannot mix CD/DVD media with other types of media, such as JAZ or hard disk.
Note: You must record where the span segments are saved and the segment file names. SymantecGhost does not record the locations andfile names you selected.
Information about the partitions is stored at the start of the image file. This is updated at the end of the Ghost process, which might require you to reinsert the first disk in the span set. Symantec Ghost prompts you for the first disk in the span set and for subsequent volumes when restoring from an image.
Restoring from a spanned image
The process when restoring a disk or partition from a spanned image file is the same as restoringfrom an unspanned image file. However, during the restoration of the spanned image file, you are prompted for the locations of the image file spans. You must know the span segment locations and file names.
You can continue on the same form of media. For example, if you originally spanned onto a JAZ disk and want to restore a 3.0 GB drive from JAZ disks, you can replace the disk and continue from JAZ disks. Alternatively, you can restore from different media types.
Symantec Ghost automatically restores spanned images without prompting if it can find the next span.
Image files and tape drives
This section applies only to DOS/Windows Ghost. The Linux version of Ghost does not support direct writing to tape drives.
Ghost support of tape drives allows the storage of a single image file on a tape. When the image is written to the tape, Ghost.exe uses no associated file system, which means that you cannot access the tape from a drive letter as if it were another storage drive. Ghost does not support spanning to multiple tapes.
When you use tape drives with Ghost.exe, you can select the tape drive as the source ordestination device in the File Locator window.Each tape device is shown as MTx, where x is a number starting at 0 and increasing incrementally for each drive present.
Symantec Ghost support for image files and disks
Image files and tape drives
38
For Ghost.exe to access SCSI tape drives, a DOS ASPI driver must be installed prior to use.
Ghost.exe in its default mode performs well with most tape devices. In some situations with older tape devices and possibly with unreliable tapes, Ghost.exe may need to be configured to slow down or alter the way it uses the tape device.
See “Command-line switches” on page 132.
Note: Ghost Explorer cannot access an image stored on tape.
Drives with BitLocker Drive Encryption
The compression option is not available when you take an image of a disk that uses BitLocker Drive Encryption. Ghost performs a sector-by-sector copy of the entire disk.
You must verify that the disk on which the image is to be restored is identical to the source disk in every way. You should take a copy of a disk that uses BitLocker Drive Encryption only as a backup. If you restore an image onto a drive that has a different geometry, Windows Vista cannot interpret the disk.
Dynamic disks in Windows Vista/XP/2003/2000
Symantec Ghost supports backing up, restoring, and cloning simple or mirrored volumes on dynamic disks. Spanned, striped, and RAID-5 volumes are not supported by Symantec Ghost. You can back up an image of a partition on a disk in a dynamic disk set to animage file. If you backup a disk, then all of the partitions that Ghost supports on the disk, and only those partitions, are backed up to an image file.
Operations that support dynamic disks are as follows:
Partition-to-partition
Partition-to-image
Disk-to-disk
Disk-to-image
Check image
Check disk
CRC32
CRC32 verify
39Symantec Ghost support for image files and disks
Drives with BitLocker Drive Encryption
You can restore an image of a dynamic disk only to a basic disk, not to a dynamic disk. After you have restored the image file to a basic disk, you can then use Windows 2000 Disk Manager to convert the disk to a dynamic disk.
To delete a dynamic disk, use GDisk. Use the switch gdisk /mbr /wipe to delete all partitions from the disk. This method destroys all data on the disk.
See “About GDisk” on page 55.
See “Command-line switches” on page 132.
You can also take a disk image of a dynamic disk if you use the image all (-ia) switch. The -ia switch performs a sector-by-sector copy of the entire disk. The disk on which the image is to be restored must be identical to the source disk in every way. This function is only useful for creating a backup. If you restore an image created using -ia onto a drive with different geometry, Windows cannot interpret the dynamic disk.
If you restore an -ia disk image of a dynamic disk onto a SCSI hard drive and you receive a Destination drive too small message, you must load the ASPI driver for the SCSI card. Without an ASPI driver, Symantec Ghost does not always detect the correct size of the SCSI drive and cannot determine whether the drive is large enough to hold the image.
Note: Use the -ia switch with caution because it is slow and the image file would be very large.
Support for Disk Drive Overlays (DDO)
Symantec Ghost supports DDO as follows:
Backing up or cloning a disk with a DDO creates an image file that does not
include the DDO.
Restoring an image onto a disk with a DDO leaves the DDO intact.
Use the -ib switch to include the DDO in the backup or clone.
Restoring the image file created replaces the existing DDO with the DDO
included in the image.
A GDisk disk wipe overwrites a DDO.
See “Deleting and wiping your disk” on page 66.
Symantec Ghost support for image files and disks
Support for Disk Drive Overlays (DDO)
40
Hibernation and swap files
When SymantecGhost creates image files or clones, it does notinclude hibernation and swap files. These files are valid only for one Windows session, and when they are included in an image file, they make it significantly larger.
Symantec Ghost implements file skipping differently for each of the following file systems:
FAT file systems: Files are not included on the image file or destination disk.
NTFS file systems: A file with the same name is created on the image file or
destination disk, but the contents of the file are not copied.
The following files are skipped on all file systems:
386Spart.par
Amizvsus.pmf
Dos data.sf
Ghost.dta
Hiberfil.sys
Hibrn8.dat
Hybern8
Navsysl.dat
Navsysr.dat
Pagefile.sys
Pm_hiber.bin
Save2dsk.bin
Saveto.dsk
Spart.par
Swapper.dat
Toshiber.dat
Virtpart.dat
Win386.swp
41Symantec Ghost support for image files and disks
Hibernation and swap files
Backing up or migrating a server
You can use Symantec Ghost to back up or migrate a server. However, it is not recommended that you use Symantec Ghost to roll out an image of a server to multiple computers.
If you are rolling out an image of a server you must resolve Security Identifier (SID) and configuration issues.
Resolving SID and configuration issues
If you are backing up a server then you do not need to change the SID and the operation should be successful if the computers hardware is not changed after the backup has been made. If the hardware is changed then the computer might not start after the backup is restored.
If you are migrating a server then you do not need to change the SID and the operation should be successful if the hardware is identical on the source and destination hard drives or computers.
You can clone a server if the source and destination servers log on to two totally different networks andthe twoservers cannotsee each other on the network. The source and destination computers must have identical hardware. In addition to SID considerations, Windows maintains many configuration settings that are unique to each server. For example, the choice of Domain Name Service (DNS) or Dynamic Host Configuration Protocol (DHCP) might affect whether a server can start, or if that computer can log on to a particular network or be recognized on the network. Symantec Ghost does not automatically configure such settings. These configuration settings must be manually changed.
For more information, consult your Windows and networking documentation.
Symantec Ghost support for image files and disks
Backing up or migrating a server
42
Modifying image file contents with Ghost Explorer
This chapter includes the following topics:
Using Ghost Explorer
Viewing image files and their properties
Launching a file
Extracting a file or directory from an image file
Modifying image files
Listing the contents of an image file
About image file spans
Setting the default split options
Compiling an image file
Using Ghost Explorer from the command line
Using Ghost Explorer
The Ghost Explorer utility lets you view, alter, add, and extract files from a Ghost image (.gho) file.
Note: You cannot open VMWare Disk image (.vmdk) files with Ghost Explorer.
3
Chapter
Using Ghost Explorer, you can do the following:
View image file contents and save a list of files within an image file.
Extract files or directories from an image file.
Add, move, copy, delete, and launch files from and within an image file.
Use drag-and-drop or cut-and-paste functionality to add files and directories
from Windows Explorer to the image file.
Set span sizes.
Add a description to an image file.
Compile an image file to improve restore performance.
Ghost Explorer supports the following partition types:
FAT12
FAT16
FAT32
NTFS
Linux Ext2/3
To open Ghost Explorer
On the Windows taskbar, click Start > All Programs > Symantec Ghost > Ghost Explorer.
To access a list of file commands
Right-click a file or directory in Ghost Explorer to access a list of file commands.
Viewing image files and their properties
You can view the contents of an image file, including details of the partitions, directories, and files. You can also view the image file properties.
If theimage file contains NTFS partitions that arestored on a CD you might receive frequent prompts to swap CDs when you try to view the image file. To avoid this problem, copy the spans from the CD onto a hard disk and then view the image file on the hard disk.
Modifying image file contents with Ghost Explorer
Viewing image files and their properties
44
To view an image file and the properties
1
Open Ghost Explorer.
See “To open Ghost Explorer” on page 44.
2
On the File menu, click Open.
3
Select an image file.
4
Click Open.
5
On the File menu, click Properties to view the image file properties.
Launching a file
Ghost Explorer restores a file to a temporary directory and attempts to open it. If the file is an executable program, it is run. If it is a data file and there is an application installed andassociated with this file type, the application opens with the data file.
If you try to launch an application that depends on other files within the image file, it will probably fail. Ghost Explorer does not determine what dependencies exist. Extract the required files and then run the application file.
To launch a file
1
In Ghost Explorer, in the right pane, select a file.
2
On the File menu, click Launch.
45Modifying image file contents with Ghost Explorer
Launching a file
Extracting a file or directory from an image file
You canextract a file or directory directly from an image file using Ghost Explorer. This does not delete the original file, but copies it to a new location.
Note: You can also use a drag-and-drop operation to move a file from Ghost Explorer to Windows Explorer to extract it.
To extract a file or directory from an image file
1
In Ghost Explorer, open the image file.
2
Select the file or directory to be extracted.
3
On the File menu, click Extract.
4
In the Extract To dialog box, select the location to which you want to extract the file or directory.
5
Click Extract to save the file or directory to the chosen location.
Modifying image files
Whether you can add, delete, or view an image file, or move files within an image file, depends on the version of Symantec Ghost that was used to create the image file. You can check the version of Symantec Ghost used to create your image file in the image file properties. Ghost Explorer cannot open a file created with a version of Symantec Ghost earlier than 3.0.
You can use Ghost Explorer to add files or directories from Windows Explorer to any image file that was created in Symantec Ghost version 6.0 or later. You can also delete files from any image file that was created in Symantec Ghost 5.1d or later. If you add a file or directory to an image file the original span split is preserved.
See “Viewing image files and their properties” on page 44.
Ghost Explorer supports Windows cut-and-paste operations within image files. For example, you can copy, paste, move, delete, and add files to images. You can also use a drag-and-drop operationto move filesfrom Windows Explorerto Ghost Explorer.
To avoid problems, you should avoid making the following types of changes to an image file:
Ghost Explorer prevents you from adding files to the root folder of Linux
Ext2/3 partitions.If you add files, thenew files are not visible when you restore the image, and the e2fsck tool reports errors.
Modifying image file contents with Ghost Explorer
Extracting a file or directory from an image file
46
Do notadd files to the root folder of a Ghost boot-partition imagethat contains
PC DOS. A computer that is cloned from this image does not start.
Warning: If you use Ghost Explorer to add files to an image file, there may be some performance degradation when you restore the file using GhostCasting. Ghost Explorer calculateswhether compilation is recommended. If itis, you can compile the file to improve performance.
See “Compiling an image file” on page 48.
Listing the contents of an image file
You can create a text file that contains a list of the directories and their details (and, optionally, files) that are in the current image file. You can store this file with the image file to keep an easily accessible list of the image file contents.
To list the contents of an image file
1
In Ghost Explorer, open the image file.
2
On the File menu, click List Contents.
3
Click one of the following:
List the directories onlyDirectories Only
List the directories and the filesInclude Files
List directories, files, and file detailsInclude Details
4
Select a directory to which to save the text file.
5
Type a file name.
6
Click Save.
About image file spans
You can split an existing image file into smaller spans. This function is useful if, for example, you need to split a file into two or more files that can then be saved onto a CD/DVD drive that is unsupported by Symantec Ghost. After you split an image file you must compile it.
See “Spanned image files” on page 36.
See “Size-limited image files” on page 36.
47Modifying image file contents with Ghost Explorer
Listing the contents of an image file
See “Compiling an image file” on page 48.
Note: If the CD/DVD drive is supported by Symantec Ghost, then as you create the image file you can save the image file directly to the CD/DVD.
Setting the default split options
Once this option is set, it becomes the default for all regenerated files.
To set the default split options
1
In Ghost Explorer, on the View menu, click Options.
2
In the Options dialog box, check Span Image.
3
In the Split point (MB) box, type the required size.
If you are splitting the file to save onto CD, then set the size to 600 MB.
4
If you want Ghost Explorer to choose a default name for additional span files that it creates, click Autoname Spans.
5
Click OK.
Compiling an image file
If you add or delete files from an image file, the image file becomes fragmented. Symantec Ghost takes longer to restore a fragmented image than a compiled file. You can improve the performance of a restore by compiling a file before you restore it. When you compile a file, the file is defragmented. If you want to split an existing image, then you must compile it to span the image file.
You can check the properties of the image file to determine whether compilation is recommended.
To compile an image file
1
On the File menu, click Compile.
2
If you want to span the image file, in the Save As dialog box, check Span Image, and then in the Split point (MB) box, type the required size.
If you are splitting the file to save it on a CD, then set the size to 600 MB.
3
If you want Ghost Explorer to choose a default name for any additional span files that it creates, click Autoname Spans.
Modifying image file contents with Ghost Explorer
Setting the default split options
48
4
In the File name box, type a name and a location for the first new file.
If you are splitting a file, all of the new files that are created are saved in the
same location. You should use a different name than the original image file
to avoid confusion.
5
Click Save.
6
If you are splitting the file, clickOK each time that you are prompted to create
a new span segment.
Using Ghost Explorer from the command line
You can start Ghost Explorer from a command prompt by typing its path and file name.
To start Ghost Explorer from a command prompt
1
On the Windows taskbar, click Start > Programs > Accessories > Command
Prompt.
2
Type:
c:\Program Files\Symantec\Ghost\Ghostexp
This is the default path to Ghost Explorer.
3
Press Enter.
Ghost Explorer has a batch mode in which it carries out a single command and then exits. In this version, batch mode supports the saving of the contents to a text file only.
Table 3-1 specifies the switches to use the batch mode.
Table 3-1
Batch mode switches
DescriptionSwitch
Saves the list of directories in the dump file to a file with the same name as the image file but with an extension of .txt
-t
Saves a list of directories and files to filename-tf=filename
Saves a verbose listing of directories and files-tv
Saves a verbose list of directories and files to the file specified
-tv=filename
See “Listing the contents of an image file” on page 47.
49Modifying image file contents with Ghost Explorer
Using Ghost Explorer from the command line
If Ghost Explorer reports that a spanned or split image is corrupt without prompting for the second part of the image, it may not recognize that the image is split. Starting with the -split argument forces Ghost Explorer to treat an image as a split image.
See “Image files and volume spanning” on page 36.
Using Ghost Explorer with long file names
The image index created by versions of Symantec Ghost prior to 5.1c did not handle long file names containing double-byte characters correctly, such as file names in Asian or Eastern European languages. Ghost Explorer may be able to show these names properly by reading them directly from the image file instead of from the index. However, the restoring of the image is much slower. Use the switch -ignoreindex to force this behavior. You must have the correct char set loaded.
To set the correct char set
1
On the Windows taskbar, click Start > Settings > Control Panel.
2
Double-click Regional Options.
3
Select the required language option, and then click OK.
Modifying image file contents with Ghost Explorer
Using Ghost Explorer from the command line
50
Running DeployAnywhere from the command line
This chapter includes the following topics:
Running DeployAnywhere from the command line
Adding new drivers to the Ghost Deploy Anywhere driver database
Running DeployAnywhere from the command line
The Deploy Anywhere feature lets you retarget an image to suit a computer that has different hardware from the model computer from which the image was created. This lets you deploy a generic image to a range of different computers and perform a retargeting of the computers, rather than requiring a separate image for each hardware set.
If you want to use DeployAnywhere outside the managed environment, you can run the DeployAnywhere executable, ghDplyAw32.exe, from the command line. The executable is located in the same folder as the Ghost standard tools.
When you use ghDplyAw32.exe you need to do the following:
Firstly, evaluate the target volume to verify that the necessary drivers are
available. If allof the required drivers are available,the evaluation step returns "Success". See “Evaluating the target volume” on page 52.
Retarget the image. You should perform this step only after the evaluation
step has verified that all the necessary drivers are available. See “Retargeting the image” on page 53.
Table 4-1 describes the GhDplyAw32.exe command line switches.
4
Chapter
Table 4-1
ghDplyAw32.exe command line switches
DescriptionSwitch
The Windows volume to scan. For example, C: or 1.1:.
If necessary, you can determine this by using GhConfig32 with the /findactivewindows switch.
/target
Performs the evaluation step.
When this switch is excluded, the retargeting step is performed.
Note: Do not exclude this switch until after you have performed the
evaluation step and verified that all of the necessary drivers are available. Attempting to retarget a computer with missing drivers may corrupt the Windows volume.
/eval
The location of the DeployAnywhere driver database, if you want to use it.
If youexclude this switch, ghDplyAw32.exe evaluates only the drivers that are available on the target volume.
If you include this switch in the evaluation step, you mustalso include it in the retargeting step.
If youcreate a boot package using Ghost Boot Wizard, youcan include the DeployAnywhere driver database with the image. Alternatively, you can copy it from your Ghost installation (C:\Documents and Settings\All Users\Application Data\Symantec\Ghost\Template) to the appropriate media.
If you want, you can create your own driver database by copying a subset of the drivers from the DeployAnywhere driver database, and use it with this switch. However, if you need to add new drivers to the database, youneed todo sousing the Ghost Boot Wizard. This operates only on the DeployAnywhere driver database.
/ddb
Note: ghDplyAw32.exe may require GhConfig32.exe to perform some tasks. You should ensure that GhConfig32.exe is in the same directory as ghDplyAw32.exe before you run DeployAnywhere from the command line.
Evaluating the target volume
When you evaluate the target volume, ghDplyAw32.exe searches for the drivers that are required to boot the OS installation on the target computer's hardware. If any of the required drivers are not available, a list of missing drivers is returned. The list is also available in the ghDplyAw.txt file.
Running DeployAnywhere from the command line
Running DeployAnywhere from the command line
52
You need to ensure that the missing drivers are available in the DeployAnywhere driver database, and then run ghDplyAw32.exe again. You use the Ghost Boot Wizard to add new drivers to the DeployAnywhere driver database.
If all of the required drivers are available, the evaluation step returns "Success".
To perform the evaluation step, use the following command line:
ghDplyAw32.exe /target=[Windows disk] /eval /ddb=[DeployAnywhere
driver database location]
Retargeting the image
When the evaluation step has verified that all the necessary drivers are available, you can retarget the image. The retargeting step installs the appropriate drivers and performs other necessary configuration tasks.
To perform the retargeting step, use the following command line:
ghDplyAw32.exe /target=[Windows disk] /ddb=[DeployAnywhere driver
database location]
Adding new drivers to the Ghost Deploy Anywhere driver database
You can add new drivers to the Ghost Deploy Anywhere driver database. The drivers in the Ghost Deploy Anywhere driver database are available for use by the Deploy Anywhere feature when retargetting a client computer, and by the Ghost Boot Wizard when modifying a Win PE version.
53Running DeployAnywhere from the command line
Adding new drivers to the Ghost Deploy Anywhere driver database
To add a new driver to the Ghost Deploy Anywhere driver database
1
In the Windows PE Drivers window, click Add New Driver.
2
In the New Windows Driver window, select the driver that you want to add and specify the appropriate driver details:
The folder in which the driver is located. Type the folder path, or click Browse and select it.
Location
A suitablename for the driver. This is used in the Ghost Deploy Anywhere driverdatabase anddisplayed in the Windows PE Drivers window.
Friendly Name
Specify theoperating systems that the driver supports by checking the appropriate check boxes.
Applicable OS
3
Click OK.
Running DeployAnywhere from the command line
Adding new drivers to the Ghost Deploy Anywhere driver database
54
Managing partitions using GDisk
This chapter includes the following topics:
About GDisk
Overview of the main command-line switches
Creating a partition
Reinitializing the Master Boot Record
Reinitializing GPT disks
Showing information about disks
Performing multiple GDisk operations using batch mode
Deleting and wiping your disk
Activating or deactivating a partition
Hiding or unhiding a partition
Modifying the Windows 2000/XP boot menu
Support for large hard-disks
About GDisk
GDisk is a utility that lets you create partitions, reinitialize master boot records, delete data, and wipe your disks in many different ways.
The following versions of GDisk are included with Symantec Ghost:
5
Chapter
Runs in DOSGDisk.exe
Runs in Linuxgdisk
Runs from the command line in a Windows operating systemGDisk32.exe
Runs from the command line in a 64-bit Windows operating systemGDisk64.exe
GDisk is a complete replacement for the Fdisk and Format utilities and offers the following features:
On-the-fly formatting
Extensive partition reporting
High-security disk wiping
The ability to hide a partition or make a hidden partition visible
Compliance with the U.S. Department of Defense requirements for securely
wiping disks
Unlike Fdisk, which uses interactive menus and prompts, GDisk is command-line driven. This offers quicker configuration of a disk's partitions and the ability to define GDisk operations in a batch file.
Running GDisk
GDisk.exe mustbe runin DOSmode. GDisk32.exe can be run from within Windows. gdisk for Linux runs only under Linux.
Note: To run GDisk32 or GDisk64 in Microsoft Vista, you must run the command prompt as an administrator. To run gdisk for Linux, you must run as root.
To run GDisk.exe
1
Start your computer in DOS mode.
2
At the DOS prompt, type Progra~1\Symantec\Ghost\GDisk followed by the required disk and switches.
To run the command prompt as an administrator
1
On the taskbar, click Start > All Programs > Accessories, right-click Command Prompt and click Run as administrator.
2
In the User Account Control dialog box, type the administrator credentials.
3
Click OK.
Managing partitions using GDisk
About GDisk
56
To run GDisk32.exe
1
On the Windows taskbar, open a command window.
2
At the command prompt, type Program Files\Symantec \Ghost\GDisk32
followed by the required disk and switches.
To run GDisk64.exe
1
On the Windows taskbar, open a command window.
2
At the command prompt, type Program Files\Symantec \Ghost\GDisk64
followed by the required disk and switches.
To run gdisk for Linux
At the command prompt, type the appropriate path (the location to which
you extracted the Linux tools) and executable name (gdisk), followed by the
required disk and switches.
Overview of the main command-line switches
GDisk has 11 main modes of operation. The first four correspond to the menu options on the FDisk main menu.
Some command-line switches work only with the DOS version of GDisk or only with the Windows 32 version of GDisk.
Table 5-1 describes the switches that set the mode in which GDisk operates.
Table 5-1
GDisk main commands
ExplanationSwitchMode
Creates primary DOS partitions and extended DOS partitions.
/creCreate
Deletes partitions of any type, including non-DOS partitions.
/delDelete
Lists information on the specified fixed disk and its partitions.
/statusStatus (default)
Activates and deactivates a partition (specifying it as the bootable partition).
/act
/-act
Activate
Hides or unhides an existing partition./hide
/-hide
Hide
Reinitializes the Master Boot Record./mbrReinitialize MBR
57Managing partitions using GDisk
Overview of the main command-line switches
Table 5-1
GDisk main commands (continued)
ExplanationSwitchMode
Reinitializes a GPT disk./gptReinitialize GPT
Uses batch-mode command execution./batchBatch
Wipes the contents of the whole disk./diskwipeDisk wipe
Makes a modification to the Windows 2000/XP boot menu (Windows only).
/bootiniBoot.ini
Lets you view the contents of a disk to confirm an overwrite pattern after a disk wipe.
/viewView
Online Help for command-line switches
You can get an overview of the nine modes of operation and their switches by using the Help switch. The syntax for displaying help in GDisk is as follows:
C:\progra~1\symantec\ghost\gdisk /?GDisk.exe
C:\progra~1\symantec\ghost\gdisk32 /?GDisk32.exe
Note: An additional switch not shown is the /VERSION switch. This switch shows the version information for the GDisk and GDisk32 executable.
More detailed Help is available by qualifying the Help command with the switch for one of the nine main modes of operation.
For example, to view the detailed Help file for Hide, type one of the following command lines:
C:\progra~1\symantec\ghost\gdisk /hide /?GDisk.exe
C:\progra~1\symantec\ghost\gdisk32 /hide /?GDisk32.exe
Switches common to all GDisk commands
Table 5-2 describes the switches for any of the main GDisk operations.
Managing partitions using GDisk
Overview of the main command-line switches
58
Table 5-2
Switches common to all GDisk commands
ExplanationSwitch
Mounts thespecified vmdk, pqi, v2i, or iv2i image file ("add" the image as a disk). Once added, the disk can be used in all normal operations.
/ad=image file name
/addDisk=image file name
Prevents GDisk from using extended disk access support. This may result in GDisk not being aware of the full capacity of the disk.
/x
Prevents GDisk from using direct IDE disk access support. This may result in GDisk not being aware of the full capacity of the disk.
/i
Prevents GDisk from using direct SCSI disk access support. This may result in GDisk not being aware of the full capacity of the disk.
/s
Suppresses promptingto confirm the operation. If you do not use this switch, you are not necessarily prompted before a partition is deleted or another possibly destructive operation is executed.
/y
Suppresses prompting to confirm the operation and has the same functionality as /y.
/sure
Causes GDisk to restart the computer if the operation is successful./r
Turns off Ultra Direct Memory Access (UDMA).
This switch works in DOS only.
/u
59Managing partitions using GDisk
Overview of the main command-line switches
Table 5-2
Switches common to all GDisk commands (continued)
ExplanationSwitch
Forces USB support to start, even when the USB controller is being run by something else. The forceusb 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:
EHCI controllers with BIOS support are taken over and then
returned to the BIOS.
UHCI controllers with BIOS support are taken over and then
returned to the BIOS. For example, the keyboard is returned after the Ghost operation
is finished.
OHCI controllerswith BIOSsupport aretaken overbut notreturned
to the BIOS.
Note the following:
Use this switch with caution.
Avoid using the forceusb switchto take over a USBcontroller from
a driver, for example, Iomega USB drivers. You may encounter problems if you do this.
This switch works in DOS only.
/forceusb
Disables USB support.
This switch works in DOS only.
/nousb
Forces FireWire support to start, even when the FireWire controller is beingrun bysomething else. The force1394 switch attempts to take over theFireWire HostController. To enable native BIOS support, you must restart the computer.
Note the following:
Use this switch with caution.
Avoid usingthe force1394switch to take over a FireWire controller
from a driver, for example, Iomega FireWire drivers. You may encounter problems if you do this.
This switch works in DOS only.
/ force1394
Disables FireWire support.
This switch works in DOS only.
/no1394
Managing partitions using GDisk
Overview of the main command-line switches
60
Creating a partition
The create command lets you create a partition and specify the parameters of the partition. The command uses the largest block of unused disk space to create the partition. You can specify the partition type and the partition size. You can use the /for switch with the create command to format the partition. Otherwise, the partition is not formatted. You cannot create a dynamic disk partition.
Note: When GDisk creates a FAT32 partition, it aligns the first data sector to a 4 KB boundary from the start of the partition.
The create command uses the following syntax:
gdisk disk /cre {/pri| /ext| /log}[/sz: {MB|pcent{p|%}}]
[/end] [/for [/q] [/ntfs[:vista|xp|2000]]
[/align[:chs|1mb]] [/v[:label]]] [/-32] [/ntfat16]
GDisk
gdisk32 disk /cre{/pri|/ext|/log} [/sz:{MB|pcent{p|%}}]
[/end][/for [/q][/ntfs[:vista|xp|2000]]
[/align[:chs|1mb]][/v[:label]]] [/-32] [/ntfat16]
GDisk32
For example, to create a FAT32 formatted partition that uses the entire disk, you can use the following command:
gdisk 1 /cre /pri /for /q
Table 5-3 describes the switches that you can use with the create command.
Table 5-3
Create switches
ExplanationSwitch
Represents the physical fixed disk, from 1 to 128.disk
Creates a partition or a logical drive./cre
Creates a primary partition for an MBR or a GPT disk./pri
Creates an extended partition. This is supported for MBR only./ext
Formats an ext2 partition.
For example:
gdisk /cre /pri /for /ext2
/ext2
61Managing partitions using GDisk
Creating a partition
Table 5-3
Create switches (continued)
ExplanationSwitch
Creates a logical drive inthe extended partition. This is supported for MBR only.
/log
Specifies the size of the partition in megabytes (MB). This is rounded up to the nearest cylinder.
/sz:MB
Specifies thesize of the partition as a percentage of the total disksize, not the available disk space.
/sz:pcent{p|%}
Creates the partition at the end of the free space. If this switch is not used, then the partition is created at the beginning of the free space.
If the command line specifies that all of the available space is to be used to create the partition, then the /end switch is ignored.
/end
Formats thenew partitiononce ithas beencreated. Unlessthe /ntfat16 or /-32 switches are used, the partition type is determined by the following:
If the partition is less than 16MB: FAT12
If the partition is between 16MB and 512MB: FAT16
If the partition is greater than 512MB: FAT32
/for
Formats the new partition as NTFS. You can use the /for switch with this command to format the NTFS partition with the required volume type.
/ntfs[:vista|xp| 2000]
Aligns the partition with a boundary as follows:
CHS: Aligns the partition to a track or cylinder boundary. This
setting is the default.
1MB: Aligns the partition with a boundary of 1 MB.
You can use the lba switch to view the partition alignment.
Note: The 1MB alignment option supports Windows Vista.
/align[:CHS|1MB]
Performs a quick format if used in combination with the /for switch. If you do not use this switch, then GDisk performs a surface scan of the partition and marks any bad sectors.
/q
Gives the new formatted partition the specified label when used in combination with the /for switch.
/v[:label]
Managing partitions using GDisk
Creating a partition
62
Table 5-3
Create switches (continued)
ExplanationSwitch
Indicates that the partition isnot formattedas FAT32. Limits primary and logicalpartitions to 2048 MB. Partitions over 16 MB are formatted as FAT16. This switch is useful if the operating system does not support FAT32, such as Windows NT 4.
/-32
Lets you create a FAT16 primary or logical partition, up to 4097 MB. The cluster size is 64 KB. Partitions over 16 MB are formatted as FAT16. DOS systems may be unable to access partitions that are created with this switch and are over 2048 MB.
/ntfat16
Reinitializing the Master Boot Record
You can use the /mbr command torewrite the boot code in the master boot record (MBR). For example, you can use the /mbr command to reinitialize the MBR to eliminate a boot-sector virus. You can also use the /mbr command with the /wipe option in DOS to delete a dynamic disk.
Note: You must use the /mbr command when you delete Linux partitions if LILO or Grub resides in the MBR.
The syntax for this command is as follows:
gdisk disk /mbr [/wipe] [/p] [/z]GDisk.exe
gdisk disk /mbr [/wipe] [/p] [/z]gdisk
gdisk32 disk /mbr {/p /z}GDisk32.exe
gdisk64 disk /mbr {/p /z}GDisk64.exe
Table 5-4 lists the mbr switches.
Table 5-4
/mbr switches
ExplanationSwitch
Represents the physical fixed disk, from 1 to 128.disk
Reinitializes the boot code in the Master Boot Record./mbr
Deletes the partition on the disk (DOS and Linux only)./wipe
63Managing partitions using GDisk
Reinitializing the Master Boot Record
Table 5-4
/mbr switches (continued)
ExplanationSwitch
Preserves the disk signature./p
Replace the Master Boot Record with the specified mbr file./replace:
[filename]
Clears the disk signature and sets it to 0./z
If you clear the disk signature on a Windows computer then the disk must be initialized by Windows before it can be used. This is performed automatically when a computer is started. You can use the Disk Manager feature in Windows to initialize the disk manually. Microsoft Vista does not support automatic initialization.
Reinitializing GPT disks
You can use the /gpt command with /wipe to reformat a GPT disk. You can also use the /gpt switch with the /wipe switch in DOS to delete a dynamic disk.
The syntax for this command is as follows:
gdisk disk /gpt /wipe
Table 5-5 lists the gpt switches.
Table 5-5
/gpt switches
ExplanationSwitch
Represents the physical fixed disk, from 1 to 128disk
Reformats a GPT disk (DOS only)/gpt /wipe
Showing information about disks
The status switch shows information about the fixed disks and partitions on a disk, including the model of the disk. You must specify the disk number to get information about the partitions on a disk.
Depending on the version of GDisk that you require, the syntax for this command is one of the following:
gdisk [disk] [/status] [/raw|lba] [/ser]GDisk.exe
Managing partitions using GDisk
Reinitializing GPT disks
64
gdisk32 [disk] [/status] [/raw|lba] [/ser]GDisk32.exe
Table 5-6 lists the status switches.
Table 5-6
/status switches
ExplanationSwitch
Represents the physical fixed disk, from 1 to 128.disk
Shows the contents of the partition table in CHS or GPT form if used with the disk switch.
/raw
Shows the contents of the partition table in logical block form if used with the disk switch.
/lba
Shows the serial number of the disk./ser
Performing multiple GDisk operations using batch mode
Use the batch mode switch, /batch, to perform multiple GDisk operations with a single command. Using the /batch switch lets you avoid loading GDisk from the boot disk each time. Batch commands can either be supplied interactively at a prompt or in a previously prepared text file.
If the name of a text file is supplied along with the batch mode switch, GDisk opens thefile and executes the commands within ituntil all commands have been executed or one of the commands encounters an error.
For example:
C:\> gdisk /batch:cmds.txt
If the batch mode switch is supplied without a file name, GDisk prompts you for the commands to execute.
Note: To use GDisk32.exe in the example commands, replace gdisk with gdisk32.
Command-line argumentsthat apply to all of the batch commands can be specified on the original command line along with the batch mode switch. The lines found in the batch file (or typed at the prompt) are appended to the already partially formed command line.
Following is a sample batch command file called Two-new.txt. Blank lines and lines starting with the number (hash) symbol are considered comments. These
65Managing partitions using GDisk
Performing multiple GDisk operations using batch mode
lines areignored. In the following example, the commandsdo not specify the fixed disk on which to operate:
# delete all partitions
/del /all
# create formatted FAT16 primary DOS partition and then create
an extended # partition
/cre /pri /-32 /for /q
/cre /ext
# create formatted FAT16 logical DOS partition
/cre /log /-32 /for /q
The following command deletes all partitions and creates two new ones on the second fixed disk with confirmation prompting turned off:
gdisk 2 /y /batch:two-new.txt
The following four commands to be executed are a combination of the original command plus the commands from the batch file:
gdisk 2 /y /del /all
gdisk 2 /y /cre /pri /-32 /for /q
gdisk 2 /y /cre /ext
gdisk 2 /y /cre /log /-32 /for /q
Batch filesmay be nested recursively. For example, a second file called Std_init.txt contains the following lines:
1 /batch:two-new.txt
2 /batch:two-new.txt
As a result, the following command performs the actions of two-new.txt on both fixed disks:
gdisk /batch:std-init.txt
Deleting and wiping your disk
GDisk lets you delete data and partitions on your disk or wipe your entire disk. You cannot delete a dynamic disk partition with the /del switch.
The switch /del /all deletes all partitions that are on the disk. Any other space that has not been used for creating a partition is not deleted. Deleting an extended partition also deletes any logical partition within it.
Managing partitions using GDisk
Deleting and wiping your disk
66
The /diskwipe switch wipes the entire disk, partitions, partition table, MBR, and all used and unused space.
See “About GDisk disk-wipe specifications” on page 125.
Depending on the version of GDisk that you require, the syntax for the delete command is one of the following:
gdisk disk /del {/pri[:nth]|/ext[:nth]|/log:nth|
/p:partn-no|/all}
[/qwipe|/dodwipe|/customwipe:n][/[-]hpa]
GDisk
gdisk32 disk /del {/p:partn-no|/all} [/qwipe|/dodwipe
|/customwipe:n]
GDisk32
Table 5-7 lists the delete command switches.
Table 5-7
/del switches
ExplanationSwitch
Represents the physical fixed disk, from 1 to 128.disk
Deletes a partition or a logical drive./del
Deletes thenth primarypartition onan MBRor aGPT disk.The default setting is 1.
/pri[:nth]
Deletes the nth extended partition as well as any logical partitions in the extended partition. This switch is supported on MBR disks only. The default setting is 1.
/ext[:nth]
Deletes the nth logical drive from the extended partition. This switch is supported on MBR disks only.
/log:nth
Indicates which partition to delete on an MBR or a GPT disk. You should usethe partition number that is reported by GDisk instandard display mode for partn-no. Do not use the /lba or the /raw switches to find the partition number.
/p:partn-no
Deletes all partitions./all
Overwrites the partition's data area before deleting the partition. Makes 1 pass of deleting the data on the disk.
/qwipe
Overwrites the partition's data area before deleting the partition. Makes 6 passes of deleting the data on the disk.
/dodwipe
67Managing partitions using GDisk
Deleting and wiping your disk
Table 5-7
/del switches (continued)
ExplanationSwitch
Overwrites the partition's data area n times before deleting the partition. You can set n from 1 to 100. The /customwipe:6 switch is equivalent to a sanitize /dodwipe operation.
/customwipe:n
Depending on the version of GDisk that you require, the syntax for the diskwipe switch is as follows:
gdisk disk /diskwipe [dodwipe| /customwipe:n][/[-]hpa]GDisk.exe
gdisk32 disk /diskwipe [dodwipe| /customwipe:n]GDisk32.exe
Note: You must restart the computer after a disk wipe operation.
Table 5-8 lists the diskwipe switches.
Table 5-8
/diskwipe switches
ExplanationSwitch
Represents the physical fixed disk, from 1 to 128.
n - The disk number
disk
One of the following:
ALL - All attached disks
SYSTEM - The disk containing the bootable OS.
/disk:
Wipes the contents of the entire disk. Using this switch on its own wipes all partitions.
/diskwipe
Overwrites the disk including all partitions. Makes six passes of deleting the data on the disk.
/dodwipe
Overwrites the disk's data area n times and deletes partitions. You can set n from 1 to 100. The /customwipe:6 switch is equivalent to a sanitize /dodwipe operation.
/customwipe:n
Wipes anyHPA/PARTIES areafound on the disk. (DOS only - does not apply to GDisk32)
/hpa
Ignores any HPA/PARTIES area found on the disk. (DOS only - does not apply to GDisk32)
/-hpa
Managing partitions using GDisk
Deleting and wiping your disk
68
Table 5-8
/diskwipe switches (continued)
ExplanationSwitch
Preserve the Ghost partition that was used to boot./keepghostboot
Following are examples of the delete and wipe switches:
gdisk 1 /del /all /qwipe completes one pass to delete all partitions and data on
disk 1.
gdisk 1 /del /p:2 /qwipe wipes partition 2 on disk 1 with one pass.
gdisk 1 /diskwipe /customwipe:15 wipes the entire disk with 15 passes.
Wiping Host Protected Areas (HPA)/PARTIES
During execution of a DoD disk wipe, GDisk attempts to detect an HPA/PARTIES area on the disk.
Note: This functionality operates with GDisk.exe only. It does not apply to GDisk32.exe.
The sequence of the wipe is as follows:
If GDisk detects such an area, then it shall notify the user that it was found
and ask the user whether this area should be unlocked so that it can be erased.
If the user requests that the area be unlocked, then GDisk will attempt to
unlock the area. Otherwise, GDisk continues, ignoring the HPA area.
If the area is not password-protected and is successfully unlocked, then GDisk
notifies the user and erases the entire disk, including the HPA/PARTIES area.
If the area is password-protected and cannot be unlocked, then it notifies the
user that the unlock failed and asks if the users wants to continue. The user is also informed that the HPA/PARTIES area could possibly be unlocked using the BIOS.
If the user wants to continue, then GDisk continues to erase the disk, ignoring
the HPA/PARTIES area.
There are optional command-line switches as follows:
69Managing partitions using GDisk
Deleting and wiping your disk
GDisk does not look for an HPA on the disk.
For example:
gdisk 1 /diskwipe /dodwipe /-hpa performs a DoD disk wipe without checking for an HPA on the disk. If an HPA area is present, it is not wiped.
/-hpa
GDisk detects and attempts to unlock the HPA on the disk. If the area cannot be unlocked, then GDisk exits.
For example:
gdisk 1/diskwipe /dodwipe/hpa performsa DoDdisk wipeattempting to unlock any HPA on the disk.
/hpa
Confirming a disk wipe
The view:n command-line switch lets you view the overwrite pattern on the disk to confirm the overwrite has occurred. This lets you display one or more sectors, starting at sector n, of a physical disk on screen (by default, 1 sector shall be displayed). Sector numbers start at 0.
The optional arguments are as follows:
m sectors are displayed starting at the sector indicated in the view command.
If num:m is not specified, then GDisk defaults to displaying only one sector as indicated by view:n.
num:m
GDisk waits for you to press a key after each page of sector content is displayed. You can press q to exit.
If pageis not specified, then GDisk defaults to continuously outputting the contents of the sectors specified until finished.
page
Each sector is displayed as a table with 16 columns containing the sector offset, then hex bytes, and lastly 16 ASCII characters representing each byte. The table has n rows where n depends on the sector size. This is usually 32 rows (sector size of 512 bytes).
For example, displays sectors 0, 1, and 2 on screen:
gdisk 1 /view:0 /num:3
Figure 5-1 shows the output display.
Managing partitions using GDisk
Deleting and wiping your disk
70
Figure 5-1
Viewing disk wipe output
Activating or deactivating a partition
A computer starts in an active partition. Using the /act or /-act switches, you can choose the partition to which the computer starts.
Depending on the version of GDisk that you require, the syntax for this command is one of the following:
gdisk disk /[-]act /p:partn-noGDisk.exe
gdisk32 disk /[-]act /p:partn-noGDisk32.exe
Table 5-9 lists the act switches.
Table 5-9
/act switches
ExplanationSwitch
Represents the physical fixed disk, from 1 to 128.disk
Activates a partition./act
Deactivates a partition./-act
Indicates the partition to activate or deactivate. Only primary partitions can be activated. Use the number reported by GDisk in standard display mode (not using /lba or /raw) for partn-no.
/p:partn-no
Hiding or unhiding a partition
You can hide a partition so that a user cannot see it.
Depending on the version of GDisk that you require, the syntax for this command is one of the following:
gdisk disk /[-]hide /p:partn-noGDisk.exe
71Managing partitions using GDisk
Activating or deactivating a partition
gdisk32 disk /[-]hide /p:partn-noGDisk32.exe
Table 5-10 lists the hide switches.
Table 5-10
/hide switches
ExplanationSwitch
Represents the physical fixed disk, from 1 to 128.disk
Hides a partition./hide
Unhides a partition./-hide
Indicates the partition to hide or unhide. Use the number reported by GDisk in standard display mode (not using /lba or /raw) for partn-no.
/p:partn-no
Modifying the Windows 2000/XP boot menu
The /bootini switch lets you make a modification to a Windows 2000/XP boot menu. The following modifications are supported:
Displaying a list of current boot entries
Adding an entry to boot.ini
Removing an entry from boot.ini
Setting the default boot option and timeout
This switch functions with GDisk32.exe and GDisk64.exe only.
When GDisk32 or GDisk64 changes the state of boot.ini, a copy of the current boot.ini is created.
Table 5-11 lists the boot.ini copy names.
Table 5-11
Original and copy names
Boot.ini copy nameOriginal boot.ini filename
boot_GDISK32_copy.iniNamed boot.ini
my_GDISK32_copy.iniNot named boot.ini and with a period. For
example:
my.ini
Managing partitions using GDisk
Modifying the Windows 2000/XP boot menu
72
Table 5-11
Original and copy names (continued)
Boot.ini copy nameOriginal boot.ini filename
_GDISK32_copy is appended to the end of the file name:
myBootFile_GDISK32_copy
Not namedboot.ini andwithout aperiod. For example:
myBootFile
Specifying the boot.ini path and file name
The /inifileswitch is common to all operations performedwith the /bootini switch.
The /inifile switch lets you specify the full path and file name of the current Windows 2000/XP boot.ini file. This lets you locate boot.ini if it is not on drive C.
The default value for this switch is C:\boot.ini.
Displaying the list of current boot entries
Use the/bootini switch to display the existing bootmenu for the current Windows 2000/XP operating system.
The syntax for this command is as follows:
gdisk32 /bootini [/inifile:filename]
Adding an entry to boot.ini
You can add the following functions to a boot.ini file:
Starting another installation of Windows 2000/XP that resides on a different
partition.
Starting anon-Windows 2000/XP operating system that resides on a different
partition.
GDisk does not add an entry to boot.ini in the following cases:
An entry with the description already exists in Boot.ini (case insensitive).
The referenced partition is of type Extended.
The referenced partition is hidden.
Table 5-12 describes the function of each switch for both types of entries.
73Managing partitions using GDisk
Modifying the Windows 2000/XP boot menu
Table 5-12
Boot.ini switches
ExplanationSwitch
Modifies boot.ini./bootini
Creates a new entry in boot.ini./add
Represents the physical fixed disk, from 1 to 128./d:diskno
Indicates the partition from which to boot./p:partno
Specifies the description to appear in the NT boot loader menu./desc:description
Specifies the full path and file name for boot.ini. The default value is C:\boot.ini.
/inifile:filename
Specifies theboot-sector file to create. For example, C:\bsect.dat./bsectfile:filename
Adds an entry to start a Windows 2000/XP operating system./winnt
Specifies the system folder on the Windows 2000/XP operating system from which to start. The default value is Winnt.
/sysfolder:folder
Restarts after the execution of the command./r
Adding an entry to start Windows 2000/XP
The syntax for this command is as follows:
gdisk32 /bootini /add /d:disknumber/p:partno /desc:description /winnt
[/sysfolder:folder] [/inifile:filename] [/r]
This entry uses the Advanced RISC Computing (ARC) style path to describe the relative disk location for the entry. The entry has the following format:
<ARC style path>\<system folder>=“description”
For example:
multi(0)disk(0)rdisk(0)partition(1)\winnt=“Boot NT System”
For more information, see the Microsoft Knowledge Base article Q102873 ­BOOT.INI and ARC Path Naming Conventions and Usage.
Note the following:
GDisk uses only Multi(X) syntax when describing ARC style paths, as opposed
to SCSI(X).
GDisk always uses multi(0)disk(0) as the beginning of the ARC style path.
Managing partitions using GDisk
Modifying the Windows 2000/XP boot menu
74
/winnt instructs GDisk32 to create an ARC style entry and must be used if the
target operating system is Windows 2000/XP. If this switch is not used, then GDisk32 creates an entry as if the target operating system is not Windows 2000/XP.
/sysfolder lets you specify the Windows system folder on the target operating
system. The system folder is usually Winnt. If the system folder is not Winnt, then provide the path to this folder, but do not include the root directory.
For example, use /sysfolder:"2k\WinNt", not /sysfolder:"f:\2k\WinNt".
Adding an entry to start a non-Windows 2000/XP operating system
The syntax for this command is as follows:
gdisk32 /bootini /add /d:diskno/p:partno /desc:description
[/inifile:filename] [/bsectfile:filename] [/r]
This entry to boot.ini references a boot-sector file used to continue the boot process.
The entry has the following format:
full path to boot sector file\boot sector file="description"
For example:
C:\bootos2s.dat="Boot OS/2 System"
When adding this entry, GDisk does the following:
Reads the first sector of the targeted partition (boot sector).
Writes out the contents of that sector to a boot-sector file.
Adds a reference to that boot-sector file to boot.ini.
The /bsectfile switch is optional. It is used if you want the created bootsect.dat file to be saved somewhere other than the default location.
You must specifythe full path and file name for the boot-sector file that is created when you use the /bsectfile switch.
GDisk32 does the following by default:
Builds the file name from the entry descriptions, omitting any invalid
characters under DOS rules for 8.3 file name format.
Creates the boot-sector file in the root directory of the C drive and gives it a
.dat file extension. For example:
gdisk32 /add /d:1 /p:2 /desc:“*** Boot OS/2 ***”
75Managing partitions using GDisk
Modifying the Windows 2000/XP boot menu
This produces a boot-sector file C:\bootos2.dat.
Removing an entry from boot.ini
The syntax to remove an entry from boot.ini is as follows:
gdisk32 /bootini /remove /entry:number [/inifile:filename] [/r]
Table 5-13 lists the remove switches.
Table 5-13
/remove switches
ExplanationSwitch
Removes the entry from boot.ini./remove
Removes the ID of the entry from boot.ini./entry:number
If the entry to be removed is the default boot option, then GDisk removes the entry and sets the first entry in the remaining list as the default boot entry.
GDisk does not remove the entry if it is the only entry in boot.ini.
Setting the default boot option and timeout
Use the /default switch to set the default boot option and timeout.
The syntax for this command is as follows:
gdisk32 /bootini /default [/entry:number] [/timeout:sec]
[/inifile:filename] [/r]
Table 5-14 lists the default boot option and timeout switches.
Table 5-14
Default boot option and timeout switches
ExplanationSwitch
Sets the default boot option and timeout./default
Sets the ID of the entry as the default boot option./entry:number
Sets the number of seconds before the default boot option is selected./timeout:sec
Support for large hard-disks
GDisk supports all operations on disks up to 2 TB, and can also wipe disks larger than 2 TB.
Managing partitions using GDisk
Support for large hard-disks
76
GDisk includes large disk-drive support for IDE and SCSI hard drives (disks that exceed the 1024 cylinder BIOS limitation, which translates to a capacity greater than 7.8 GB). GDisk can directly access hard disks through the IDE controller or ASPI interface provided by an ASPI driver. Take care when creating partitions for operating systems with inherent partition-size limitations.
77Managing partitions using GDisk
Support for large hard-disks
Managing partitions using GDisk
Support for large hard-disks
78
Manipulating files and directories using OmniFS
This chapter includes the following topics:
About OmniFS
OmniFS operating environments
Using OmniFS
OmniFS operations
Using OmniFS to recover files
Using a script file
OmniFS scenarios
OmniFS error handling
Correcting the date and time
About OmniFS
OmniFS is a general-purpose utility for manipulating files and directories in a locally attached NTFS, FAT, or EXT3 file system (including hidden partitions).
OmniFS.exe performs these functions from DOS or WinPE. OmniFS32 performs the same functions but runs them in a Windows environment. The Linux version, omnifs, performs the corresponding functions under Linux.
OmniFS performs selected file input/output operations on a file system that is not accessible from a utility's operating environment.
OmniFS supports scripting and batch mode execution.
6
Chapter
OmniFS operating environments
Table 6-1 lists the versions of OmniFS.
Table 6-1
OmniFS versions
Operating systemExecutable
PC-DOS, MS-DOSOmniFS.exe
Linuxomnifs
Windows Vista/XP/2000OmniFS32
Long file names are supported on NTFS file systems, but support for long file names on FAT file systems depends on the operating system and access method. If you use the OmniFS library to access a file system, then long file names are supported. Youcan use the access method switches todirectly access a file system.
Using OmniFS
You can execute OmniFS from the command line only. Running OmniFS without any arguments provides a list of the interfaces and lists the access method switches.
The followinginterfaces aresupported for OmniFS.exe, OmniFS32.exe, and omnifs for Linux:
Performs the file operation and exits. It uses the exit code to signal whether or not the operation was successful, making it suitable for batchmode execution.
omnifs [/accessmethods]<operation to perform> <operation arguments, if any>
Performs allof theoperations thatare nominated in the script file and exits. It uses the exit code to signal whether the operation was successful. If any operation in the script file is unsuccessful, the script stops running and the utility exits, which signifies that the operation failed.
omnifs [/accessmethods]script<script file name>
Lists the available commands.omnifs help
To run OmniFS32 in Microsoft Vista, you must run the command prompt as an administrator.
Manipulating files and directories using OmniFS
OmniFS operating environments
80
To run the command prompt as an administrator
1
On the taskbar, click Start > All Programs > Accessories, right-click
Command Prompt and click Run as administrator.
2
In the User Account Control dialog box, type the administrator credentials.
3
Click OK.
Access method switches
Table 6-2 lists the access method switches that you can use in any operation. Not
all access methods are relevant to the Win32 version, OmniFS32.exe.
Table 6-2
Access method switches
DescriptionSwitch
Mounts thespecified 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, but the pqi, v2i, and iv2i disks are read-only.
/ad=image file name
/addDisk=image file name
Handles the code page in the same way as the current OEM page. The code page is specified as a number.
/cp=codepage
Specifies that the preferred file system access is through the application file system code.
/diskfs
Specifies that the preferred volume access is through the application volume code.
/diskvol
Specifies the number of hard drives present./dl=n
Prefers use of Direct IDE Access (DOS only)./ffi
Prefers use of Direct ASPI/SCSI Access./ffs
Prefers use of Extended Int13h./ffx
Disables asynchronous I/O./fna
Disables Direct IDE Access support (DOS only)./fni
Disables Direct ASPI/SCSI Access support./fns
Disables Extended Int13h support./fnx
Forces the IEEE1394 device (Firewire) to start (DOS only)./force1394
81Manipulating files and directories using OmniFS
Using OmniFS
Table 6-2
Access method switches (continued)
DescriptionSwitch
Forces USB support to start, even when the USB controller is being run by something else (DOS only).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:
EHCI controllers with BIOS support are taken over and then
returned to the BIOS.
UHCI controllers with BIOS support are taken over and then
returned to the BIOS. For example, the keyboard is returned after the Ghost operation
is finished.
OHCI controllerswith BIOSsupport aretaken overbut notreturned
to the BIOS.
Note the following:
Use this switch with caution.
Avoid using the forceusb switchto take over a USBcontroller from
a driver, for example, the Ghost peer-to-peer USB driver. You may encounter problems if you do this.
/forceusb
Tuns off the IEEE1394 (Firewire) support (DOS only)./no1394
Tuns off the IDE support (DOS only)./noide
Tuns off the SCSI support./noscsi
Tuns off USB support (DOS only)./nousb
Specifies thatthe preferred file system access is through the operating system.
/osfs
Specifies that the preferred volume access is through the operating system.
/osvol
Sets thepath to the directory in which the recovery file system resides./pfpath=path
Sets the USB emulation timeout in microseconds, where n is greater than or equal to 1 (DOS only). The default setting is 3000ms.
/usbtimeout=n
Verifies every disk write./vdw
Manipulating files and directories using OmniFS
Using OmniFS
82
Accessing files and folders with names that contain spaces
When using any of the OmniFS operations on files or folders that contain spaces in the file name or folder name, you must use one of these methods.
To display the directory for the folder My Documents in volume 1, use one of the following:
OmniFS dir “1.1:\My Documents” OmniFS dir 1.1:“\My Documents”
The following example would not work:
OmniFS dir 1.1:\“My Documents”
Listing drive identifiers
An NTFS file system cannot be mounted by DOS and, therefore, does not have a drive letter assigned by DOS. Use the info or diskinfo command to list the drive identifiers that are assigned by OmniFS on a computer.
In allcases, the characters :\ distinguish the volume identifier from the path name.
For example, the output of c:\>omnifs info might look like the following:
M:[Maxtor 4 G100H5 GAK8] S:[G5001MGF]
(95.42GB)1Disk:
[C:\] Active Volume NTFS l:[Rasfline] Primary
(87.89GB)1.1
Unused Space Primary(7.53GB)
M:[QUANTUM FIREBALL EX3 A0A.]S:[673826342323]
(3.01GB)2Disk:
Active VolumeEXT2 Primary(55.09MB)2.1
[E:\] Volume FAT32 Primary(2.95GB)2.2
Unused Space Primary(3.94MB)
The output provides additional information that is required to address partitions by the physical arrangement on the drives. Volume labels can also be used. To copy a file from the NTFS partition to the FAT32 partition in the example above, you can use the following syntax:
omnifs copy Rasfline:\test\data.txt 2.2:\test\data.txt
83Manipulating files and directories using OmniFS
Using OmniFS
OmniFS operations
The supported OmniFS operations are as follows:
Attrib
Copy
Rename
Delete
Deltree
Dir
Info
Help
Version
Mkdir
Commands are not case sensitive.
Setting the attribute for a file
The syntax for the attrib command is as follows:
attrib [+r][-r][+s][-s][+h][-h][+w][-w][+x][-x] <source>
Table 6-3 lists the attributes. Some attributes are not available for some file
systems.
Table 6-3
Attribute descriptions
DescriptionAttribute
Readabler
Systems
Hiddenh
Writablew
Executablex
You must set the source argument as an absolute path. This command sets or clears the file attributes to read only, system or hidden.
Manipulating files and directories using OmniFS
OmniFS operations
84
Copying files and directories
The syntax for the copy command is as follows:
copy <source> <destination>
Both the source and destination arguments must be specified as absolute paths.
For example, as follows:
copy a:\temp\test.txt 2:1\user\data.txtCopy a file from a volume that is accessible to the current operating system to a folder test on a volume that is inaccessible to it.
copy 2:1\user\data.txt a:\temp\test.txtCopy a file from a volume that is inaccessible to the current operating system to a volume that is accessible to it.
In both examples, the absolute path to the files must be valid.
If the source argument points to a directory, the copy operation copies all of the files and subdirectories from the source location to the destination location. In this case,the destination argument must point to avalid directory. The last portion of the destination path is created if required.
If thefirst argument points to a file and the second argument points to a directory, the fileis created with the same name as the source file in thedestination directory.
Renaming files and folders
The syntax for the rename command is as follows:
rename <source> <destination>
Both thesource anddestination arguments must be specified. The source argument must be specified as anabsolute path, andthe destination argumentmust contain the new name only. To move the file or folder to a new location use the copy command.
For example:
rename 2:1\user\data.txt "my data.txt"
This renames 2:1\user\data.txt to 2:1\user\ my data.txt.
The following operation is illegal because the destination argument contains a location:
rename 2:1\user\data.txt 2:1\temp\"my data.txt"
85Manipulating files and directories using OmniFS
OmniFS operations
Deleting a file
The syntax for the delete command is as follows:
delete <source>
The source argument must be specified as an absolute path, and the path must be valid. No wildcard characters are accepted.
For example:
delete 2:1\user\data.txt
A directory can be deleted only if it is empty.
Deleting a folder
The syntax for the deltree command is as follows:
deltree <source>
This command is similar to delete, but the source is a directory. The contents of the directory, including all subdirectories, are deleted before the directory is deleted.
Listing a folder
The syntax for the directory listing command is as follows:
dir <source>
The source argument must be specified as an absolute path, and the path must be valid.
For example:
dir 2:1\user
The output is similar to that of the 4Dos dir command.
Listing all volumes on a computer
The syntax for the info command is as follows:
info
The info operation has no parameters, and outputs the list of all the volumes that OmniFS is able to detect on the computer, regardless of whether they are recognizable by the current operating system.
Manipulating files and directories using OmniFS
OmniFS operations
86
Listing the commands
The syntax for the help command is as follows:
help
The help command lists the OmniFS commands.
Displaying the OmniFS version and copyright
The syntax for the version command is as follows:
version
This command displays the OmniFS version number and copyright.
Creating a directory
The syntax for the mkdir command is as follows:
mkdir <destination>
This command creates a directory. The destination argument must include an absolute path, and all components of the path except for the last directory must exist.
For example:
mkdir 2:1\user\test
The directory 2:1\user must already exist.
Using OmniFS to recover files
If a Clone task has failed on a client computer and the computer cannot start in Windows, you can use OmniFS to do a directory listing of preserved files in the File Preservation Metadata File and to copy the files to other locations.
Table 6-4 displays the formats that you can use for designating drives.
Table 6-4
Designating drives formats
ExampleFormat
omnifs dir pf:\e_drive\dataFormat c_drive when the origin partition was a FAT partition accessible from DOS.
87Manipulating files and directories using OmniFS
Using OmniFS to recover files
Table 6-4
Designating drives formats (continued)
ExampleFormat
omnifs dir pf:\disk_1\partition_2\dataFormat disk_1\partition_2 when theorigin partitionwas NTFS or hidden FAT.
Table 6-5 lists the commands you can use for recovering files. No other OmniFS
commands are supported for use with the File Preservation Metadata File.
Table 6-5
OmniFS recovery commands
DescriptionCommand line
Displays a directory listing from the File Preservation Metadata Fileof the preserved files if the File Preservation Metadata File is in the current directory. If a path is not included, a full listing is displayed. The drive must be included inthe command,in theformat c_driveor e_drive.
For example, omnifs dir pf:\c_drive\My Documents
Displays all preserved files from c:\My Documents.
omnifs dir pf:\c_drive\path
Displays a directory listing from the File Preservation Metadata Fileof the preserved files if the File Preservation Metadata File is not in the current directory. If a path is not included, a full listing is displayed. The drive must be included inthe command,in theformat c_driveor e_drive.
For example, omnifs dir pf:\c:\recovery:\c_drive\Data
Displays all preserved files from c:\Data from the File Preservation MetadataFile, whichis locatedin c:\recovery.
omnifs dir pf:\c:\recovery:\c_drive\path
Copies all files listed in the File Preservation Metadata File to the specified location.
For example, omnifs copy pf:\1.2:\ 1:1\temp
Copies all files listed in the File Preservation Metadata File, which is in the root directory of the second partition of the first disk, to the temp directory on the firstpartition on the first disk. This example uses the notation that lets you avoid having to use a drive letter.
omnifs copy pf:\source destination
Manipulating files and directories using OmniFS
Using OmniFS to recover files
88
Table 6-5
OmniFS recovery commands (continued)
DescriptionCommand line
Deletes specified file.
For example, omnifs delete pf:\1.2:\ghost: disk_0\partition_1\recovery\extra.txt
Deletes the extra.txt file in the directory recovery listed in the File Preservation Metadata File that is in the Ghost directory on the second partition on the first disk.
omnifs delete pf:\source destination
Deletes specified directory.
For example, omnifs deltree pf:\1.2:\ghost: \recovery
Deletes the recovery directory and all files within the directory.
omnifs deltree pf:\source destination
Using a script file
The script file format that is recognized by the utility uses the following rules:
Each line in the script file begins with the operation and is followed by all of
the required arguments for the nominated operation.
When specifying operation arguments with long file names, use quotation
marks (as you would on the command line).
Empty lines in the script file will be ignored.
An example of the script file is as follows:
copy a:\temp\user.dat 2:1\user\profile.dat
copy a:\userdir 2:1\user\data
delete 2:1\user\data\copy.bat
rename 2:1\user\data\catalog.cpy catalog.dat
The user can execute the set of commands provided in the script file using the following command:
omnifs script scriptfs.txt
Each command in the script file is echoed to the screen immediately before execution.
89Manipulating files and directories using OmniFS
Using a script file
OmniFS scenarios
OmniFS can be used from the command line with a batch file and with a script file.
Using OmniFS from the command line
In this scenario, OmniFS is executed from the command line.
The user executes a single operation. For example:
omnifs copy a:\temp\user.dat 2:1\user\profile.dat
Or, the user executes a set of commands provided in the script file. For example:
omnifs script scriptfs.txt
Following are the contents of Scriptfs.txt:
copy a:\temp\user.dat 2:1\user\profile.dat
copy a:\userdir 2:1\user\data
delete 2:1\user\data\copy.bat
rename 2:1\user\data\catalog.cpy catalog.dat
Using OmniFS with a script file
This scenario uses a batch file and a script file to copy, delete, and rename files on a volume that is not recognized by the operating system on the computer.
Following are the contents of a batch file, Goomnifs.bat:
omnifs script scriptfs.txt
Following are the contents of Scriptfs.txt:
copy a:\temp\user.dat 2:1\user\profile.dat
copy a:\userdir 2:1\user\data
delete 2:1\user\data\copy.bat
rename 2:1\user\data\catalog.cpy catalog.dat
This scenario would be more efficient than using a batch file.
Using OmniFS with a batch file
This scenario uses a batch file to copy, delete, and rename files on a volume that is not recognized by the operating system on the computer.
Following are the contents of a batch file, Goomnifs.bat:
Manipulating files and directories using OmniFS
OmniFS scenarios
90
omnifs copy a:\temp\user.dat 2:1\user\profile.dat
omnifs copy a:\userdir 2:1\user\data
omnifs delete 2:1\user\data\copy.bat
omnifs rename 2:1\user\data\catalog.cpy catalog.dat
OmniFS error handling
If an error occurs during the OmniFS operation, an error file, OmniFSer.txt, is created in the current directory.
Correcting the date and time
When you copy files from a FAT partition to an NTFS partition under DOS, there is a time-zone issue that must be addressed.
The date and time data in the FAT file system are local to the computer that the files are on. NTFS, however, uses UTC (Universal Time Coordinated) dates and times, also known as Greenwich Mean Time. Therefore, to set the date and time data correctly, OmniFS needs to know the time zone that the computer is in. This can be done either in the autoexec.bat file or from the command line, using the DOS environment variable, tz. For example:
set tz=aaa[+|-]h[h][bbb]
Where:
The abbreviation for your standard time.aaa
A one-two digit signed number that indicates the difference asnumber ofhours Westof Greenwich.
[+|-]h[h][:mm]
The abbreviationfor yourdaylight (summer)time zone (can be omitted).
bbb
For example:
Auckland, Wellington
set TZ=NST-12
U.S. and Canada Central Time
set TZ=EST+6
Central America
set TZ=CST+5
91Manipulating files and directories using OmniFS
OmniFS error handling
There is no significance in the abbreviation string other than it must be three alphanumeric characters.
Following are examples with part hour time differences:
India (Delhi)
set TZ=IST-5:30
Nepal (Katmandu)
set TZ=NST-5:45
These settings are in contrast to Windows times zones, which are the number of hours East of Greenwich, in which Auckland would be GMT+12.
Manipulating files and directories using OmniFS
Correcting the date and time
92
Editing registry keys and values using GhRegEdit
This chapter includes the following topics:
About GhRegEdit
Using GhRegEdit
About GhRegEdit
GhRegEdit lets you edit Windows registry keys and values.
Table 7-1 lists the versions of GhRegEdit.
Table 7-1
GhRegEdit versions
Operating systemExecutable
PC-DOS, MS-DOSGhRegEdt.exe
Linuxghregedit
Windows Vista/XP/WinPE/2000GhRegEdit32
64-bit Windows operating systems.GhRegEdit64
7
Chapter
Note: On a 64-bit operating system, you can run GhRegEdit64.exe to manipulate the registryas normal. You can also run GhRegEdit32 on a64-bit operating system, where itmanipulates the Wow6432Node. You need to specify the "wow64_64key" to make GhRegEdit32 function like GhRegEdit64 on 64-bit operating systems.
For example: GhRegEdit64 enumkey HKLM\Software and GhRegEdit32 enumkey
wow64_64key HKLM\Software will enumerate all keys under HKLM\Software,
whereas GhRegEdit32 enumkey HKLM\Software will enumerate all keys under HKLM\Software\wow6432node.
Using GhRegEdit
You can run GhRegEdt and GhRegEdit32 from the command line or from a batch file. Beforeyou use GhRegEdit, you should verify that the registry is notread-only.
You can use GhRegEdit32 to edit the registry without starting the operating system. You can also edit the registry as the operating system runs.
All GhRegEdt command-line switches can be run with GhRegEdit32.
Where the Windows directory is listed as a parameter, it is not optional if you are running GhRegEdit in DOS. The Windows directory is optional if you are running GhRegEdit32 in Windows, and you want to edit the current operating system registry. If you are running GhRegEdit32 in WinPE, the Windows directory is required, otherwisethe WinPE registry is opened instead ofthe Windows registry.
If the OEM code page language is not English, then GhRegEdit does not recognize path names. In this case, you should specify the code page to use for accessing the file system. For example, on a Japanese operating system, you should use the following command:
ghregedt.exe -cp=932 export 1.1:\windows 1.1:\exported.reg
For information about the file system OEM code page, see the following registry key:
HKLM\System\CurrentControlSet\Control\Nls\ Codepage\OEMCP
Table 7-2 lists the display operations.
Editing registry keys and values using GhRegEdit
Using GhRegEdit
94
Table 7-2
GhRegEdit display switches
DescriptionSwitch
Mounts the specified vmdk, pqi, v2i, or iv2i image file to GhRegEdit ("add" the image as a disk). Once added, the disk can be used in all normal operations.
-ad=image file name
-addDisk=image file name
Displays Windows installations.
GhRegEdit looksfor a Boot.ini or Msdos.sys file. Ifit finds one of these files, it displays the following:
The location of the boot.ini or msdos.sys file in the format
disk.partition:\filename For example: 1.1:\Windows The Windows installation is located on the first partition of the
first disk.
Operating systems to which the file points
See “Accessing files and folders with names that contain spaces” on page 83.
Note: The format for displaying in GhRegEdit is disk.partition, not
disk:partition.
To access registry files stored in an NTFS partition from within DOS, you must use the disk.partition notation because NTFS volumes do not have drive letters assigned in DOS.
Note: The windows switch is not available on GhRegEdit32 when
running on Vista, but it is available on WinPE.
windows
Displays a help file listing command-line switches.help
Table 7-3 lists the import and export switches.
Table 7-3
GhRegEdit import and export switches
DescriptionSwitch
Imports a registry import file as follows:
Windowsdir is the location of the Windows directory
For example, 1.1:\Windows.
Filename is the name and location of the .reg file.
import [windowsdir] filename
95Editing registry keys and values using GhRegEdit
Using GhRegEdit
Table 7-3
GhRegEdit import and export switches (continued)
DescriptionSwitch
Exports the entire registry as follows:
Windowsdir is the location of the Windows directory.
For example, 1.1:\Windows.
Filename is the name and location of the .reg file.
export [windowsdir]filename
Key operations switches must include the hive and can only operate on the local computer (HKEY_LOCAL_MACHINE) or the local user (HKEY_USERS). HKLM and HKU can be used as shorthand for HKEY_LOCAL_MACHINE and HKEY_USERS respectively.
Table 7-4 lists the key operations switches.
Table 7-4
GhRegEdit key switches
DescriptionSwitch
Adds the specified key to the registry as follows:
Windowsdir is the location of the Windows directory.
For example, 1.1:\Windows.
Key is the name and location of the key to be set.
For example:
ghregedt addkey 1.1:\Windows
HKEY_LOCAL_MACHINE\Software\MyTestApp
addkey [windowsdir] key
Deletes the specified key from the registry as follows:
Windowsdir is the location of the Windows directory.
For example, 1.1:\Windows.
Key is the name and location of the key to be deleted.
For example:
ghregedt delkey 1.1:\Windows
HKEY_LOCAL_MACHINE\Software\MyTestApp
delkey [windowsdir] key
Editing registry keys and values using GhRegEdit
Using GhRegEdit
96
Table 7-4
GhRegEdit key switches (continued)
DescriptionSwitch
Enumerates the subkeys for the specified key as follows:
Windowsdir is the location of the Windows directory.
For example, 1.1:\Windows.
Key is the name and location of the key.
For example:
ghregedt enumkey 1.1:\Windows
HKEY_LOCAL_MACHINE\Software
enumkey [windowsdir] key
Exports the key with subkeys as follows:
Windowsdir is the location of the Windows directory.
For example, 1.1:\Windows.
Filename is the name and location of the .reg file.
Key is the name and location of the key to be exported.
export [windowsdir]filename key
Table 7-5 lists the value switches.
97Editing registry keys and values using GhRegEdit
Using GhRegEdit
Table 7-5
GhRegEdit value switches
DescriptionSwitch
Modifies the specified value as follows:
Windowsdir is the location of the Windows directory.
For example, 1.1:\WINNT.
Key is the name and location of the key to be modified.
Value is the name of the value to be modified.
If value is not specified then the operation executes on the default value.
Type is the type of the value to be modified.
Type can be any supported by Windows, for example, REG_SZ, REG_DWORD, REG_BINARY.
Data is the data to be set for the value.
For example:
ghregedt addvalue 1.1:\Windows
HKEY_LOCAL_MACHINE\Software\MyTestApp REG_SZ "This
is my test app"
If you add a value of typeREG_MULTI_SZ (multiple strings), you must use the following syntax:
addvalue [WINDOWSDIR] KEY [VALUE] TYPE [ESC] DATA
The [ESC] optional parameter represents escape sequence. It is used in DATA to mark the end of one string and the beginning of another. You must always use the[ESC] parameter whenyou addvalues of type REG_MULTI_SZ. You must always terminate DATA with [ESC].
For example:
addvalue
1.1:\WINNT HKEY_LOCAL_MACHINE\Software\Test
TestValue REG_MULTI_SZ
:: "First string"::"Second string"::"Third string"::
addvalue [windowsdir] key [value] type data
Editing registry keys and values using GhRegEdit
Using GhRegEdit
98
Table 7-5
GhRegEdit value switches (continued)
DescriptionSwitch
Deletes the specified value as follows:
Windowsdir is the location of the Windows directory.
For example, 1.1:\Windows.
Key is the name and location of the key to be modified.
Value is the name of the value to be modified.
If valueis not specified, then the operation executes on the default value.
For example,
ghregedt delvalue 1.1:\Windows
HKEY_LOCAL_MACHINE\Software\MyTestApp Version
delvalue [windowsdir] key value
Enumerates the specified key's value as follows:
Windowsdir is the location of the Windows directory.
For example, 1.1:\Windows.
Key is the name and location of the key to be modified.
For example,
ghregedt enumvalue 1.1:\Windows
HKEY_LOCAL_MACHINE\Software\MyTestApp
enumvalue [windowsdir] key
99Editing registry keys and values using GhRegEdit
Using GhRegEdit
Editing registry keys and values using GhRegEdit
Using GhRegEdit
100
Loading...