check in temporary version with compatibility hacks
[unix-history] / usr / src / sbin / disklabel / disklabel.8
index 73710f1..0098ce9 100644 (file)
@@ -1,9 +1,12 @@
-.\" from Symmetric Computer Systems.
-.\" Modifications Copyright (c) 1987 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
+.\" Copyright (c) 1987, 1988 Regents of the University of California.
+.\" All rights reserved.
 .\"
 .\"
-.\"    @(#)disklabel.8 6.2 (Berkeley) %G%
+.\" This code is derived from software contributed to Berkeley by
+.\" Symmetric Computer Systems.
+.\"
+.\" %sccs.include.redist.man%
+.\"
+.\"    @(#)disklabel.8 6.8 (Berkeley) %G%
 .\"
 .TH DISKLABEL 8 ""
 .UC 5
 .\"
 .TH DISKLABEL 8 ""
 .UC 5
@@ -38,10 +41,16 @@ disklabel \- read and write disk pack label
 [
 .B \-r
 ]
 [
 .B \-r
 ]
-.I disk
+.I disk protofile
 [
 .I priboot secboot
 ]
 [
 .I priboot secboot
 ]
+.br
+.B disklabel
+[
+.B \-NW
+]
+.I disk
 .SH DESCRIPTION
 .I Disklabel
 can be used to install, examine or modify the label on a disk drive or pack.
 .SH DESCRIPTION
 .I Disklabel
 can be used to install, examine or modify the label on a disk drive or pack.
@@ -62,14 +71,20 @@ Each form has an additional option,
 which causes the label to be read from or written to the disk directly,
 rather than going through the system's in-core copy of the label.
 When writing, the in-core copy is also updated if possible.
 which causes the label to be read from or written to the disk directly,
 rather than going through the system's in-core copy of the label.
 When writing, the in-core copy is also updated if possible.
+This option may allow a label to be installed on a disk
+without kernel support for a label, such as when labels are first installed
+on a system; it must be used when first installing a label on a disk.
 .PP
 The first form of the command is used to examine the label on the named
 disk drive (e.g. hp0 or /dev/rhp0c).
 It will display all of the parameters associated with the drive
 and its partition layout.
 .PP
 The first form of the command is used to examine the label on the named
 disk drive (e.g. hp0 or /dev/rhp0c).
 It will display all of the parameters associated with the drive
 and its partition layout.
-The kernel's in-core label is displayed;
+Unless the
+.B \-r
+flag is given,
+the kernel's in-core copy of the label is displayed;
 if the disk has no label, or the partition types on the disk are incorrect,
 if the disk has no label, or the partition types on the disk are incorrect,
-the kernel may have modified the label.
+the kernel may have constructed or modified the label.
 If the
 .B \-r
 flag is given, the label from the raw disk will be displayed rather
 If the
 .B \-r
 flag is given, the label from the raw disk will be displayed rather
@@ -87,31 +102,37 @@ file.
 The drive parameters and partitions are taken from that file.
 If different disks of the same physical type are to have different
 partitions, it will be necessary to have separate disktab entries
 The drive parameters and partitions are taken from that file.
 If different disks of the same physical type are to have different
 partitions, it will be necessary to have separate disktab entries
-describing each or to edit the label as described below.
-The first optional argument is a pack identification, up to 16 characters.
+describing each, or to edit the label after installation as described below.
+The first optional argument is a pack identification string,
+up to 16 characters long.
 The pack id must be quoted if it contains blanks.
 If the
 .B \-r
 flag is given, the disk sectors containing the label and bootstrap
 will be written directly,
 The pack id must be quoted if it contains blanks.
 If the
 .B \-r
 flag is given, the disk sectors containing the label and bootstrap
 will be written directly,
-otherwise only the label will be modified.
-In either case, the kernel's in-core label is replaced.
-On machines that require a block-0 bootstrap,
-the
+otherwise the existing label will be updated in place without modifying
+the bootstrap.
+If the disk does not already have a label, the
 .B \-r
 .B \-r
-flag is assumed with
-.BR \-w .
-An alternate version of the bootstrap may be specified
+flag must be used.
+In either case, the kernel's in-core label is replaced.
+.PP
+Alternate versions of the bootstrap files may be specified
 after the pack identifier.
 If an alternate bootstrap is not specified, the standard bootstrap will be used.
 The bootstrap programs are located in
 after the pack identifier.
 If an alternate bootstrap is not specified, the standard bootstrap will be used.
 The bootstrap programs are located in
-.IR /usr/mdec ,
-with names of the form
-.IR disktype boot
+.IR /usr/mdec .
+The names of the bootstrap programs may be specified in
+.IR disktab (5);
+if not specified,
+the default names are of the form
+.IR basename boot
 for the primary (block 0) bootstrap, and
 for the primary (block 0) bootstrap, and
-.RI boot disktype
+.RI boot basename
 for the secondary (block 1-15) bootstrap;
 for the secondary (block 1-15) bootstrap;
-for example, /usr/mdec/hpboot and /usr/mdec/boothp.
+for example, /usr/mdec/hpboot and /usr/mdec/boothp
+if the disk device is
+.BR hp0 .
 .PP
 An existing disk label may be edited by using the
 .B \-e
 .PP
 An existing disk label may be edited by using the
 .B \-e
@@ -127,16 +148,26 @@ is used.
 When the editor terminates, the formatted label is reread
 and used to rewrite the disk label.
 .PP
 When the editor terminates, the formatted label is reread
 and used to rewrite the disk label.
 .PP
-Finally,
+With the
+.B \-R
+flag,
 .I disklabel
 is capable of restoring a disk label that was formatted
 .I disklabel
 is capable of restoring a disk label that was formatted
-in a prior operation and saved in an ascii file by the use
-of the 
-.B \-R
-flag.
-The prototype file used to create the label is exactly that
-produced when reading or editing a label.
-A block-0 bootstrap is also installed on machines that use one.
+in a prior operation and saved in an ascii file.
+The prototype file used to create the label should be in the same format
+as that produced when reading or editing a label.
+Comments are delimited by
+.B #
+and newline.
+If the
+.B \-r
+option is also given,
+a block-0 bootstrap is installed on machines that use one;
+either the disktype or the names of the bootstrap files must be specified
+on such machines.
+.PP
+Finally, the \fB-NW\fP flags for \fIdisklabel\fP explicitly disallow and
+allow, respectively, writing of the pack label area on the selected disk.
 .SH FILES
 /etc/disktab
 .br
 .SH FILES
 /etc/disktab
 .br
@@ -145,3 +176,17 @@ A block-0 bootstrap is also installed on machines that use one.
 /usr/mdec/boot\fIxx\fP
 .SH "SEE ALSO"
 disktab(5), disklabel(5)
 /usr/mdec/boot\fIxx\fP
 .SH "SEE ALSO"
 disktab(5), disklabel(5)
+.SH DIAGNOSTICS
+The kernel device drivers will not allow the size of a disk partition
+to be decreased or the offset of a partition to be changed while it is open.
+Some device drivers create a label containing only a single large partition
+if a disk is unlabeled; thus, the label must be written to the ``a''
+partition of the disk while it is open.
+This sometimes requires the desired label to be set in two steps,
+the first one creating at least one other partition,
+and the second setting the label on the new partition
+while shrinking the ``a'' partition.
+.SH BUGS
+When a disk name is given without a full pathname,
+the constructed device name uses the ``c'' partition on the vax
+and the ``a'' partition on the tahoe.