BSD disklabel

Disk labels are used on BSD -based operating systems such as FreeBSD, OpenBSD, NetBSD or SunOS to divide disks into so-called partitions. Disk labels were introduced with BSD4.3 -Tahoe 1988. Here, the term may partition not be confused with the conventional MBR and PC partitions. BSD disk labels disk label with the program, disklabel under modern FreeBSD systems, modified and created.

Operation

Location and conflicts

Initially, the disk labels were stored in the first sector of the disk. This method only works if only one operating system needs to work on the computer, so this method is incompatible with the method of using an MBR partition table. This method is used by competing operating systems such as Windows or Linux. It also is the first sector (→ Boot Record) partition table and master boot record. In it up to 4 partitions can be defined. Under Windows, this will mostly with letters such as C :, D :, E:, etc. addressed in Linux -based systems with / dev / sdXY ( for SATA and SCSI ) or / dev / hdXY ( IDE ), where x is the represents drive and Y have the partition. For example: Second partition on the first SATA drive is / dev/sda2.

Numbering scheme

The device files are under Unix systems under / dev. The first two or three letters are determined by the driver of the disk and the operating system, FreeBSD exist among others, the following prefixes:

  • IDE hard drives: ad or ada
  • SCSI, USB: da
  • Floppy drives: fd

In OpenBSD, especially these two prefixes are used:

  • IDE, SATA, MFM, ESDI: wd
  • SCSI, USB, SATA to AHCI, RAID controller: sd

Appended to this prefix is ​​the number of the disk that is different depending on the operating system: FreeBSD uses the built- order, so it may be that there are two hard disks ad0 and ad2 - ad1 is released to the order not to upset when adding a third plate. OpenBSD uses the order of recognition ..

Without the MBR disklabel partition is mounted directly to the hard drive now names the letter, for example ad0a for the root partition. With MBR, the scheme is a little more complicated. BSD operating systems call the MBR partitions slices ( German: discs interchangeably to MBR partition). A slice can in turn contain BSD disklabel partitions, then the respective MBR partition receives, for example, the type 0xa5 (FreeBSD ), 0xA6 ( OpenBSD ) or 0xA9 ( NetBSD ). A slice is now addressed by a name like ad0s1a; However, the numbering starts at 1, not 0, as usual with many other numbering schemes under Unix.

The numbering using slices has the following scheme: First, the disk identifier, then s and a number from 1 to 4, to identify the slice (MBR partition). a is the number of the disklabel partition. The letters are assigned consecutively according to the following order:

Today you can find on modern OpenBSD systems, however, often only / dev/wd0a; on FreeBSD systems means the first partition of the USB stick mostly / dev/da0a.

Examples

  • Second hard disk, second MBR partition, root partition: / dev/ad1s2a
  • USB flash drive, first MBR partition, root partition: / dev/da0s1a

Detachment

From version 9.0 -RELEASE FreeBSD preferably uses a GPT partitioning scheme, as this abolishes the disadvantages of the MBR.

290999
de