1 .\" $NetBSD: format.8,v 1.10 2003/08/07 10:31:29 agc Exp $
3 .\" Copyright (c) 1980, 1983, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
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. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" from: @(#)format.8 8.1 (Berkeley) 6/5/93
37 .Nd how to format disk packs
39 There are two ways to format disk packs. The simplest is to
43 The alternative is to use the DEC standard formatting software which
44 operates under the DEC diagnostic supervisor.
45 This manual page describes the operation of
47 then concludes with some remarks about using the DEC formatter.
50 is a standalone program used to format and check disks prior to
51 constructing file systems.
52 In addition to the formatting operation,
54 records any bad sectors encountered according to DEC standard 144.
55 Formatting is performed one track at a time by writing the appropriate
56 headers and a test pattern and then checking the sector by reading and
57 verifying the pattern, using the controller's ECC for error detection.
58 A sector is marked bad if an unrecoverable media error is detected, or
59 if a correctable ECC error too many bits in length is detected (such
60 errors are indicated as
62 in the summary printed upon completing the format operation).
63 After the entire disk has been formatted and checked, the total number
64 of errors are reported, any bad sectors and skip sectors are marked,
65 and a bad sector forwarding table is written to the disk in the first
66 five even numbered sectors of the last track.
67 It is also possible to reformat sections of the disk in units of
74 drive supported by the
78 device drivers which uses 4-byte headers (everything except RP's).
80 The test pattern used during the media check may be selected from one
81 of: 0xf00f (RH750 worst case), 0xec6d (media worst case), and 0xa5a5
82 (alternating 1's and 0's).
83 Normally the media worst case pattern is used.
86 also has an option to perform an extended
88 which makes a number of passes using different patterns.
89 The number of passes can be selected at run time, up to a maximum of
90 48, with provision for additional passes or termination after the
91 preselected number of passes.
92 This test runs for many hours, depending on the disk and processor.
96 is run to format an entire disk, a completely new bad sector table is
97 generated based on errors encountered while formatting.
98 The device driver, however, will always attempt to read any existing
99 bad sector table when the device is first opened.
100 Thus, if a disk pack has never previously been formatted, or has been
101 formatted with different sectoring, five error messages will be
102 printed when the driver attempts to read the bad sector table; these
103 diagnostics should be ignored.
105 Formatting a 400 megabyte disk on a
107 disk controller usually takes about 20 minutes.
110 disk controller takes significantly longer.
111 For every hundredth cylinder formatted
113 prints a message indicating the current cylinder being formatted.
114 (This message is just to reassure people that nothing is amiss.)
117 uses the standard notation of the standalone I/O library in
118 identifying a drive to be formatted.
119 A drive is specified as
123 refers to the controller type (either
128 is the unit number of the drive; 8 times the
132 adaptor number plus the
136 drive unit number; and
138 is the file system partition on drive
140 (this should always be 0).
143 indicates that drive 1 on
145 adaptor 0 should be formatted; while
151 adaptor 1 should be formatted.
153 Before each formatting attempt,
155 prompts the user in case debugging should be enabled in the
156 appropriate device driver.
157 A carriage return disables debugging information.
160 should be used prior to building file systems (with
162 to ensure that all sectors with uncorrectable media errors are
164 If a drive develops uncorrectable defects after formatting, either
168 should be able to avoid the bad sectors.
173 In this example (using a
176 is loaded from the console floppy;
179 will be loaded from the root file system with
184 Boldface means user input.
189 may be used to edit input.
194 \*[Gt]\*[Gt]\*[Gt]\fBL FORMAT\fP
195 LOAD DONE, 00004400 BYTES LOADED
196 \*[Gt]\*[Gt]\*[Gt]\fBS 2\fP
197 Disk format/check utility
199 Enable debugging (0=none, 1=bse, 2=ecc, 3=bse+ecc)? \fB0\fP
200 Device to format? \fBhp(8,0)\fP
201 (\fIerror messages may occur as old bad sector table is read\fP)
202 Formatting drive hp0 on adaptor 1: verify (yes/no)? \fByes\fP
203 Device data: #cylinders=842, #tracks=20, #sectors=48
204 Starting cylinder (0):
206 Ending cylinder (841):
208 Available test patterns are:
210 1 - (f00f) RH750 worst case
211 2 - (ec6d) media worst case
212 3 - (a5a5) alternating 1's and 0's
213 4 - (ffff) Severe burnin (up to 48 passes)
215 Pattern (one of the above, other to restart)? \fB2\fP
216 Maximum number of bit errors to allow for soft ECC (3):
217 Start formatting...make sure the drive is online
219 (\fIsoft ecc's and other errors are reported as they occur\fP)
221 (\fIif 4 write check errors were found, the program terminates like this...\fP)
230 Total of 4 hard errors revectored.
231 Writing bad sector table at block 808272
232 (\fI808272 is the block # of the first block in the bad sector table\fP)
234 (\fI...program restarts to allow formatting other disks\fP)
235 (\fI...to abort halt machine with ^P\fP)
239 The diagnostics are intended to be self explanatory.
240 .Sh USING DEC SOFTWARE TO FORMAT
241 .Em Warning: These instructions are for people with 11/780 CPUs.
242 The steps needed for 11/750 or 11/730 CPU's are similar, but not
243 covered in detail here.
245 The formatting procedures are different for each type of disk.
246 Listed here are the formatting procedures for RK07's, RP0X, and RM0X
249 You should shut down UNIX and halt the machine to do any disk formatting.
250 Make certain you put in the pack you want formatted.
251 It is also a good idea to spin down or write protect the disks you
252 don't want to format, just in case.
253 .Ss Formatting an RK07
254 Load the console floppy labeled,
255 .Dq RX11 VAX DSK LD DEV #1
256 in the console disk drive, and type the following commands:
257 .Bd -literal -offset indent
258 \*[Gt]\*[Gt]\*[Gt]BOOT
259 DIAGNOSTIC SUPERVISOR. ZZ-ESSAA-X5.0-119 23-JAN-1980 12:44:40.03
260 DS\*[Gt]ATTACH DW780 SBI DW0 3 5
261 DS\*[Gt]ATTACH RK611 DMA
262 DS\*[Gt]ATTACH RK07 DW0 DMA0
265 DS\*[Gt]START/SEC:PACKINIT
267 .Ss Formatting an RP0X
268 Follow the above procedures except that the
269 ATTACH and SELECT lines should read:
270 .Bd -literal -offset indent
271 DS\*[Gt]ATTACH RH780 SBI RH0 8 5
272 DS\*[Gt]ATTACH RP0X RH0 DBA0 (RP0X is, e.g., RP06)
276 This is for drive 0 on mba0; use 9 instead of 8 for mba1, etc.
277 .Ss Formatting an RM0X
278 Follow the above procedures except that the
279 ATTACH and SELECT lines should read:
280 .Bd -literal -offset indent
281 DS\*[Gt]ATTACH RH780 SBI RH0 8 5
282 DS\*[Gt]ATTACH RM0X RH0 DRA0
286 Don't forget to put your UNIX console floppy back in the floppy disk
293 An equivalent facility should be available which operates under a
296 It should be possible to reformat or verify part or all of a disk,
297 then update the existing bad sector table.