Commit | Line | Data |
---|---|---|
37adbef5 MK |
1 | .\" from Symmetric Computer Systems. |
2 | .\" Modifications Copyright (c) 1987 Regents of the University of California. | |
3 | .\" All rights reserved. The Berkeley software License Agreement | |
4 | .\" specifies the terms and conditions for redistribution. | |
5 | .\" | |
85fd189d | 6 | .\" @(#)disklabel.8 6.4 (Berkeley) %G% |
37adbef5 MK |
7 | .\" |
8 | .TH DISKLABEL 8 "" | |
9 | .UC 5 | |
10 | .SH NAME | |
11 | disklabel \- read and write disk pack label | |
12 | .SH SYNOPSIS | |
13 | .B disklabel | |
14 | [ | |
15 | .B \-r | |
16 | ] | |
17 | .I disk | |
18 | .br | |
19 | .B disklabel \-w | |
20 | [ | |
21 | .B \-r | |
22 | ] | |
23 | .I disk | |
24 | .I disktype | |
25 | [ | |
26 | .I packid | |
27 | [ | |
28 | .I priboot secboot | |
29 | ] ] | |
30 | .br | |
31 | .B disklabel \-e | |
32 | [ | |
33 | .B \-r | |
34 | ] | |
35 | .I disk | |
36 | .br | |
37 | .B disklabel \-R | |
38 | [ | |
39 | .B \-r | |
40 | ] | |
4ec0116d | 41 | .I disk protofile |
37adbef5 MK |
42 | [ |
43 | .I priboot secboot | |
44 | ] | |
45 | .SH DESCRIPTION | |
46 | .I Disklabel | |
47 | can be used to install, examine or modify the label on a disk drive or pack. | |
48 | When writing the label, it can be used | |
49 | to change the drive identification, | |
50 | the disk partitions on the drive, | |
51 | or to replace a damaged label or bootstrap. | |
bdb6580b MK |
52 | The disk label is located on one of the first sectors |
53 | of each disk (usually block 0). | |
54 | On machines that require a block-0 bootstrap (VAX 11/750), | |
55 | the label is inserted into the bootstrap program. | |
37adbef5 MK |
56 | This information is used by the system disk driver and by the bootstrap |
57 | program to determine how to program the drive. | |
bdb6580b MK |
58 | There are several forms of the command that display, install or modify |
59 | the label on a disk. | |
60 | Each form has an additional option, | |
61 | .BR \-r , | |
62 | which causes the label to be read from or written to the disk directly, | |
63 | rather than going through the system's in-core copy of the label. | |
64 | When writing, the in-core copy is also updated if possible. | |
85fd189d MK |
65 | This option may allow a label to be installed on a disk |
66 | without kernel support for a label, such as when labels are first installed | |
67 | on a system. | |
37adbef5 MK |
68 | .PP |
69 | The first form of the command is used to examine the label on the named | |
70 | disk drive (e.g. hp0 or /dev/rhp0c). | |
71 | It will display all of the parameters associated with the drive | |
72 | and its partition layout. | |
73 | The kernel's in-core label is displayed; | |
74 | if the disk has no label, or the partition types on the disk are incorrect, | |
85fd189d | 75 | the kernel may have constructed or modified the label. |
37adbef5 MK |
76 | If the |
77 | .B \-r | |
78 | flag is given, the label from the raw disk will be displayed rather | |
79 | than the in-core label. | |
80 | .PP | |
81 | The second form of the command, with the | |
82 | .B \-w | |
83 | flag, is used to write a standard label on the designated drive. | |
84 | The required arguments to | |
85 | .I disklabel | |
86 | are the drive to be labelled (e.g. hp0), and | |
87 | the drive type as described in the | |
88 | .IR disktab (5) | |
89 | file. | |
90 | The drive parameters and partitions are taken from that file. | |
91 | If different disks of the same physical type are to have different | |
92 | partitions, it will be necessary to have separate disktab entries | |
93 | describing each or to edit the label as described below. | |
94 | The first optional argument is a pack identification, up to 16 characters. | |
95 | The pack id must be quoted if it contains blanks. | |
96 | If the | |
97 | .B \-r | |
98 | flag is given, the disk sectors containing the label and bootstrap | |
99 | will be written directly, | |
85fd189d MK |
100 | otherwise the existing label will be modified in place without modifying |
101 | the bootstrap. | |
102 | If the disk does not already have a label, the | |
37adbef5 | 103 | .B \-r |
85fd189d MK |
104 | flag must be used. |
105 | In either case, the kernel's in-core label is replaced. | |
106 | .PP | |
107 | Alternate versions of the bootstrap files may be specified | |
37adbef5 MK |
108 | after the pack identifier. |
109 | If an alternate bootstrap is not specified, the standard bootstrap will be used. | |
110 | The bootstrap programs are located in | |
85fd189d MK |
111 | .IR /usr/mdec . |
112 | The names of the bootstrap programs may be specified in | |
113 | .IR disktab (5); | |
114 | if not specified | |
115 | with default names of the form | |
37adbef5 MK |
116 | .IR disktype boot |
117 | for the primary (block 0) bootstrap, and | |
118 | .RI boot disktype | |
119 | for the secondary (block 1-15) bootstrap; | |
120 | for example, /usr/mdec/hpboot and /usr/mdec/boothp. | |
121 | .PP | |
122 | An existing disk label may be edited by using the | |
123 | .B \-e | |
124 | flag. | |
125 | The label is read from the in-core kernel copy, | |
126 | or directly from the disk if the | |
127 | .B \-r | |
128 | flag is also given. | |
129 | The label is formatted and then supplied to an editor for changes. | |
130 | If no editor is specified in an EDITOR environment variable, | |
131 | .IR vi (1) | |
132 | is used. | |
133 | When the editor terminates, the formatted label is reread | |
134 | and used to rewrite the disk label. | |
37adbef5 MK |
135 | .PP |
136 | Finally, | |
85fd189d MK |
137 | with the |
138 | .B \-R | |
139 | flag, | |
37adbef5 MK |
140 | .I disklabel |
141 | is capable of restoring a disk label that was formatted | |
85fd189d MK |
142 | in a prior operation and saved in an ascii file. |
143 | The prototype file used to create the label is in exactly the same format | |
144 | that is produced when reading or editing a label. | |
145 | If the | |
146 | .B \-r | |
147 | option is also given, | |
148 | a block-0 bootstrap is installed on machines that use one; | |
149 | either the disktype or the names of the bootstrap files must be specified | |
150 | on such machines. | |
37adbef5 MK |
151 | .SH FILES |
152 | /etc/disktab | |
153 | .br | |
154 | /usr/mdec/\fIxx\fPboot | |
155 | .br | |
156 | /usr/mdec/boot\fIxx\fP | |
157 | .SH "SEE ALSO" | |
158 | disktab(5), disklabel(5) |