Difference between revisions of "Fdisk"

From Lo-tech Wiki
Jump to navigation Jump to search
m (2 revisions: Import from Turnkey Appliance)
 
m (1 revision imported)
 
(No difference)

Latest revision as of 11:11, 21 April 2021

The MS-DOS FDISK utility appeared with MS-DOS 2.0, the first version of MS-DOS to support Fixed Disks. The utility was provided with all versions of MS-DOS (and Windows 95 and 98) for partitioning fixed disks.

With MS-DOS, a disk must be partitioned with FDISK before it can be formatted, even if the disk is to be used as a single volume.

Version History

  • MS-DOS 2.x - First DOS version to support hard drives. Maximum partition size - 16MB.
  • MS-DOS 3.2 - Maximum partition size - 32MB No extended partitions supported.
  • MS-DOS 3.3 - Maximum partition size - 32MB First DOS version to allow Extended DOS Partitions. Maximum number of partitions - 24 (C: through Z:)
  • MS-DOS 4.x - Maximum partition size - 2.1GB Maximum number of partitions - 24
  • MS-DOS 5.x - Same as DOS 4, but now handles up to 8 physical drives
  • MS-DOS 6.x - Same as DOS 5
  • Windows 95 - (MS-DOS 7) Basically the same as DOS 4/5/6, but added partition types (seen as NON-DOS partitions by earlier DOS versions):
  • Windows 95 OSR2 - Added support for FAT32 and 2 more new partition types (seen as NON-DOS partitions by earlier DOS versions and Windows 95 versions):

MS-DOS Partition Rules

  • The first physical drive must be the boot drive
  • The first physical drive must contain a primary DOS partition, and the primary partition must be the first partition on the drive
  • A drive can have only one primary DOS partition
  • The partition must be active in order to boot
  • Only partitions on drive 1 can be made active
  • Only drive 1 has to have a primary partition
  • Additional drives may be defined either as primary or as extended partitions
  • In addition to, or instead of, a primary partition, a drive may also have one extended partition
  • All volumes in extended partitions must further be defined in FDISK as logical DOS volumes.
  • DOS assigns drive letters first to all primary partitions in order, starting with the letter C, and then to all logical volumes in extended partitions (drive letters A and B are reserved for Floppy Disk Drives
  • Existing partitions must be deleted with FDISK before new partitions can be defined
  • FDISK from MS-DOS 4.01 and earlier will not remove NON-DOS partitions

Considerations for Large Drives

DOS 6.22 FDISK does not support drives over 8.4GB - total drive size will be shown as 7553MB or 8025MB (or some similar value), depending on the BIOS. Also, it cannot correctly display the size of large drives - is limited to 4 characters (9999MB).

Windows 95 FDISK

Original Release and 95A

Windows 95 FDISK does support drives over 8.4GB, but is still limited:

  • For drives over 8.4GB, the BIOS must support INT13 Extensions
  • If FDISK is started with /X option, it will be limited to 8.4GB total size and 0E or 0F partition types will not be used
  • Large drives will still be displayed as 9999MB
  • FDISK will see only 8.4GB of a drive larger than 8.4GB if FDISK is used in a DOS window or through the Run box on the Start menu - to correctly set up a drive larger than 8.4GB, FDISK must be run in DOS mode (booting to "Command Prompt Only" from the Startup menu, or choosing "Restart in MS-DOS Mode" from the Shutdown menu, or via a WIN95 startup disk).

Windows 95 OSR2

  • Support added for FAT 32, which allows single partitions up to 2 terabytes (2000 gigabytes)
  • It will always first ask "Do you wish to enable large disk support?" - answering Yes simply enables FAT32.
  • The /X option limits FDISK to 8.4GB total size, even if answering YES to "Do you wish to enable large disk support?"
  • FAT32 can be used on any drive over 512MB.

The problems with displaying the size correctly are fixed in the WIN95B version of FDISK. However, the FORMAT command, which also does not display large sizes correctly, was not fixed (nor in Windows 98).

The problem with FDISK not seeing drive capacity beyond 8.4GB in a DOS window is fixed.

* Remote * in Volume Label field in FDISK

In some cases, if an existing logical drive is not recognized, FDISK will show * Remote * in the Volume Label field for that drive. This can occur if a logical drive is not recognized by FDISK for some reason and if another drive (such as a CD-ROM, RAMDRIVE or network drive) is using the drive letter that the logical drive would have been assigned.

One reason that a logical drive might not be recognized is if the partition type may not be valid for that version of FDISK. For example, a logical drive might show up normally in Windows 98 GUI mode, but the drive label field might show * Remote * in FDISK in full DOS mode (with a RAMDRIVE loaded).

In such case, when booting to Safe mode/Command prompt only, FDISK would show the partition but without the volume label and the drive would not be accessible. The * Remote * string in the Volume label field is not meant as a volume label but is meant to indicate that FDISK thinks this drive maybe a network drive.

FDISK Switches

/MBR

Recreates the Master Boot Record on disk 1 - useful if a virus has infected the Master Boot Record as this can wipe-out the virus.

FDISK does not build an MBR on any drive except the primary master. FDISK will only create an MBR on the primary master drive if the drive does not already have a valid MBR. The 55AAh signature at the end of the sector is checked by FDISK, if not present the MBR is written. Also if the drive is blank, an MBR is written.

/STATUS

Displays partition information without starting FDISK and navigating thorough the menus. This works with MS-DOS version 5.00and higher. The first sector on the hard drive, (cylinder 0, head 0, sector 1) contains the master partition boot record. This 512-byte sector contains the partition loader and the partition table. At bootup, the BIOS loads the partition loader, the partition loader loads the bootstrap loader for the bootable partition and the bootstrap loader loads the operating system.

/PRI

Create primary partition. Partition is set to active Create a primary partition on disk number <disk> with the size of <size>. The partition is set to active.

FDISK /PRI:<size> <disk>

If <size> is larger than the space on the HD all space is used for the primary partition.

/PRIO

Create primary partition with FAT16/FAT32 override. Partition is set to active. Works as /PRI.

/EXT

Create extended partition.

Create an extended partition (to hold logical drives) on disk number <disk> with the size of <size>:

FDISK /EXT:<size> <disk>

If <size> is larger than remaining free space, all free space is used. That is, you don’t have to know the exact remaining size in order to use this switch.

/LOG

Create a logical drive. With /LOG, a logical drive is created of size <size>. /LOG must be used together with /EXT:

FDISK /EXT:<size> <disk> /LOG:<size>

(<size> must be the same for both switches, and <size> must be smaller or equal to free space.)

Create a logical drive with FAT16/FAT32 override. Works as /LOG.

/FPRMT

Prompt for FAT32/FAT16 in interactive mode. With /FPRMT, the FDISK startscreen is surpressed (and hence there is no prompt to enable support for large disks). Instead, FDISK prompts for FAT16/FAT32 each time a partition is created.

FDISK /FPRMT

/X

Do not use LBA partitions.

FDISK /X

/CMBR

Recreate Master Boot Record on specified disk. Works as /MBR with the exception that the disk on which to recreate the MBR must be specified:

FDISK /CMBR <disk>

It appears that /PRI and /LOG create FAT32 partitions if they are larger than 512MB (and FAT16 otherwise). /PRIO and /LOGO always create FAT16 partitions (in effect, like FDISK from DOS 5 or 6).

See Also