Panel For Example Panel For Example Panel For Example

Disk Fundamentals: Layout and Sector Numbering

Author : Adrian September 09, 2025

1. Basics

An entire disk typically contains multiple platters. Concentric circles along the platter radius are called tracks. Each track is divided into many wedge-shaped areas called sectors (a sector is the smallest unit that can be read from or written to a disk, typically 512 bytes). Tracks at the same radius on different platters form a cylinder. These are physical disk concepts useful for understanding capacity and addressing.

Disk capacity = number of heads × number of tracks (cylinders) × sectors per track × bytes per sector

Head: each platter generally has two surfaces, each served by one head, so each platter contributes two heads. The head number indicates which surface contains the data.

Track: tracks are numbered from the outermost track inward, starting at track 0. Concentric circles near the spindle are used for head parking and do not store data.

Cylinder: equal to the number of tracks per surface. Tracks at the same radius across all platters form a cylinder.

Sector: each track is divided into sectors; the number of sectors is the same for every track on the same disk format.

Platter: the number of physical platters in the disk.

Disk layout diagram:

Disk layout diagram

2. Calculating Relative Sector Numbers

Example: a 3.5" 1.44 MB floppy has two heads (one for each side), 80 tracks per side, 18 sectors per track, and 512 bytes per sector.

Floppy capacity = 512 bytes/sector × 2 sides × 80 tracks/side × 18 sectors/track = 1,440 KB

Head numbers: [0, 1]

Track (cylinder) numbers: [0, 79]

Sector numbers: [1, 18]

Relative sector numbers: [0, 2879]. Relative sector numbering proceeds by cylinder: from the outermost cylinder to the innermost.

For cylinder 0, head 0, sectors 1–18 correspond to relative sectors 0–17; cylinder 0, head 1, sectors 1–18 correspond to relative sectors 18–35; then cylinder 1, cylinder 2, … up to cylinder 79.

(1) From cylinder, head, sector to relative sector number

For this floppy format, each cylinder contains 2 heads × 18 sectors = 36 sectors. If the relative sector number is N, then:

CH = N / 36

x = N % 36

DH = x / 18

y = x % 18

CL = y + 1

Equivalently, N = 36 × CH + 18 × DH + CL

(2) From relative sector number to cylinder, head, sector

Given N:

CH = N / 36

DH = (N % 36) / 18

CL = (N % 36) % 18 + 1

3. Boot Information on the Disk

The disk's first sector is the Boot Sector. It consists of three parts: the MBR (Master Boot Record), the DPT (Disk Partition Table), and the Boot Record ID.

MBR (master boot record) occupies the first 446 bytes of the boot sector (offsets 0–0x1BD). It stores the primary boot code responsible for loading and transferring control to the boot loader in the active partition.

DPT (disk partition table) occupies 64 bytes (offsets 0x1BE–0x1FD) and records basic partition information. The partition table contains four entries of 16 bytes each, so there can be up to four primary partitions.

Boot Record ID occupies two bytes (offsets 0x1FE–0x1FF). For a valid boot sector this value equals 0xAA55, which is used to verify the boot sector's validity.