Partition Layout

Previous  Top  Next

Partitions are an important issue when it comes to hard drives and operating systems. They allow a person to break down a single hard drive into multiple areas that look like smaller hard drives. This is accomplished by reserving the very first sector on the hard drive for a Partition Table. Different Partitions can have, for example, different operating systems on each, so that, by way of an intelligent boot-loader (in the MBR) you can select which operating system to run.

FDISK is the program that controls partition layout. It creates and updates all partition sectors. The primary purpose of a partition sector is to hold a partition table. The rules for how FDISK works are unwritten but so far most FDISK implementations (DOS, OS/2, WinNT, Linux, etc) seem to follow the same basic idea. All partition table sectors have the same format. This includes the partition table embedded in the Master Boot Record (MBR) at cylinder 0, head 0, sector 1.

There are four partition entries per partition table. Each partition entry is 16 bytes and contains the start and end location of the partition in CHS, the start in LBA, the size in sectors, the partition type and the "active" flag. The CHS fields are in Logical CHS format.

Note: When your computer boots itself, the BIOS uses only the CHS fields of the partition entry. This is one of the main reasons that LBA DOES NOT SOLVE the >528 MB problem.

In the MBR there can be 0-4 "primary" partitions, OR, 0-3 primary partitions and 0-1 extended partition entry. In an extended partition there can be 0-1 "secondary" partition entries and 0-1 extended partition entries. Only 1 primary partition in the MBR can be marked "active" at any given time.

In most versions of FDISK, the first sector of a partition will be aligned such that it is at head 0, sector 1 of a cylinder. This means that there may be unused sectors on the track(s) prior to the first sector of a partition and that there may be unused sectors following a partition table sector.

For example, most new versions of FDISK start the first partition (primary or extended) at cylinder 0, head 1, sector 1. This leaves the sectors at cylinder 0, head 0, sectors 2...n as unused sectors. This same layout may be seen on the first track of an extended partition.

Also note that software drivers like Ontrack's Disk Manager depend on these unused sectors because these drivers will "hide" their code there (in cylinder 0, head 0, sectors 2...n). This is also a good place for boot sector virus programs to hang out. The partition table entries (slots) can be used in any order. Some versions of FDISK fill the table from the bottom up and some versions of FDISK fill the table from the top down. Deleting a partition can leave an unused entry (slot) in the middle of a table.

There is no central clearing house to assign the codes used in the one byte "Partition Type" field. But codes are assigned (or used) to define most every type of file system that anyone has ever implemented on the 80x86 PC. SMARTMon recognizes the following types:

Partition Types

0x01 Primary DOS 12-bit FAT
0x02 Xenix / file system
0x03 Xenix /usr file system
0x04 Primary DOS 16-bit FAT
0x05 Extended DOS
0x06 Primary big DOS >32Mb
0x07 OS/2 HPFS, NTFS, QNX or Advanced Unix
0x08 AIX boot partition
0x09 AIX file system partition or Coherent
0x0A OS/2 Boot Manager or Coherent
0x0B DOS or Windows 95 with 32-bit FAT
0x0C DOS or Windows 95 with 32-bit FAT, LBA
0x0E Primary big DOS >32Mb LBA
0x0F Extended DOS, LBA
0x10 OPUS
0x11 DOS 12-bit FAT Hidden Partition
0x12 Compaq Configuration Partition
0x14 DOS 16-bit FAT <32Mb Hidden
0x16 DOS 16-bit FAT >=32Mb Hidden
0x17 OS/2 HPFS Hidden
0x18 AST Windows swap file
0x19 Willowtech Photon coS
0x1B WIN95 OSR2 32-bit FAT Hidden
0x1C WIN95 OSR2 32-bit FAT, LBA, Hidden
0x1E FAT95 Hidden
0x20 Willowsoft Overture File system
0x21 FSo2 Oxygen File system
0x22 Extended Oxygen File system
0x24 NEC DOS 3.x
0x38 THEOS ver 3.2 2Gb Partition
0x39 THEOS ver 4 Spanned Partition
0x3A THEOS ver 4 4Gb Partition
0x3B THEOS ver 4 Extended Partition
0x3C Partition magic Recovery Partition
0x40 VENIX 286
0x41 PPC PReP Boot
0x42 SFS (Secure File System)
0x4d QNX 4.x
0x4e QNX 4.x 2nd part
0x4f QNX 4.x 3rd part
0x50 OnTrack DM
0x51 OnTrack DM6 Aux (51)
0x52 CP/M or Microport SysV/AT
0x53 OnTrack DM6 Aux (53)
0x54 OnTrack DM6
0x55 EZ-Drive
0x56 GoldenBow VFeature
0x5c Priam EDisk
0x61 Speedstor
0x63 ISC Unix, System V/386, GNU HURD or Mach
0x64 Novell Netware 2.xx
0x65 Novell Netware 3.xx
0x70 DiskSecure Multi-Boot
0x80 Minix 1.1 -> 1.4a
0x81 Minix 1.4b -> 1.5.10
0x82 Linux Swap
0x83 Linux File system
0x84 OS/2 type 04 hidden DOS C:
0x85 Linux extended
0x86 NTFS volume set (type 86)
0x87 NTFS volume set (type 87)
0x8e Linux LVM
0x93 Amoeba File system
0x94 Amoeba Bad Block Table
0x9f BSD/OS
0xa0 IBM Thinkpad
0xA5 FreeBSD/NetBSD/386BSD
0xA6 OpenBSD
0xB7 BSDI BSD/386 File system
0xB8 BSDI BSD/386 swap
0xBB Boot Wizard
0xC1 DR-DOS 6.0 secured 12-bit FAT partition
0xC4 DR-DOS 6.0 secured 16-bit FAT partition
0xC6 DR-DOS 6.0 secured Huge partition
0xC7 Syrinx
0xDA Non FS data
0xDB Concurrent CPM, C.DOS, CTOS
0xDE Dell Utility
0xDF BootIt
0xE1 DOS Access
0xE3 DOS R/O
0xE4 SpeedStor
0xF1 SpeedStor
0xF2 DOS 3.3+ Secondary
0xF4 SpeedStor
0xFD Linux RAID Auto
0xFE LANstep
0xFE LANstep
0xFF Xenix Bad Block Table

Any other partition type is labeled "Unknown".