BSD disklabel


In BSD-derived computer operating systems and in related operating systems such as SunOS, a disklabel is a record stored on a data storage device such as a hard disk that contains information about the location of the partitions on the disk. Disklabels were introduced in the 4.3BSD-Tahoe release. Disklabels are usually edited using the utility. In later versions of FreeBSD, this was renamed as.

Where disklabels are stored

Traditionally, the disklabel was the first sector of the disk. However, this system only works when the only operating systems that access the disk are Unix systems that comprehend disklabels. In the world of IBM PC compatibles, disks are usually partitioned using the PC BIOS's master boot record Partition Table scheme instead, and the BSD partitioning scheme is nested within a single, primary, MBR partition. Sometimes, the primary MBR partitions are referred to as slices and the subdivisions of a primary MBR partition that are described by its disklabel are called partitions. The BSD disklabel is contained within the volume boot record of its primary MBR partition.
The MBR partition IDs for primary partitions that are subdivided using BSD disklabels are , , , and .
This format has a similar goal as the extended partitions and logical partition system used by MS-DOS, Windows and Linux.
The same PC hard drive can have both BSD disklabel partitions and the MS-DOS type logical partitions in separate primary partitions. FreeBSD and other BSD operating systems can access both the BSD disklabel subdivided partition and the MS-DOS type Extended/Logical partitions.

The contents of disklabels

BSD disklabels traditionally contain 8 entries for describing partitions. These are, by convention, labeled alphabetically, 'a' through to 'h'. Some BSD variants have since increased this to 16 partitions, labeled 'a' through to 'p'.
Also by convention, partitions 'a', 'b', and 'c' have fixed meanings: