MirOS Manual: disklabel(5)

DISKLABEL(5)                 BSD Reference Manual                 DISKLABEL(5)


     disklabel - disk pack label


     #include <sys/disklabel.h>


     Each disk or disk pack on a system may contain a disk label which pro-
     vides detailed information about the geometry of the disk and the parti-
     tions into which the disk is divided. It should be initialized when the
     disk is formatted, and may be changed later with the disklabel(8) pro-
     gram. This information is used by the system disk driver and by the
     the filesystems on the disk partitions. Additional information is used by
     important filesystem information. The description of each partition con-
     tains an identifier for the partition type (standard filesystem, swap
     contains incomplete information about the filesystem.

     geometry. It is at an offset LABELOFFSET from the beginning of the sec-
     tor, to allow room for the initial bootstrap. The disk sector containing
     the label is normally made read-only so that it is not accidentally
     overwritten by pack-to-pack copies or swap operations; the DIOCWLABEL
     ioctl(2), which is done as needed by the disklabel(8) program, allows
     modification of the label sector.

     DIOCGDINFO ioctl; this works with a file descriptor for a block or char-
     acter ("raw") device for any partition of the disk. The in-core copy of
     the label is set by the DIOCSDINFO ioctl. The offset of a partition can-
     not generally be changed while it is open, nor can it be made smaller
     was found on the disk, and the driver was able to construct only a skele-
     tal label without partition information. The DIOCWDINFO ioctl operation
     variable affecting label generation has changed (e.g. the fdisk partition

     Note that when a disk has no real BSD disklabel the kernel creates a de-
     other partitions found on the disk if they are supported on your archi-
     tecture. For example, on systems that support fdisk(8) partitions the de-
     That means that subsequent changes that affect non-OpenBSD partitions
     from the default label into the real one.


     disktab(5), disklabel(8)


     disklabel only supports up to a maximum of 15 partitions, 'a' through
     'p', excluding 'c'. The 'c' partition is reserved for the entire physical
     disk. By convention, the 'a' partition of the boot disk is the root par-
     tition, and the 'b' partition of the boot disk is the swap partition, but

MirOS BSD #10-current           August 6, 2001                               1


This product includes material provided by Thorsten Glaser.
