Fdisk

Index

FDISK is a menu driven utility used to configure and/or display information about the partitions on a hard disk.

Before a hard disk can be recognised by DOS (or any other compatible operating system), a Master Boot Record (MBR) must be established. The MBR defines areas of the disk to be:

  • a Primary Partition and/or
  • an Extended Partition.

In turn, an Extended Partition has to be designated as containing one or more Logical Dos Drives.

FDISK is the MS-DOS utility used to create an MBR by defining the size and nature of a hard drive's partitions. See "Using FDISK - the screens" for a screen-by-screen review of the program.

CAUTION: Using FDISK to modify or delete partitions on a hard drive renders all the data associated with that partition unavailable - ie. deleted!

Syntax:

To run the FDISK utility:
FDISK [/X]

To display a summary of the partition structure on all hard drives:
FDISK [/STATUS]

To create partitions without going through the standard FDISK menus:
FDISK [/X] drive [/PRI:size] [/EXT:size] [/LOG:size] [/PRMT | /Q]

To rewrite the Master Boot Record of the primary drive without altering the partition table information:
FDISK /MBR

To rewrite the Master Boot Record of any drive (drive) without altering the partition table information:
FDISK /CMBR drive

/XIgnores extended disk-access support. This switch may be needed if disk access or stack overflow errors occur
/MBRRe-writes the Master Boot Record of the primary drive based on the current disk structure. This switch can be used to repair a Master Boot Record that has been corrupted or damaged.
/CMBR driveRe-writes the Master Boot Record of drive (if present) based on the current disk structure. This switch can be used to repair a Master Boot Record that has been corrupted or damaged. 1
/PRI: sizeCreates a Primary Partition.
/EXT: sizeCreates an Extended Partition.
/LOG: sizeCreates a Logical DOS Volume in the Extended Partition.
driveThe drive number.
sizeThe size of the partition (in Mb or as a percentage of the available space).
/PRMTPrompts for action
/QQuiet - no messages displayed during processing

Notes:

  1. FDISK will only allow the creation of one Primary Partition and one Extended Partition. The Extended Partition can contain up to 23 Logical Dos Volumes. Actually, the limit is set by the way that Dos assigns drives letters A: to Z:. Drives A: and B: are reserved for floppy drives, and drive C: for the primary partition on the first hard drive leaving 23 letters for other drives. If the computer has a second hard-drive, CD-ROM, or any other drives, the maximum number of logical drives should be reduced accordingly.

  2. The maximum partition size when using the FAT16 system is 2 Gb. Apparently the maximumum partition size when using the FAT32 system is 2000 Gb (not tested), BUT...

    According to MS Knowledge Base article Q246818, no version of Win95 has support for hard disks larger than 32 Gb. I am not clear on where the fractures show but MicroSoft's suggested workaround is to upgrade to Win98 or WinME.

    Another Knowledge Base article says that the version of FDISK distributed with Win98 and Win98SE will not correctly report the size of disks larger than 64 Gb. A patch is available for download that corrects this (see Q263044 for details). 2

  3. FDISK does not allow you to change the size of a partition or logical drive directly. Instead it is necessary to delete the partition/logical drive and then create a new one of the required size.

  4. Deleting a partition/logical drive will make all data on that partition/logical drive unavailable. However, data in other partitions/logical drives will not be affected.

  5. If the combined partition sizes are less than the total capacity of the disk, the disk will work just fine - but at the reduced capacity.

  6. If a partition/logical drive is specified that is greater than the available capacity, the size of the last partition/logical drive is automatically reduced to that of the available capacity.

  7. FDISK works only on hard disks physically installed on your computer. Fdisk does not work on a drive formed by using the SUBST command nor does it work on a network or an Interlnk drive.

  8. FDISK does not display information about compressed drives (these being, in reality, somewhat special hidden, read-only, system files). Furthermore, when a drive is compressed (using the Win95 Drivespace utility, at least) typically the compressed drive is given the letter of the old uncompressed drive, and the "host" drive is given a new letter. However, as far as FDISK is concerned, nothing has changed - ie. the new drive letter(s) are not recognised.

  9. FDISK assigns consecutive drive letters (starting with C:) according to the following hierarchy:
    1. Primary Partitions starting with Disk 1 and going down the list;
    2. Logical Dos Drives in Extended Partitions starting with the Drives on Disk 1 and going down the list.

    It is not possible to change this.

  10. The undocumented switches (/PRI, /EXT, and /LOG) can be used from the command line or in a batch file and could be useful if a number of new drives are to be prepared similarly.

  11. FDISK is not a particularly powerful utility in that the range of options offered is limited and there is not much scope for innovation. It is powerful in the sense that it can erase a lot of data very quickly!

File Details

File NameDefault LocationDos Ver.Win Ver.SizeDateSource
Fdisk.exec:\windows\command 7.0Win95 59 12811/07/95win95_02.cab
7.1Win95 (OSR2.x) 63 11624/08/96win95_02.cab
Win98 63 90011/05/98Base5.cab
Win98 SE 63 91623/04/99Base5.cab

Further Reference

Undocumented FDISK - Michael Jacobsen (1999). A good concise list of FDISK switches and how to use them.

Hard Disk Partitioning, Why and How(for MS-DOS/Windows PCs) - Stan Brown (1999). An excellent discussion of the reasons to partition (or not to partition) a hard drive.

See the Links page for leads to more general information on disk structure and partitioning.


1 Thanks to Douglas Fuller for his advice on the /CMBR switch
2 Thanks to Osmo Vuorio for pointing out the KB articles
If you should have any comments or suggestions,
please contact: Bob Watson
.
This page last revised:
November 1, 2000.