Switches: GDisk and GDisk32 for Norton Ghost 2003
Situation:
You need to know what Norton Ghost 2003 GDisk and GDisk32 utilities can do and when they can be used.
Solution:
Two versions of GDisk are available with Norton Ghost 2003:
- GDisk: Runs in DOS mode only.
- GDisk32: Runs from the command line in a Windows operating system.
GDisk
General information:
- GDisk is a DOS command-line utility.
- GDisk.exe includes all of the features of FDisk, plus additional features. Everything you can do with FDisk you can do with GDisk. Partitions that are created with GDisk are indistinguishable from those that are created with FDisk.
- Because GDisk runs only in DOS, you cannot access GDisk from within Windows. Instead, copy GDisk.exe to a floppy disk, start the computer from a bootable floppy disk, and then run GDisk from the floppy disk.
- GDisk is located on the Ghost installation CD and in the Ghost installation folder on your hard disk.
GDisk is a DOS program with seven main operations:
- Display partition information (/STATUS)
- Create a partition (/CRE)
- Delete a partition (/DEL)
- Activate or deactivate a partition (/ACT and /-ACT)
- Hide or unhide a partition (/HIDE and /-HIDE)
- Reinitialize the master boot record (/MBR)
- Wipe the disk surface (/DISKWIPE)
These commands can be run from the DOS command line or from a batch file (/BATCH). In addition, GDisk provides help from the command line.
GDisk and GoBack
GDisk does not function correctly in some instances when the computer has GoBack installed. To use GDisk in this case, disable GoBack, start the computer from a floppy disk, and then run GDisk.
Displaying GDisk help
General help is available by using the ? switch:
Help on a particular operation is available by using the switch for the operation without additional parameters. The format of this command is:
For instance, the following command displays information regarding deleting partitions:
Switches for GDisk operations
Here are the GDisk switches, as provided by the Gdisk /? <operation> command.
Gdisk /?
The following is the screen displayed when running
gdisk /? from the command line prompt:
==============================================
A:\>gdisk /?
GDISK Fixed Disk Partitioning Utility
GDISK disk /CRE {/PRI|/EXT|/LOG} [/SZ:{mbytes|pcent{P|%}}] [/END] [/FOR [/Q] [/V[:label]]] [/-32] [/NTFAT16] [/X] [/I] [/S] [/Y] [/R]
GDISK disk /DEL {/PRI[:nth]|/EXT[:nth]|/LOG:nth|/P:partn-no|/ALL} [/X] [/I] [/S] [/Y] [/R] {[/QWIPE|/DODWIPE|/CUSTOMWIPE:passes]}
GDISK [disk] [/STATUS] [/RAW|/LBA] [/SER] [/X] [/I] [/S] [/Y] [/R]
GDISK disk /[-]ACT /P:partn-no [/X] [/I] [/S] [/Y] [/R]
GDISK disk /[-]HIDE /P:partn-no [/X] [/I] [/S] [/Y] [/R]
GDISK disk /MBR [/WIPE] [/X] [/I] [/S] [/Y] [/R]
GDISK disk /DISKWIPE [/DOD|CUSTOM:passes] [/X] [/I] [/S] [/Y] [/R]
GDISK [disk] /BATCH[:filename] [switch[switch...]]
GDISK /? [/CRE|/DEL|/STATUS|/[-]ACT|/[-]HIDE|/MBR|/DISKWIPE|/BATCH]
Copyright (C) 1998-2002 Symantec Corp. All rights reserved. 2003.775
==============================================
The numbers after "All rights reserved." is the Ghost version of GDisk. In this example, this version of Ghost is Norton Ghost 2003.
GDisk /? /CRE
This command displays the command line format for the /CRE operation. The /CRE command creates fixed disk partitions and logical drives.
General command:
GDISK disk /CRE {/PRI|/EXT|/LOG} [/SZ:{mbytes|pcent{P|%}}] [/END] [/FOR [/Q] [/V[:label]]] [/-32] [/NTFAT16] [/X] [/I] [/S] [/Y] [/R]
| disk | The physical fixed disk (1-8). |
| /CRE | Create a DOS partition or logical DOS drive. |
| /PRI | Create a primary DOS partition. |
| /EXT | Create an extended DOS partition. |
| /LOG | Create a logical DOS drive in the extended DOS partition. |
| /SZ:pcent[P|%} | Specifies the size of the partition as a percentage of the disk size, e.g. /SZ:50P will create a partition using half the disk. |
| /END | Create new partition at the end of free space. |
| /FOR | Format the new partition once it has been created. |
| /Q | Perform a quick format on the new partition. |
| /V[:label] | Specifies the volume label. Default is no label. |
| /-32 | Ignore large-disk support (FAT32). Limits maximum size of new primary DOS partitions and logical DOS drives to 2048 MB. |
| /-NTFAT16 | Ignore large-disk support (FAT32). Limits maximum size of new primary DOS partitions and logical DOS drives to 4097 MB. Only Windows NT will be able to access drives with sizes between 2048 and 4097 MB when FAT32 support is disabled. |
| /X | Ignore extended disk-access support. |
| /I | Ignore direct IDE disk-access support. |
| /S | Ignore direct SCSI disk-access support. |
| /Y | Suppress prompting to confirm you that wish the action to be performed. /SURE has the same meaning. |
| /R | Reboot after execution of command. |
GDisk /? /DEL
This command displays the command-line format for the /DEL operation. The /DEL command deletes fixed disk partitions and logical drives.
General command:
GDISK disk /DEL {/PRI[:nth]|/EXT[:nth]|/LOG:nth|/P:partn-no|/ALL} [/X] [/I] [/S] [/Y] [/R] {[/QWIPE|/DODWIPE|/CUSTOMWIPE:passes]}
| disk | The physical fixed disk (1-8). |
| /DEL | Delete a DOS partition or logical DOS drive. |
| /PRI[:nth] | Delete the 'nth' primary DOS partition (1-n). Default is 1. |
| /EXT[:nth] | Delete the 'nth' extended DOS partition. Default is 1. |
| /LOG[:nth] | Delete the 'nth' logical DOS drive from the extended DOS partition (1-n). |
| /P:partn-no | Delete any partition. Use /STATUS to select the number of the partition to delete. |
| /ALL | Delete all partitions. |
| /QWIPE | Quick Wipe of the contents of the partition before delete. |
| /DODWIPE | Dod 5520.22-M STD Wipe of the contents of the partition before delete. |
| /CUSTOMWIPE:passes | Dod 5520.22-M STD Wipe of the contents of the partition for a custom amount of passes before delete. |
| /X | Ignore extended disk-access support. |
| /I | Ignore direct IDE disk-access support. |
| /S | Ignore direct SCSI disk-access support. |
| /Y | Suppress prompting to confirm you wish the action to be performed. /SURE has the same meaning. |
| /R | Reboot after execution of command. |
GDisk /? /STATUS
This command displays the command-line format for the /STATUS operation. The /STATUS command displays information about fixed disk partitions.
General command:
GDISK [disk] [/STATUS] [/RAW|/LBA] [/SER] [/X] [/I] [/S] [/Y] [/R]
| disk | The physical fixed disk (1-8). Default is to list all fixed disks. |
| /STATUS | Display partition information. Default mode. |
| /RAW | Display raw contents of partition table. |
| /LBA | Display raw contents of partition table using Logical Block Addressing. |
| /SER | Display serial number of disk instead of model. |
| /X | Ignore extended disk-access support. |
| /I | Ignore direct IDE disk-access support. |
| /S | Ignore direct SCSI disk-access support. |
| /Y | Suppress prompting to confirm that you wish the action to be performed. /SURE has the same meaning. |
| /R | Reboot after execution of command. |
GDisk /? /ACT
This command displays the command line format for the /ACT operation. The /ACT command Activates a partition. The /-ACT command deactivates the partition.
General command:
GDISK disk /[-]ACT /P:partn-no [/X] [/I] [/S] [/Y] [/R]
| disk | The physical fixed disk (1-8). Default is to list all fixed disks. |
| /ACT | Activate the partition. |
| /-ACT | Deactivate the partition. |
| /P:partn-no | The number of the partition to activate/deactivate. Use /STATUS to select the partition number. |
| /X | Ignore extended disk-access support. |
| /I | Ignore direct IDE disk-access support. |
| /S | Ignore direct SCSI disk-access support. |
| /Y | Suppress prompting to confirm that you wish the action to be performed. /SURE has the same meaning. |
| /R | Reboot after execution of command. |
GDisk /? /HIDE
This command displays the command line format for the /HIDE operation. The /HIDE command hides a regular partition or unhides a hidden partition.
General command:
GDISK disk /[-]HIDE /P:partn-no [/X] [/I] [/S] [/Y] [/R]
| disk | The physical fixed disk (1-8). |
| /HIDE | Hide a partition. |
| /-HIDE | Unhide a partition. |
| /P:partn-no | The number of the partition to hide/unhide. Use /STATUS to select the partition number. |
| /X | Ignore extended disk-access support. |
| /I | Ignore direct IDE disk-access support. |
| /S | Ignore direct SCSI disk-access support. |
| /Y | Suppress prompting to confirm you wish the action to be performed. /SURE has the same meaning. |
| /R | Reboot after execution of command. |
Gdisk /? /MBR
This command displays the command line format for the /MBR operation. The /MBR command rewrites the boot code in the Master Boot Record by overwriting it.
Although reinitializing (writing over) the Master Boot Record (MBR) does not alter the disk's partition information, it can be destructive if other software has written information into the MBR. Typical programs that use space in the MBR include drive translation software such as OnTrack's Disk Manager, or boot managers, such as OS/2's Boot Manager. These types of utility programs are known by various names, such as disk extender, drive overlay, and operating system loader.
CAUTION: Do not use the /MBR switch on a disk that is using drive translation software installed to the MBR. Writing over the translation software makes the partition data inaccessible unless the drive translation software can be successfully reinstalled.
The most common reason to use this command is to write over a boot sector virus. This destroys the virus that is residing in the MBR. This command does not prevent reinfection of the MBR.
General command:
GDISK disk /MBR [/WIPE] [/X] [/I] [/S] [/Y] [/R]
| disk | The physical fixed disk (1-8). |
| /MBR | Reinitialize the Master Boot Record. |
| /WIPE | Delete all partitions and logical DOS drives. Default is to leave existing partitions unmodified. |
| /X | Ignore extended disk-access support. |
| /I | Ignore direct IDE disk-access support. |
| /S | Ignore direct SCSI disk-access support. |
| /Y | Suppress prompting to confirm that you wish the action to be performed. /SURE has the same meaning. |
| /R | Reboot after execution of command. |
GDisk /? /DISKWIPE
This command displays the command line format for the /DISKWIPE operation. The /DISKWIPE command wipes out all information on the hard disk.
CAUTION: The /DISKWIPE command wipes out the entire contents of the physical disk. Make sure that you specify the correct fixed physical disk before proceeding. You can use the /STATUS command with a disk number to check the identity of the fixed disk that you specify.
General command:
GDISK disk /DISKWIPE [/DOD|CUSTOM:passes] [/X] [/I] [/S] [/Y] [/R]
| disk | The physical fixed disk (1-8). |
| /DISKWIPE | Wipes the contents of the whole disk. |
| /DOD | DoD 5200.28-M STD Wipe of the contents of the whole disk. |
| /CUSTOM:passes | DoD 5200.28-M STD Wipe of the contents of the whole disk. |
| /X | Ignore extended disk-access support. |
| /I | Ignore direct IDE disk-access support. |
| /S | Ignore direct SCSI disk-access support. |
| /Y | Suppress prompting to confirm that you wish the action to be performed. /SURE has the same meaning. |
| /R | Reboot after execution of command. |
GDisk /? /BATCH
The batch mode switch, /BATCH, allows GDisk to perform multiple operations with a single command. The operations can be specified interactively at a DOS command-line, or they can be supplied in advance in a text file.
GDisk's batch mode uses the following command line format:
GDISK [disk] /BATCH[:filename] [switch[switch...]]
| disk | Tells GDisk which fixed physical disk (1 through 8) the commands apply to). |
| /BATCH | Tells GDisk that it will be executing multiple GDisk commands. This command is optional. |
| /FILENAME | Provides GDisk with the name of the text file that includes multiple GDisk commands. If no file name is provided, GDisk prompts the user (interactively) for the command line parameters. |
| /SWITCH | Lists the command line parameters (switches). If the command-line calls a batch file, the switches specified on the command line are run after running the commands contained in the batch file. |
GDisk32
General information:
- GDisk32 is a 32 bit program that can be run from within a DOS virtual machine.
- Use this version when you want to run GDisk from within Windows.
- Not all GDisk command-line switches can be run with GDisk32.
- GDisk32.exe conforms to most current US Department of Defense (DoD) specifications.
Use GDisk32.exe for:
- Unhiding a partition that the Windows NT or Windows 2000 Disk Manager cannot see.
- Activating a diagnostic or recovery partition.
- Adding or removing an operating system from the Windows NT or Windows 2000 Boot Menu. GDisk32.exe includes a new switch, -BOOTINI, for adding or removing entries from the Windows NT or Windows 2000 file Boot.ini. That is, when you use the -BOOTINI switch to add or remove entries from the Windows Boot.ini file, you change which operating systems are available on the Windows Boot Menu. For instance, if you installed Windows 98 to the computer and then Windows 2000, the Windows 2000 boot menu might not display Windows 98. Use -BOOTINI to add the Windows 98 partition to the file Boot.ini.
Displaying GDisk32 help
General help is available by using the ? switch:
Help on a particular operation is available by using the switch for the operation without additional parameters. The format of this command is:
For instance, the following command displays information regarding deleting partitions:
Switches for GDisk32 operations
Here are the GDisk32 switches, as provided by the Gdisk32 /? <operation> command.
Gdisk32 /?
The following is the screen displayed when running
gdisk32 /? from the command line prompt within Windows:
==============================================
C:\>Program Files\Symantec\Norton Ghost 2003>gdisk32 /?
GDISK32 Fixed Disk Partitioning Utility
GDISK32 [disk] [/STATUS] [/RAW|/LBA] [/SER] [/X] [/I] [/S] [/Y] [/R]
GDISK32 disk /[-]ACT /P:partn-no [/X] [/I] [/S] [/Y] [/R]
GDISK32 disk /[-]HIDE /P:partn-no [/X] [/I] [/S] [/Y] [/R]
GDISK32 /BOOTINI {/ADD|/REMOVE|/DEFAULT} [/D:disk-no] [P:partn-no] [DESC:desc] [/ENTRY:no] [/TIMEOUT:sec] [/INIFILE:filename] [/BSECTFILE:filename] [/WINNT [/SYSFOLDER:folder]] [/R]
GDISK32 [disk] /BATCH[:filename] [switch[switch...]]
GDISK32 /? [/STATUS|/[-]ACT|/[-]HIDE|/BOOTINI|/BATCH]
Copyright (C) 1998-2002 Symantec Corp. All rights reserved. 2003.775
==============================================
GDisk32 /? /STATUS
This command displays the command-line format for the /STATUS operation. The /STATUS command displays information about fixed disk partitions.
General command:
GDISK32 [disk] [/STATUS] [/RAW|/LBA] [/SER] [/X] [/I] [/S] [/Y] [/R]
| disk | The physical fixed disk (1-8). Default is to list all fixed disks. |
| /STATUS | Display partition information. Default mode. |
| /RAW | Display raw contents of partition table. |
| /LBA | Display raw contents of partition table using Logical Block Addressing. |
| /SER | Display serial number of disk instead of model. |
| /X | Ignore extended disk-access support. |
| /I | Ignore direct IDE disk-access support. |
| /S | Ignore direct SCSI disk-access support. |
| /Y | Suppress prompting to confirm that you wish the action to be performed. /SURE has the same meaning. |
| /R | Reboot after execution of command. |
GDisk32 /? /ACT
This command displays the command line format for the /ACT operation. The /ACT command Activates a partition. The /-ACT command deactivates the partition.
General command:
GDISK32 disk /[-]ACT /P:partn-no [/X] [/I] [/S] [/Y] [/R]
| disk | The physical fixed disk (1-8). |
| /ACT | Activate the partition. |
| /-ACT | Deactivate the partition. |
| /P:partn-no | The number of the partition to activate/deactivate. Use /STATUS to select the partition number. |
| /X | Ignore extended disk-access support. |
| /I | Ignore direct IDE disk-access support. |
| /S | Ignore direct SCSI disk-access support. |
| /Y | Suppress prompting to confirm that you wish the action to be performed. /SURE has the same meaning. |
| /R | Reboot after execution of command. |
GDisk32 /? /HIDE
This command displays the command line format for the /HIDE operation. The /HIDE command hides a regular partition or unhides a hidden partition.
General command:
GDISK32 disk /[-]HIDE /P:partn-no [/X] [/I] [/S] [/Y] [/R]
| disk | The physical fixed disk (1-8). |
| /HIDE | Hide a partition. |
| /-HIDE | Unhide a partition. |
| /P:partn-no | The number of the partition to hide/unhide. Use /STATUS to select the partition number. |
| /X | Ignore extended disk-access support. |
| /I | Ignore direct IDE disk-access support. |
| /S | Ignore direct SCSI disk-access support. |
| /Y | Suppress prompting to confirm that you wish the action to be performed. /SURE has the same meaning. |
| /R | Reboot after execution of command. |
GDisk32 /? /BOOTINI
This command displays the command line format for the /BOOTINI operation. The /BOOTINI command modifies the boot.ini file on Windows NT and 2000 platforms.
General command:
GDISK32 /BOOTINI {/ADD|/REMOVE|/DEFAULT} [/D:disk-no] [P:partn-no] [DESC:desc] [/ENTRY:no] [/TIMEOUT:sec] [/INIFILE:filename] [/BSECTFILE:filename] [/WINNT [/SYSFOLDER:folder]] [/R]
| /BOOTINI | Modifies boot.ini file. |
| /ADD | Creates a new entry in boot.ini file. |
| /D:disk-no | The physical fixed disk (1-8). |
| /P:partn-no | The number of the partition to boot from. |
| /INIFILE:filename | Full path and filename for boot.ini file. Default is C:\boot.ini. |
| /BSECTFILE:filename | Boot sector file to create - e.g. C:\bsect.dat. Default is C:\<desc without invalid chars>.dat (8.3). |
| /WINNT | Adds entry to boot another NT/2000 system, e.g., multi(x)disk(y)rdisk(z)partition(w)\<sysfolder>. |
| /SYSFOLDER:folder | Windows system folder on NT/2000 system to boot from. Default is WINNT, which is the standard location. |
| /R | Reboot after execution of command. |
Command line for removing an entry from boot.ini:
GDISK32 /BOOTINI /REMOVE /ENTRY:no [/INIFILE:filename] [/R]
| /REMOVE | Removes entry from boot.ini file. |
| /ENTRY:no | ID of entry to be removed from boot.ini file. |
Command line for setting default boot option and timeout:
GDISK32 /BOOTINI /DEFAULT [/ENTRY:no] [/TIMEOUT:sec] [/INIFILE:filename] [/R]
| /DEFAULT | Sets default boot option and timeout. |
| /ENTRY:no | ID of entry to be set as default boot option. |
| /TIMEOUT:sec | Seconds before the default boot option is selected. |
GDisk32 /? /BATCH
The batch mode switch, /BATCH, allows GDisk32 to perform multiple operations with a single command.
GDisk32's batch mode uses the following command-line format:
GDISK32 [disk] /BATCH[:filename] [switch[switch...]]
| disk | Tells GDisk32 which fixed physical disk (1 through 8) the commands apply to). |
| /BATCH | Tells GDisk32 that it will be executing multiple GDisk32 commands. This command is optional. |
| /FILENAME | Provides GDisk32 with the name of the text file that includes multiple GDisk32 commands. If no filename is provided, GDisk32 prompts the user (interactively) for the command-line parameters. |
| /SWITCH | Lists the command-line parameters (switches). If the command-line calls a batch file, the switches specified on the command-line are run after running the commands contained in the batch file. |
References:
Introduction to GDisk
Switches: GDisk
Document ID: 2002112213111525
Last Modified: 11/03/2004
Date Created: 11/22/2002
Operating System(s): DOS, Windows 95, Windows 98, Windows ME, Windows NT, Windows 2000, Windows XP
Product(s): Norton Ghost 2003