BSD 4_3_Net_2 release
[unix-history] / usr / src / share / man / man8 / man8.vax / format.8
CommitLineData
af359dea
C
1.\" Copyright (c) 1980, 1983 The Regents of the University of California.
2.\" All rights reserved.
61da1838 3.\"
af359dea
C
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
61da1838 19.\"
af359dea
C
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)format.8 6.6 (Berkeley) 4/20/91
33.\"
34.TH FORMAT 8 "April 20, 1991"
61da1838
KM
35.UC 4
36.SH NAME
8a383557 37format \- how to format disk packs
61da1838
KM
38.SH DESCRIPTION
39.PP
8a383557
KM
40There are two ways to format disk packs. The simplest is to
41use the
42.I format
43program. The alternative is to use the DEC standard formatting
44software which operates under the DEC diagnostic supervisor.
45This manual page describes the operation of
46.IR format ,
47then concludes with some remarks about using the DEC formatter.
48.PP
49.I Format
50is a standalone program used to
51format and check disks prior to constructing
52file systems.
53In addition to the formatting
54operation,
55.I format
56records any bad sectors encountered
57according to DEC standard 144.
58Formatting is performed one track at a
59time by writing the appropriate
60headers and a test pattern and then checking
61the sector by reading and verifying the pattern, using
62the controller's ECC for error detection.
63A sector is marked bad if an unrecoverable media
64error is detected, or if a correctable
478653dc 65ECC error too many bits in length
8a383557
KM
66is detected (such errors are indicated as
67``ECC'' in the summary printed upon
68completing the format operation).
69After the entire disk
70has been formatted and checked,
71the total number of errors are reported,
72any bad sectors and skip sectors are marked,
73and a bad sector forwarding table
74is written to the disk in the first five
75even numbered sectors of the last track.
478653dc
MK
76It is also possible to reformat sections of the disk
77in units of tracks.
8a383557
KM
78.I Format
79may be used on any UNIBUS or MASSBUS drive
80supported by the \fIup\fP and \fIhp\fP device
81drivers which uses 4-byte headers (everything except RP's).
82.PP
83The test pattern used during the media check
84may be selected from one of: 0xf00f (RH750 worst case),
850xec6d (media worst case), and 0xa5a5 (alternating
861's and 0's).
87Normally the media worst case pattern is used.
88.PP
89.I Format
9d89e5d6 90also has an option to perform an extended \*(lqsevere burn-in,\*(rq
478653dc
MK
91which makes a number of passes using different patterns.
92The number of passes can be selected at run time,
b0a48957 93up to a maximum of 48,
478653dc
MK
94with provision for additional passes or termination
95after the preselected number of passes.
8a383557
KM
96This test runs for many hours, depending on the disk and processor.
97.PP
98Each time
99.I format
478653dc
MK
100is run to format an entire disk,
101a completely new bad sector table is generated
8a383557
KM
102based on errors encountered while formatting.
103The device driver, however, will always attempt to
104read any existing bad sector table when the device is
105first opened.
106Thus, if a disk pack has never previously been formatted,
107or has been formatted with different sectoring,
108five error messages will be printed when the driver attempts
109to read the bad sector table; these diagnostics should be ignored.
110.PP
111Formatting a 400 megabyte disk on a MASSBUS disk controller
112usually takes about 20 minutes.
113Formatting on a UNIBUS disk controller takes significantly
114longer.
115For every hundredth cylinder formatted
116.I format
117prints a message indicating the current cylinder being formatted.
118(This message is just to reassure people that nothing is
119is amiss.)
120.PP
121.I Format
478653dc 122uses the standard notation of the standalone I/O library
8a383557
KM
123in identifying a drive to be formatted. A drive is
124specified as
125.IR zz ( x , y ),
126where
127.I zz
128refers to the controller type (either
129.I hp
130or
131.IR up ),
132.I x
133is the unit number of the drive;
1348 times the UNIBUS or MASSBUS
135adaptor number plus the MASSBUS drive number or UNIBUS
136drive unit number; and
137.I y
138is the file system partition
139on drive
140.I x
141(this should always be 0).
142For example, ``hp(1,0)'' indicates that drive
1431 on MASSBUS adaptor 0 should be formatted; while
478653dc 144``up(10,0)'' indicates that UNIBUS drive 2 on UNIBUS adaptor 1
8a383557
KM
145should be formatted.
146.PP
147Before each formatting attempt,
148.I format
149prompts the user in case debugging should be enabled
150in the appropriate device driver. A carriage return
151disables debugging information.
152.PP
153.I Format
154should be used prior to building file systems (with
155.IR newfs (8))
478653dc 156to insure that all sectors with uncorrectable media errors
8a383557 157are remapped. If a drive develops uncorrectable
478653dc
MK
158defects after formatting, either
159.IR bad144 (8)
160or
8a383557 161.IR badsect (8)
478653dc 162should be able to avoid the bad sectors.
8a383557
KM
163.SH EXAMPLE
164A sample run of
165.I format
166is shown below.
167In this example (using a VAX-11/780),
168.I format
169is loaded from the console floppy;
170on an 11/750
171.I format
9d89e5d6
MK
172will be loaded from the root file system with
173.IR boot (8)
174following a \*(lqB/3\*(rq command.
8a383557
KM
175Boldface means user input.
176As usual, ``#'' and ``@'' may be used to edit input.
177.nf
178.in +0.5i
179.ta 1i
180.sp 1
181>>>\fBL FORMAT\fP
182 LOAD DONE, 00004400 BYTES LOADED
183>>>\fBS 2\fP
184Disk format/check utility
185.sp
186Enable debugging (0=none, 1=bse, 2=ecc, 3=bse+ecc)? \fB0\fP
478653dc 187Device to format? \fBhp(8,0)\fP
8a383557
KM
188(\fIerror messages may occur as old bad sector table is read\fP)
189Formatting drive hp0 on adaptor 1: verify (yes/no)? \fByes\fP
190Device data: #cylinders=842, #tracks=20, #sectors=48
478653dc
MK
191Starting cylinder (0):
192Starting track (0):
193Ending cylinder (841):
194Ending track (19):
8a383557 195Available test patterns are:
478653dc
MK
196.in +1.0i
1971 - (f00f) RH750 worst case
1982 - (ec6d) media worst case
1993 - (a5a5) alternating 1's and 0's
2004 - (ffff) Severe burnin (up to 48 passes)
201.in -1.0i
8a383557 202Pattern (one of the above, other to restart)? \fB2\fP
478653dc 203Maximum number of bit errors to allow for soft ECC (3):
8a383557
KM
204Start formatting...make sure the drive is online
205 ...
206(\fIsoft ecc's and other errors are reported as they occur\fP)
207 ...
208(\fIif 4 write check errors were found, the program terminates like this...\fP)
209 ...
210Errors:
8a383557 211Bad sector: 0
478653dc
MK
212Write check: 4
213Hard ECC: 0
214Other hard: 0
215Marked bad: 0
216Skipped: 0
217Total of 4 hard errors revectored.
218Writing bad sector table at block 808272
219(\fI808272 is the block # of the first block in the bad sector table\fP)
8a383557
KM
220Done
221(\fI...program restarts to allow formatting other disks\fP)
222(\fI...to abort halt machine with ^P\fP)
8a383557
KM
223.fi
224.sp 1
225.SH DIAGNOSTICS
226The diagnostics are intended to be self explanatory.
227.SH "USING DEC SOFTWARE TO FORMAT"
228.PP
229.B "Warning: These instructions are for people with 11/780 CPU's."
230The steps needed for 11/750 or 11/730 cpu's are similar, but not
231covered in detail here.
232.I
61da1838
KM
233.PP
234The formatting procedures are different for each type of disk. Listed
8a383557
KM
235here are the formatting procedures for RK07's, RP0X, and RM0X
236disks.
61da1838
KM
237.PP
238You should shut down UNIX and halt the machine to do any disk formatting.
239Make certain you put in the pack you want formatted. It is also a good idea
240to spin down or write protect the disks you don't want to format, just in case.
241.PP
8a383557
KM
242.B "Formatting an RK07."
243Load the console floppy labeled, "RX11 VAX DSK LD DEV #1" in
244the console disk drive, and type the following commands:
245.RS
61da1838 246.nf
8a383557
KM
247>>>BOOT
248DIAGNOSTIC SUPERVISOR. ZZ-ESSAA-X5.0-119 23-JAN-1980 12:44:40.03
249DS>ATTACH DW780 SBI DW0 3 5
250DS>ATTACH RK611 DMA
251DS>ATTACH RK07 DW0 DMA0
252DS>SELECT DMA0
253DS>LOAD EVRAC
254DS>START/SEC:PACKINIT
61da1838 255.fi
8a383557 256.RE
61da1838 257.PP
8a383557
KM
258.B "Formatting an RP0X."
259Follow the above procedures except that the
260ATTACH and SELECT lines should read:
261.RS
61da1838 262.nf
8a383557
KM
263DS>ATTACH RH780 SBI RH0 8 5
264DS>ATTACH RP0X RH0 DBA0 (RP0X is, e.g. RP06)
265DS>SELECT DBA0
61da1838 266.fi
8a383557 267.RE
61da1838
KM
268.PP
269This is for drive 0 on mba0; use 9 instead of 8 for mba1, etc.
270.PP
8a383557
KM
271.B "Formatting an RM0X."
272Follow the above procedures except that the
273ATTACH and SELECT lines should read:
274.RS
61da1838 275.nf
8a383557
KM
276DS>ATTACH RH780 SBI RH0 8 5
277DS>ATTACH RM0X RH0 DRA0
278DS>SELECT DRA0
61da1838 279.fi
8a383557 280.RE
61da1838
KM
281.PP
282Don't forget to put your UNIX console floppy back
283in the floppy disk drive.
284.SH SEE ALSO
8a383557
KM
285bad144(8),
286badsect(8),
287newfs(8)
288.SH BUGS
289An equivalent facility should be available which operates under
290a running UNIX system.
291.PP
478653dc
MK
292It should be possible to reformat or verify part or all of a disk,
293then update the existing bad sector table.