Fixed disks have another layer of organization beyond the logical volume structure already discussed: partitions. The FDISK utility divides a fixed disk into one or more partitions consisting of an integral number of cylinders. Each partition can contain an independent file system and, for that matter, its own copy of an operating system.
The first physical sector on a fixed disk (track 0, head 0, sector 1) contains the master boot record, which is laid out as follows:
Bytes Contents
000—1BDH Reserved
1BE—1CDH Partition #1 descriptor
1CE—1DDH Partition #2 descriptor
1DE—1EDH Partition #3 descriptor
1EE—1FDH Partition #4 descriptor
1FE—1FFH Signature word (AA55H)
The partition descriptors in the master boot record define the size, location, and type of each partition, as follows:
Byte(s) Contents
00H Active flag (0 = not bootable, 80H = bootable)
01H Starting head
02H—03H Starting cylinder/sector
04H Partition type
00H not used
01H FAT file system, 12-bit FAT entries
04H FAT file system, 16-bit FAT entries
05H extended partition
06H "huge partition" (MS-DOS versions 4.0 and later)
05H Ending head
06H—07H Ending cylinder/sector
08H—0BH Starting sector for partition, relative to beginning of
disk
0CH—0FH Partition length in sectorsThe active flag, which
indicates that the partition is bootable, can be set on
only one partition at a time.
MS-DOS treats partition types 1, 4, and 6 as normal logical volumes and assigns them their own drive identifiers during the system boot process. Partition type 5 can contain multiple logical volumes and has a special extended boot record that describes each volume. The FORMAT utility initializes MS-DOS fixed-disk partitions, creating the file system within the partition (boot record, file allocation table, root directory, and files area) and optionally placing a bootable copy of the operating system in the file system.
Figure 10-11 contains a partial hex dump of a master block from a fixed disk formatted under PC-DOS version 3.3. This dump illustrates the partition descriptors for a normal partition with a 16-bit FAT and an extended partition.
0000 .
.
.
0180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 01
01C0 01 00 04 04 D1 02 11 00 00 00 EE FF 00 00 00 00
01D0 C1 04 05 04 D1 FD 54 00 01 00 02 53 00 00 00 00
01E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA
Figure 10-11. A partial hex dump of a master block from a fixed disk formatted under PC-DOS version 3.3. This disk contains two partitions. The first partition has a 16-bit FAT and is marked "active" to indicate that it contains a bootable copy of PC-DOS. The second partition is an "extended" partition. The third and fourth partition entries are not used in this example.