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