BSD 4_1c_2 development
[unix-history] / usr / man / man8 / format.8
CommitLineData
3f6ba420
C
1.TH FORMAT 8V "25 February 1983"
2.UC 4
3.SH NAME
4format \- how to format disk packs
5.SH DESCRIPTION
6.PP
7There are two ways to format disk packs. The simplest is to
8use the
9.I format
10program. The alternative is to use the DEC standard formatting
11software which operates under the DEC diagnostic supervisor.
12This manual page describes the operation of
13.IR format ,
14then concludes with some remarks about using the DEC formatter.
15.PP
16.I Format
17is a standalone program used to
18format and write-checks disks prior to constructing
19file systems.
20In addition to the formatting
21operation,
22.I format
23records any bad sectors encountered
24according to DEC standard 144.
25Formatting is performed one track at a
26time by writing the appropriate
27headers and a test pattern and then applying
28a write check using the controller's ``write check header and data''
29command.
30A sector is marked bad if an unrecoverable media
31error is detected, or if a correctable
32ECC error greater than 5 bits in length
33is detected (such errors are indicated as
34``ECC'' in the summary printed upon
35completing the format operation).
36After the entire disk
37has been formatted and checked,
38the total number of errors are reported,
39any bad sectors and skip sectors are marked,
40and a bad sector forwarding table
41is written to the disk in the first five
42even numbered sectors of the last track.
43.I Format
44may be used on any UNIBUS or MASSBUS drive
45supported by the \fIup\fP and \fIhp\fP device
46drivers.
47.PP
48The test pattern used during the media check
49may be selected from one of: 0xf00f (RH750 worst case),
500xec6d (media worst case), and 0xa5a5 (alternating
511's and 0's).
52Normally the media worst case pattern is used.
53.PP
54Each time
55.I format
56is run a completely new bad sector table is generated
57based on errors encountered while formatting.
58The device driver, however, will always attempt to
59read any existing bad sector table when the device is
60first opened.
61Thus, if a disk pack has never previously been formatted,
62or has been formatted with different sectoring,
63five error messages will be printed when the driver attempts
64to read the bad sector table; these diagnostics should be ignored.
65.PP
66Formatting a 400 megabyte disk on a MASSBUS disk controller
67usually takes about 25 minutes.
68Formatting on a UNIBUS disk controller takes significantly
69longer.
70For every tenth cylinder formatted
71.I format
72prints a message indicating the current sector being formatted.
73(This message is just to reassure people that nothing is
74is amiss.)
75.PP
76.I Format
77uses the standard notation of the standalone i/o library
78in identifying a drive to be formatted. A drive is
79specified as
80.IR zz ( x , y ),
81where
82.I zz
83refers to the controller type (either
84.I hp
85or
86.IR up ),
87.I x
88is the number unit number of the drive;
898 times the UNIBUS or MASSBUS
90adaptor number plus the MASSBUS drive number or UNIBUS
91drive unit number; and
92.I y
93is the file system partition
94on drive
95.I x
96(this should always be 0).
97For example, ``hp(1,0)'' indicates that drive
981 on MASSBUS adaptor 0 should be formatted; while
99``up(8,0)'' indicates UNIBUS drive 0 on UNIBUS adaptor 1
100should be formatted.
101.PP
102Before each formatting attempt,
103.I format
104prompts the user in case debugging should be enabled
105in the appropriate device driver. A carriage return
106disables debugging information.
107.PP
108.I Format
109should be used prior to building file systems (with
110.IR newfs (8))
111to insure all sectors with uncorrectable media errors
112are remapped. If a drive develops uncorrectable
113defects after formatting, the program
114.IR badsect (8)
115must be used.
116.SH EXAMPLE
117A sample run of
118.I format
119is shown below.
120In this example (using a VAX-11/780),
121.I format
122is loaded from the console floppy;
123on an 11/750
124.I format
125will be loaded from the root file system.
126Boldface means user input.
127As usual, ``#'' and ``@'' may be used to edit input.
128.nf
129.in +0.5i
130.ta 1i
131.sp 1
132>>>\fBL FORMAT\fP
133 LOAD DONE, 00004400 BYTES LOADED
134>>>\fBS 2\fP
135Disk format/check utility
136.sp
137Debugging level (1=bse, 2=ecc, 3=bse+ecc)?
138Disk name? \fBhp(8,0)\fR
139Formatting unit 0 on hp1 verify (yes/no)? \fByes\fP
140Is this really what you want to do (y/n)? \fBy\fR
141Device data: #cylinders=842, #tracks=20, #sectors=48
142Available test patterns are:
143 1 - (f00f) rh750 worst case
144 2 - (ec6d) media worst case
145 3 - (a5a5) alternating 1's and 0's
146Pattern (one of the above, other to restart)? \fB2\fP
147Start formatting...make sure the drive is online
148 ...
149(\fIsoft ecc's and other errors are reported as they occur\fP)
150 ...
151(\fIif 4 write check errors were found, the program terminates like this...\fP)
152 ...
153Errors:
154Write check: 4
155Bad sector: 0
156ECC: 0
157Skip sector: 0
158Total of 4 hard errors found.
159Writing bad sector table at block 524256
160(\fI524256 is the block # of the first block in the bad sector table\fP)
161Done
162(\fI...program restarts to allow formatting other disks\fP)
163(\fI...to abort halt machine with ^P\fP)
164.in -0.5i
165.fi
166.sp 1
167.SH DIAGNOSTICS
168The diagnostics are intended to be self explanatory.
169.SH "USING DEC SOFTWARE TO FORMAT"
170.PP
171.B
172Warning: These instructions are for people with 11/780 CPU's. The
173steps needed for 11/750 or 11/730 cpu's are similar, but not
174covered in detail here.
175.I
176.PP
177The formatting procedures are different for each type of disk. Listed
178here are the formatting procedures for RK07's, RP0X, and RM0X
179disks.
180.PP
181You should shut down UNIX and halt the machine to do any disk formatting.
182Make certain you put in the pack you want formatted. It is also a good idea
183to spin down or write protect the disks you don't want to format, just in case.
184.PP
185.B Formatting a RK07.
186Load the console floppy labled, "RX11 VAX DSK LD DEV #1" in
187the console disk drive, and type the following commands:
188.nf
189 >>>BOOT
190 DIAGNOSTIC SUPERVISOR. ZZ-ESSAA-X5.0-119 23-JAN-1980 12:44:40.03
191 DS>ATTACH DW780 SBI DW0 3 5
192 DS>ATTACH RK611 DMA
193 DS>ATTACH RK07 DW0 DMA0
194 DS>SELECT DMA0
195 DS>LOAD EVRAC
196 DS>START/SEC:PACKINIT
197.fi
198.PP
199.B Formatting a RP0X.
200Follow the above procedures except that the
201ATTACH and SELECT lines should read:
202.nf
203 DS>ATTACH RH780 SBI RH0 8 5
204 DS>ATTACH RP0X RH0 DBA0 (RP0X is, e.g. RP06)
205 DS>SELECT DBA0
206.fi
207.PP
208This is for drive 0 on mba0; use 9 instead of 8 for mba1, etc.
209.PP
210.B Formatting a RM0X.
211Follow the above procedures except that the
212ATTACH and SELECT lines should read:
213.nf
214 DS>ATTACH RH780 SBI RH0 8 5
215 DS>ATTACH RM0X RH0 DRA0
216 DS>SELECT DRA0
217.fi
218.PP
219Don't forget to put your UNIX console floppy back
220in the floppy disk drive.
221.SH SEE ALSO
222bad144(8),
223badsect(8),
224newfs(8)
225.SH BUGS
226An equivalent facility should be available which operates under
227a running UNIX system.
228.PP
229It should be possible to define more
230precisely what a ``hard ECC'' error is; e.g. the maximum unacceptable
231ECC width.