Partition Tables

This article is about the partitioning scheme that MS-DOS uses to keep track of it's partitions. This is the standard that all PC operation systems must use to be allowed to share hard disk resources with other operating systems.

Send me any questions, comments, or corrections. Chris Lattner



DOS keeps track of partitions with a "Master Partition Table" that it keeps at offset 1BEh in the disk's boot sector. It contains four 16 byte entries, one for each partition. Each entry is divided into ten fields that contain all of the information necessary to describe a partition on the hard drive, including:

See: Figure 1

Now the astute reader may say: "Wait a minute! On my machine I run DOS/Windows and OS/2. I have 5 DOS partitions. How can this be!"

Microsoft's solution to this problem was to invent the "Extended DOS" partition. If you go into FDISK, you will see that you have a "Primary" DOS partition, and an "Extended" DOS partition (Plus whatever else you have). You can also type in "UNFORMAT /PARTN /L" to get a list of all of your partitions. This clearly shows the chain format used.


Figure 1

Start End
BI HSC SI HSC SBNS
0h1h2h3h4h5h6h7h 8h9hAhBhChDhEhFh

This is repeated four times (one for each partition). Offsets are: 1BEh, 1CEh, 1DEh, and 1EEh. At offset 1FEh, AA55h signifies that the disk is bootable. The BIOS reads it in and executes it. See my article on Boot Sectors.

Key:


Copyright © 1994-8 Chris Lattner
Last modified: Monday, 21-May-2001 11:25:25 PDT