BSD disklabel
Encyclopedia
In BSD
Berkeley Software Distribution
Berkeley Software Distribution is a Unix operating system derivative developed and distributed by the Computer Systems Research Group of the University of California, Berkeley, from 1977 to 1995...

-derived computer
Computer
A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...

 operating systems (including NetBSD
NetBSD
NetBSD is a freely available open source version of the Berkeley Software Distribution Unix operating system. It was the second open source BSD descendant to be formally released, after 386BSD, and continues to be actively developed. The NetBSD project is primarily focused on high quality design,...

, OpenBSD
OpenBSD
OpenBSD is a Unix-like computer operating system descended from Berkeley Software Distribution , a Unix derivative developed at the University of California, Berkeley. It was forked from NetBSD by project leader Theo de Raadt in late 1995...

, FreeBSD
FreeBSD
FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...

 and DragonFly BSD
DragonFly BSD
DragonFly BSD is a free Unix-like operating system created as a fork of FreeBSD 4.8. Matthew Dillon, an Amiga developer in the late 1980s and early 1990s and a FreeBSD developer between 1994 and 2003, began work on DragonFly BSD in June 2003 and announced it on the FreeBSD mailing lists on July...

) and in related operating systems such as SunOS
SunOS
SunOS is a version of the Unix operating system developed by Sun Microsystems for their workstation and server computer systems. The SunOS name is usually only used to refer to versions 1.0 to 4.1.4 of SunOS...

, a disklabel is a record stored on a data storage device
Data storage device
thumb|200px|right|A reel-to-reel tape recorder .The magnetic tape is a data storage medium. The recorder is data storage equipment using a portable medium to store the data....

 such as a hard disk
Hard disk
A hard disk drive is a non-volatile, random access digital magnetic data storage device. It features rotating rigid platters on a motor-driven spindle within a protective enclosure. Data is magnetically read from and written to the platter by read/write heads that float on a film of air above the...

 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 disklabel utility. In later versions of FreeBSD this was renamed as bsdlabel.

Where disklabels are stored

Traditionally, the disklabel was the first sector of the disk. But 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 compatible
IBM PC compatible
IBM PC compatible computers are those generally similar to the original IBM PC, XT, and AT. Such computers used to be referred to as PC clones, or IBM clones since they almost exactly duplicated all the significant features of the PC architecture, facilitated by various manufacturers' ability to...

s, disks are usually partitioned using the PC BIOS
BIOS
In IBM PC compatible computers, the basic input/output system , also known as the System BIOS or ROM BIOS , is a de facto standard defining a firmware interface....

's MBR Partition Table
Master boot record
A master boot record is a type of boot sector popularized by the IBM Personal Computer. It consists of a sequence of 512 bytes located at the first sector of a data storage device such as a hard disk...

 scheme instead, and the BSD partitioning scheme is nested within a single, primary, MBR partition (just as the "extended" partitioning scheme is nested within a single primary partition with extended boot records). Sometimes (particularly in FreeBSD), the primary MBR partitions are referred to as slices and the subdivisions of a primary MBR partition (for the nested BSD partitioning scheme) that are described by its disklabel are called partitions. The BSD disklabel is contained within the volume boot record
Volume Boot Record
A volume boot record is a type of boot sector introduced by the IBM Personal Computer...

 of the primary MBR partition.

The MBR partition IDs for primary partitions that are subdivided using BSD disklabels are 0xA5 (386BSD and FreeBSD), 0xA6 (OpenBSD), and 0xA9 (NetBSD).

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:
  • Partition 'a' is the "root" partition, the volume from which the operating system is bootstrapped
    Booting
    In computing, booting is a process that begins when a user turns on a computer system and prepares the computer to perform its normal operations. On modern computers, this typically involves loading and starting an operating system. The boot sequence is the initial set of operations that the...

    . The boot code in the Volume Boot Record containing the disklabel is thus simplified, as it need only look in one fixed location to find the location of the boot volume.
  • Partition 'b' is the "swap" partition.
  • Partition 'c' overlaps all of the other partitions and describes the entire disk. Its start and length are fixed. On systems where the disklabel co-exists with another partitioning scheme (such as on PC hardware), partition 'c' may actually only extend to an area of disk allocated to the BSD operating system, and partition 'd' is used to cover the whole physical disk.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK