xref: /netbsd-src/share/man/man8/man8.vax/format.8 (revision 01869ca4d24a86379a68731bf9706a9f0820fe4e)
1*01869ca4Swiz.\"	$NetBSD: format.8,v 1.14 2017/07/03 21:31:00 wiz Exp $
22b6e02aaSmrg.\"
32b6e02aaSmrg.\" Copyright (c) 1980, 1983, 1993
42b6e02aaSmrg.\"	The Regents of the University of California.  All rights reserved.
561f28255Scgd.\"
661f28255Scgd.\" Redistribution and use in source and binary forms, with or without
761f28255Scgd.\" modification, are permitted provided that the following conditions
861f28255Scgd.\" are met:
961f28255Scgd.\" 1. Redistributions of source code must retain the above copyright
1061f28255Scgd.\"    notice, this list of conditions and the following disclaimer.
1161f28255Scgd.\" 2. Redistributions in binary form must reproduce the above copyright
1261f28255Scgd.\"    notice, this list of conditions and the following disclaimer in the
1361f28255Scgd.\"    documentation and/or other materials provided with the distribution.
14075022b3Sagc.\" 3. Neither the name of the University nor the names of its contributors
1561f28255Scgd.\"    may be used to endorse or promote products derived from this software
1661f28255Scgd.\"    without specific prior written permission.
1761f28255Scgd.\"
1861f28255Scgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1961f28255Scgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2061f28255Scgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2161f28255Scgd.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2261f28255Scgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2361f28255Scgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2461f28255Scgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2561f28255Scgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2661f28255Scgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2761f28255Scgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2861f28255Scgd.\" SUCH DAMAGE.
2961f28255Scgd.\"
302b6e02aaSmrg.\"	from: @(#)format.8	8.1 (Berkeley) 6/5/93
3161f28255Scgd.\"
323af2acdcSchristos.Dd February 17, 2017
3343148f18Sreed.Dt FORMAT 8 vax
34c77eae36Swiz.Os
35c77eae36Swiz.Sh NAME
36c77eae36Swiz.Nm format
37c77eae36Swiz.Nd how to format disk packs
38c77eae36Swiz.Sh DESCRIPTION
3961f28255ScgdThere are two ways to format disk packs.  The simplest is to
4061f28255Scgduse the
41c77eae36Swiz.Nm
42c77eae36Swizprogram.
43c77eae36SwizThe alternative is to use the DEC standard formatting software which
44c77eae36Swizoperates under the DEC diagnostic supervisor.
4561f28255ScgdThis manual page describes the operation of
46c77eae36Swiz.Nm ,
4761f28255Scgdthen concludes with some remarks about using the DEC formatter.
48c77eae36Swiz.Pp
49c77eae36Swiz.Nm
50c77eae36Swizis a standalone program used to format and check disks prior to
51c77eae36Swizconstructing file systems.
52c77eae36SwizIn addition to the formatting operation,
53c77eae36Swiz.Nm
54c77eae36Swizrecords any bad sectors encountered according to DEC standard 144.
55c77eae36SwizFormatting is performed one track at a time by writing the appropriate
56c77eae36Swizheaders and a test pattern and then checking the sector by reading and
57c77eae36Swizverifying the pattern, using the controller's ECC for error detection.
58c77eae36SwizA sector is marked bad if an unrecoverable media error is detected, or
59c77eae36Swizif a correctable ECC error too many bits in length is detected (such
60c77eae36Swizerrors are indicated as
61c77eae36Swiz.Dq ECC
62c77eae36Swizin the summary printed upon completing the format operation).
63c77eae36SwizAfter the entire disk has been formatted and checked, the total number
64c77eae36Swizof errors are reported, any bad sectors and skip sectors are marked,
65c77eae36Swizand a bad sector forwarding table is written to the disk in the first
66c77eae36Swizfive even numbered sectors of the last track.
67c77eae36SwizIt is also possible to reformat sections of the disk in units of
68c77eae36Swiztracks.
69c77eae36Swiz.Nm
70c77eae36Swizmay be used on any
71c77eae36Swiz.Tn UNIBUS
72c77eae36Swizor
73c77eae36Swiz.Tn MASSBUS
74c77eae36Swizdrive supported by the
75c77eae36Swiz.Em up
76c77eae36Swizand
77c77eae36Swiz.Em hp
78c77eae36Swizdevice drivers which uses 4-byte headers (everything except RP's).
79c77eae36Swiz.Pp
80c77eae36SwizThe test pattern used during the media check may be selected from one
81c77eae36Swizof: 0xf00f (RH750 worst case), 0xec6d (media worst case), and 0xa5a5
82c77eae36Swiz(alternating 1's and 0's).
8361f28255ScgdNormally the media worst case pattern is used.
84c77eae36Swiz.Pp
85c77eae36Swiz.Nm
86c77eae36Swizalso has an option to perform an extended
87c77eae36Swiz.Dq severe burn-in ,
8861f28255Scgdwhich makes a number of passes using different patterns.
89c77eae36SwizThe number of passes can be selected at run time, up to a maximum of
90c77eae36Swiz48, with provision for additional passes or termination after the
91c77eae36Swizpreselected number of passes.
9261f28255ScgdThis test runs for many hours, depending on the disk and processor.
93c77eae36Swiz.Pp
9461f28255ScgdEach time
95c77eae36Swiz.Nm
96c77eae36Swizis run to format an entire disk, a completely new bad sector table is
97c77eae36Swizgenerated based on errors encountered while formatting.
98c77eae36SwizThe device driver, however, will always attempt to read any existing
99c77eae36Swizbad sector table when the device is first opened.
100c77eae36SwizThus, if a disk pack has never previously been formatted, or has been
101c77eae36Swizformatted with different sectoring, five error messages will be
102c77eae36Swizprinted when the driver attempts to read the bad sector table; these
103c77eae36Swizdiagnostics should be ignored.
104c77eae36Swiz.Pp
105c77eae36SwizFormatting a 400 megabyte disk on a
106c77eae36Swiz.Tn MASSBUS
107c77eae36Swizdisk controller usually takes about 20 minutes.
108c77eae36SwizFormatting on a
109c77eae36Swiz.Tn UNIBUS
110c77eae36Swizdisk controller takes significantly longer.
11161f28255ScgdFor every hundredth cylinder formatted
112c77eae36Swiz.Nm
11361f28255Scgdprints a message indicating the current cylinder being formatted.
114c77eae36Swiz(This message is just to reassure people that nothing is amiss.)
115c77eae36Swiz.Pp
116c77eae36Swiz.Nm
117c77eae36Swizuses the standard notation of the standalone I/O library in
118c77eae36Swizidentifying a drive to be formatted.
119c77eae36SwizA drive is  specified as
120c77eae36Swiz.Em zz(x,y) ,
12161f28255Scgdwhere
122c77eae36Swiz.Em zz
12361f28255Scgdrefers to the controller type (either
124c77eae36Swiz.Em hp
12561f28255Scgdor
126c77eae36Swiz.Em up ) ,
127c77eae36Swiz.Em x
128c77eae36Swizis the unit number of the drive; 8 times the
129c77eae36Swiz.Tn UNIBUS
130c77eae36Swizor
131c77eae36Swiz.Tn MASSBUS
132c77eae36Swizadaptor number plus the
133c77eae36Swiz.Tn MASSBUS
134c77eae36Swizdrive number or
135c77eae36Swiz.Tn UNIBUS
13661f28255Scgddrive unit number; and
137c77eae36Swiz.Em y
138c77eae36Swizis the file system partition on drive
139c77eae36Swiz.Em x
14061f28255Scgd(this should always be 0).
141c77eae36SwizFor example,
142c77eae36Swiz.Dq hp(1,0)
143c77eae36Swizindicates that drive 1 on
144c77eae36Swiz.Tn MASSBUS
145c77eae36Swizadaptor 0 should be formatted; while
146c77eae36Swiz.Dq up(10,0)
147c77eae36Swizindicates that
148c77eae36Swiz.Tn UNIBUS
149c77eae36Swizdrive 2 on
150c77eae36Swiz.Tn UNIBUS
151c77eae36Swizadaptor 1 should be formatted.
152c77eae36Swiz.Pp
15361f28255ScgdBefore each formatting attempt,
154c77eae36Swiz.Nm
155c77eae36Swizprompts the user in case debugging should be enabled in the
156c77eae36Swizappropriate device driver.
157c77eae36SwizA carriage return disables debugging information.
158c77eae36Swiz.Pp
159c77eae36Swiz.Nm
16061f28255Scgdshould be used prior to building file systems (with
161c77eae36Swiz.Xr newfs 8
162c77eae36Swizto ensure that all sectors with uncorrectable media errors are
163c77eae36Swizremapped.
164c77eae36SwizIf a drive develops uncorrectable defects after formatting, either
165c77eae36Swiz.Xr bad144 8
16661f28255Scgdor
167c77eae36Swiz.Xr badsect 8
16861f28255Scgdshould be able to avoid the bad sectors.
169c77eae36Swiz.Sh EXAMPLES
17061f28255ScgdA sample run of
171c77eae36Swiz.Nm
17261f28255Scgdis shown below.
173c77eae36SwizIn this example (using a
174c77eae36Swiz.Tn VAX-11/780 ) ,
175c77eae36Swiz.Nm
17661f28255Scgdis loaded from the console floppy;
17761f28255Scgdon an 11/750
178c77eae36Swiz.Nm
17961f28255Scgdwill be loaded from the root file system with
1803af2acdcSchristos.Xr vax/boot 8
181c77eae36Swizfollowing a
182c77eae36Swiz.Dq B/3
183c77eae36Swizcommand.
18461f28255ScgdBoldface means user input.
185c77eae36SwizAs usual,
186c77eae36Swiz.Dq #
187c77eae36Swizand
188c77eae36Swiz.Dq @
189c77eae36Swizmay be used to edit input.
190b8ea928fSnjoly.Bd -literal -offset 0.5i
191*01869ca4Swiz>>>\fBL FORMAT\fP
19261f28255Scgd	LOAD DONE, 00004400 BYTES LOADED
193*01869ca4Swiz>>>\fBS 2\fP
19461f28255ScgdDisk format/check utility
19561f28255Scgd.sp
19661f28255ScgdEnable debugging (0=none, 1=bse, 2=ecc, 3=bse+ecc)? \fB0\fP
19761f28255ScgdDevice to format? \fBhp(8,0)\fP
19861f28255Scgd(\fIerror messages may occur as old bad sector table is read\fP)
19961f28255ScgdFormatting drive hp0 on adaptor 1: verify (yes/no)? \fByes\fP
20061f28255ScgdDevice data: #cylinders=842, #tracks=20, #sectors=48
20161f28255ScgdStarting cylinder (0):
20261f28255ScgdStarting track (0):
20361f28255ScgdEnding cylinder (841):
20461f28255ScgdEnding track (19):
20561f28255ScgdAvailable test patterns are:
206b8ea928fSnjoly.Ed
207b8ea928fSnjoly.Bd -literal -offset 1.5i -compact
20861f28255Scgd1 - (f00f) RH750 worst case
20961f28255Scgd2 - (ec6d) media worst case
21061f28255Scgd3 - (a5a5) alternating 1's and 0's
21161f28255Scgd4 - (ffff) Severe burnin (up to 48 passes)
212b8ea928fSnjoly.Ed
213b8ea928fSnjoly.Bd -literal -offset 0.5i -compact
21461f28255ScgdPattern (one of the above, other to restart)? \fB2\fP
21561f28255ScgdMaximum number of bit errors to allow for soft ECC (3):
21661f28255ScgdStart formatting...make sure the drive is online
21761f28255Scgd ...
21861f28255Scgd(\fIsoft ecc's and other errors are reported as they occur\fP)
21961f28255Scgd ...
22061f28255Scgd(\fIif 4 write check errors were found, the program terminates like this...\fP)
22161f28255Scgd ...
22261f28255ScgdErrors:
22361f28255ScgdBad sector: 0
22461f28255ScgdWrite check: 4
22561f28255ScgdHard ECC: 0
22661f28255ScgdOther hard: 0
22761f28255ScgdMarked bad: 0
22861f28255ScgdSkipped: 0
22961f28255ScgdTotal of 4 hard errors revectored.
23061f28255ScgdWriting bad sector table at block 808272
23161f28255Scgd(\fI808272 is the block # of the first block in the bad sector table\fP)
23261f28255ScgdDone
23361f28255Scgd(\fI...program restarts to allow formatting other disks\fP)
23461f28255Scgd(\fI...to abort halt machine with ^P\fP)
235b8ea928fSnjoly.Ed
236c77eae36Swiz.Sh DIAGNOSTICS
23761f28255ScgdThe diagnostics are intended to be self explanatory.
238c77eae36Swiz.Sh USING DEC SOFTWARE TO FORMAT
239ce4e7779Swiz.Em Warning: These instructions are for people with 11/780 CPUs.
240c77eae36SwizThe steps needed for 11/750 or 11/730 CPU's are similar, but not
24161f28255Scgdcovered in detail here.
242c77eae36Swiz.Pp
243c77eae36SwizThe formatting procedures are different for each type of disk.
244c77eae36SwizListed here are the formatting procedures for RK07's, RP0X, and RM0X
24561f28255Scgddisks.
246c77eae36Swiz.Pp
24761f28255ScgdYou should shut down UNIX and halt the machine to do any disk formatting.
248c77eae36SwizMake certain you put in the pack you want formatted.
249c77eae36SwizIt is also a good idea to spin down or write protect the disks you
250c77eae36Swizdon't want to format, just in case.
251c77eae36Swiz.Ss Formatting an RK07
252c77eae36SwizLoad the console floppy labeled,
253c77eae36Swiz.Dq RX11 VAX DSK LD DEV #1
254c77eae36Swizin the console disk drive, and type the following commands:
255c77eae36Swiz.Bd -literal -offset indent
256*01869ca4Swiz>>>BOOT
25761f28255ScgdDIAGNOSTIC SUPERVISOR.  ZZ-ESSAA-X5.0-119  23-JAN-1980 12:44:40.03
258*01869ca4SwizDS>ATTACH DW780 SBI DW0 3 5
259*01869ca4SwizDS>ATTACH RK611 DMA
260*01869ca4SwizDS>ATTACH RK07 DW0 DMA0
261*01869ca4SwizDS>SELECT DMA0
262*01869ca4SwizDS>LOAD EVRAC
263*01869ca4SwizDS>START/SEC:PACKINIT
264c77eae36Swiz.Ed
265c77eae36Swiz.Ss Formatting an RP0X
26661f28255ScgdFollow the above procedures except that the
26761f28255ScgdATTACH and SELECT lines should read:
268c77eae36Swiz.Bd -literal -offset indent
269*01869ca4SwizDS>ATTACH RH780 SBI RH0 8 5
270*01869ca4SwizDS>ATTACH RP0X RH0 DBA0		(RP0X is, e.g., RP06)
271*01869ca4SwizDS>SELECT DBA0
272c77eae36Swiz.Ed
273c77eae36Swiz.Pp
27461f28255ScgdThis is for drive 0 on mba0; use 9 instead of 8 for mba1, etc.
275c77eae36Swiz.Ss Formatting an RM0X
27661f28255ScgdFollow the above procedures except that the
27761f28255ScgdATTACH and SELECT lines should read:
278c77eae36Swiz.Bd -literal -offset indent
279*01869ca4SwizDS>ATTACH RH780 SBI RH0 8 5
280*01869ca4SwizDS>ATTACH RM0X RH0 DRA0
281*01869ca4SwizDS>SELECT DRA0
282c77eae36Swiz.Ed
283c77eae36Swiz.Pp
284c77eae36SwizDon't forget to put your UNIX console floppy back in the floppy disk
285c77eae36Swizdrive.
286c77eae36Swiz.Sh SEE ALSO
287c77eae36Swiz.Xr bad144 8 ,
288c77eae36Swiz.Xr badsect 8 ,
289c77eae36Swiz.Xr newfs 8
290c77eae36Swiz.Sh BUGS
291c77eae36SwizAn equivalent facility should be available which operates under a
292c77eae36Swizrunning UNIX system.
293c77eae36Swiz.Pp
29461f28255ScgdIt should be possible to reformat or verify part or all of a disk,
29561f28255Scgdthen update the existing bad sector table.
296