About fdisk

Information about the fdisk command

ABOUT FDISK

Fdisk is one of the more commonly used MS-DOS commands even today with Windows 95 and Windows 98. Fdisk allows the user to delete and/or create partitions on the hard disk drive.

MS-DOS 3.3x and below used fdisk.com
MS-DOS 4.x and above uses fdisk.exe

Additional information on how a hard disk drives and how they work, trouble shooting and more can be found on our hard disk drive page.


AVAILABILITY

The fdisk command is an external command that is available in the below Microsoft Operating Systems.

All Versions of MS-DOS
Windows 95
Windows 98
Windows ME

Windows 2000 and Windows XP users should see document CH000588 for information about setting up their disk drives in Windows and/or see the diskpart command information page.


COMMAND INFORMATION

SYNTAX

Configures a hard disk for use with MS-DOS.

FDISK [/STATUS] /X
/STATUS Displays partition information.
/X Ignores extended disk-access support (will not use LBA support). Use this switch if you receive one of the following symptoms:

Unable to access a drive from DOS versions prior to 7.
Disk access messages .
Stack overflow messages.
High amounts of data corruption.
Extra drive letters

 

SECRET FDISK SWITCHES

Disclaimer: Below is a listing of secret or undocumented MS-DOS fdisk commands and switches. Use these commands at your own risk.

Command Information
FDISK /MBR Command used to rewrite the Master Boot Record. See CH000175 for additional information.
FDISK /CMBR <DISK> Recreates the Master Boot Record on specified disk. Performs the same functions as FDISK /MBR except can be used on other disk drives.
FDISK 1/PRI:100 Creates a 100MB DOS partition on the hard drive.
FDISK 1/EXT:500 Creates a 500MB meg extended DOS partition on the hard drive.
FDISK 1/LOG:250 Creates a 250MB logical drives on the hard drive.
FDISK /Q Prevents fdisk from booting the system automatically after exiting fdisk.
FDISK /STATUS Shows you the current status of your hard drives.
FDISK /ACTOK Makes FDISK not check the disk integrity allowing the drives to be created faster.
FDISK /FPRMT Will not get the prompt for FAT32 support, in addition allows FDISK to be forced into using FAT32 on drives smaller then 540MB (by default FDISK will not use FAT32 on any drive smaller then 540MB). Finally this command can only be used with FDISK that supports FAT32.

EXAMPLES

Fdisk - This would get you into the fdisk option screen which you can see in the fdisk simulation, also keep in mind when deleting a partitions ANYTHING that is on that partition of the hard drive will be ERASED, also once the partition is delete it will not be redetected until you format that partition, so if you delete your primary partition which is the c: drive you will not be able to put anything on that drive or even read from that drive until it is formatted.

ADDITIONAL INFORMATION

FDISK SCRIPT FILE - Fdisk has the capability of being ran from an external file allowing you to quickly create and delete partitions through Fdisk. To do this create a file from the DOS edit command. The following are the steps required in generating this file.

Edit fdisk.scr - This will place you within the edit screen within this screen you will enter the commands you wish to be ran in fdisk. For example if you wish to run fdisk and display the partition information you would enter 4.

Because Fdisk requires you to press enter after you have chosen a selection you will need to press Ctrl + P and then press Ctrl + M which will create a music symbol which acts as a carriage return.

If you need to press the esc key you would use Ctrl + P and then press esc which would be represented as a backwards arrow.

When doing the commands to run FDISK all these must be on one line do not place each command on separate lines.

Once you have created the script file you can then type fdisk < fdisk.scr that will then execute the script file. If the script file encounters an error during its process you will need to recreate the script file where the mistake occurred.

TECHNICAL SUPPORT

Reference Issue / Question
HARD DRIVE Complete hard disk drive information and support
FAT32 Additional information and help with FAT32.
CHSIZE Unable to see full amount of hard drive.
CH000032 Only able to see 2 Gig partition/drive.
CH000175 Do you have any additional information on FDISK /MBR?
CH000226 Partition shows up as a MS-DOS partition.
CH000229 Invalid / Non System Disk error.
CH000231 Invalid media type reading drive C:
CH000340 No fixed disk present.
CH000344 How to delete a partition using fdisk.
CH000345 How to create a partition using fdisk.
CH000355 How to lock / unlock the hard disk drive.
CH000379 Error reading/writing fixed disk.
CH000431 How many partitions can DOS / Windows recognize.
CH000452 How to create a FAT32 partition.