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