Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ format(8V) — SunOS 0.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

bad144(8)

badsect(8)

newfs(8)

FORMAT(8V)  —  UNKNOWN SECTION OF THE MANUAL

NAME

format − how to format disk packs

DESCRIPTION

There are two ways to format disk packs.  The simplest is to use the format program.  The alternative is to use the DEC standard formatting software which operates under the DEC diagnostic supervisor.  This manual page describes the operation of format, then concludes with some remarks about using the DEC formatter.

Format is a standalone program used to format and write-checks disks prior to constructing file systems.  In addition to the formatting operation, format records any bad sectors encountered according to DEC standard 144.  Formatting is performed one track at a time by writing the appropriate headers and a test pattern and then applying a write check using the controller’s “write check header and data” command.  A sector is marked bad if an unrecoverable media error is detected, or if a correctable ECC error greater than 5 bits in length is detected (such errors are indicated as “ECC” in the summary printed upon completing the format operation).  After the entire disk has been formatted and checked, the total number of errors are reported, any bad sectors and skip sectors are marked, and a bad sector forwarding table is written to the disk in the first five even numbered sectors of the last track.  Format may be used on any UNIBUS or MASSBUS drive supported by the up and hp device drivers. 

The test pattern used during the media check may be selected from one of: 0xf00f (RH750 worst case), 0xec6d (media worst case), and 0xa5a5 (alternating 1’s and 0’s).  Normally the media worst case pattern is used. 

Each time format is run a completely new bad sector table is generated based on errors encountered while formatting.  The device driver, however, will always attempt to read any existing bad sector table when the device is first opened.  Thus, if a disk pack has never previously been formatted, or has been formatted with different sectoring, five error messages will be printed when the driver attempts to read the bad sector table; these diagnostics should be ignored. 

Formatting a 400 megabyte disk on a MASSBUS disk controller usually takes about 25 minutes.  Formatting on a UNIBUS disk controller takes significantly longer.  For every tenth cylinder formatted format prints a message indicating the current sector being formatted.  (This message is just to reassure people that nothing is is amiss.) 

Format uses the standard notation of the standalone i/o library in identifying a drive to be formatted.  A drive is specified as zz(x,y), where zz refers to the controller type (either hp or up), x is the number unit number of the drive; 8 times the UNIBUS or MASSBUS adaptor number plus the MASSBUS drive number or UNIBUS drive unit number; and y is the file system partition on drive x (this should always be 0).  For example, “hp(1,0)” indicates that drive 1 on MASSBUS adaptor 0 should be formatted; while “up(8,0)” indicates UNIBUS drive 0 on UNIBUS adaptor 1 should be formatted. 

Before each formatting attempt, format prompts the user in case debugging should be enabled in the appropriate device driver.  A carriage return disables debugging information. 

Format should be used prior to building file systems (with newfs(8)) to insure all sectors with uncorrectable media errors are remapped.  If a drive develops uncorrectable defects after formatting, the program badsect(8) must be used.

EXAMPLE

A sample run of format is shown below.  In this example (using a VAX-11/780), format is loaded from the console floppy; on an 11/750 format will be loaded from the root file system.  Boldface means user input.  As usual, “#” and “@” may be used to edit input. 

>>>L FORMAT
LOAD DONE, 00004400 BYTES LOADED
>>>S 2
Disk format/check utility
Debugging level (1=bse, 2=ecc, 3=bse+ecc)?
Disk name? hp(8,0)
Formatting unit 0 on hp1 verify (yes/no)? yes
Is this really what you want to do (y/n)? y
Device data: #cylinders=842, #tracks=20, #sectors=48
Available test patterns are:
1 - (f00f) rh750 worst case
2 - (ec6d) media worst case
3 - (a5a5) alternating 1’s and 0’s
Pattern (one of the above, other to restart)? 2
Start formatting...make sure the drive is online
 ...
(soft ecc’s and other errors are reported as they occur)
 ...
(if 4 write check errors were found, the program terminates like this...)
 ...
Errors:
Write check: 4
Bad sector: 0
ECC: 0
Skip sector: 0
Total of 4 hard errors found.
Writing bad sector table at block 524256
(524256 is the block # of the first block in the bad sector table)
Done
(...program restarts to allow formatting other disks)
(...to abort halt machine with ^P)

DIAGNOSTICS

The diagnostics are intended to be self explanatory. 

USING DEC SOFTWARE TO FORMAT

Warning:  These instructions are for people with 11/780 CPU’s.  The steps needed for 11/750 or 11/730 cpu’s are similar, but not covered in detail here. 

The formatting procedures are different for each type of disk.  Listed here are the formatting procedures for RK07’s, RP0X, and RM0X disks. 

You should shut down UNIX and halt the machine to do any disk formatting.  Make certain you put in the pack you want formatted.  It is also a good idea to spin down or write protect the disks you don’t want to format, just in case. 

Formatting a RK07.  Load the console floppy labled, "RX11 VAX DSK LD DEV #1" in the console disk drive, and type the following commands:

>>>BOOT
DIAGNOSTIC SUPERVISOR.  ZZ-ESSAA-X5.0-119  23-JAN-1980 12:44:40.03
DS>ATTACH DW780 SBI DW0 3 5
DS>ATTACH RK611 DMA
DS>ATTACH RK07 DW0 DMA0
DS>SELECT DMA0
DS>LOAD EVRAC
DS>START/SEC:PACKINIT

Formatting a RP0X.  Follow the above procedures except that the ATTACH and SELECT lines should read:

DS>ATTACH RH780 SBI RH0 8 5
DS>ATTACH RP0X RH0 DBA0 (RP0X is, e.g. RP06)
DS>SELECT DBA0

This is for drive 0 on mba0; use 9 instead of 8 for mba1, etc. 

Formatting a RM0X.  Follow the above procedures except that the ATTACH and SELECT lines should read:

DS>ATTACH RH780 SBI RH0 8 5
DS>ATTACH RM0X RH0 DRA0
DS>SELECT DRA0

Don’t forget to put your UNIX console floppy back in the floppy disk drive. 

SEE ALSO

bad144(8), badsect(8), newfs(8)

BUGS

An equivalent facility should be available which operates under a running UNIX system. 

It should be possible to define more precisely what a “hard ECC” error is; e.g. the maximum unacceptable ECC width. 

Sun System Release 0.3  —  25 February 1983

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026