Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

DIAG(8S)  —  MAINTENANCE COMMANDS

NAME

diag − General-purpose stand-alone utility package

SYNOPSIS

b stand/diag

DESCRIPTION

Diag is a general-purpose stand-alone utility package containing a grab-bag of the kinds of tools needed for disk initialization, testing, and file transfer.  Diag supports the various SMD and ST- 506 disk controllers. 

Note: that diag can only be called from the Sun Workstation PROM monitor — diag is not a system utility. 

The most common use of diag is formatting and labelling a disk — see the format, label, and partition commands. 

Diag is interactive — it prompts for options and arguments.  There are two phases to using diag: in the first phase, diag prompts for information about the type of disk drive and controller that it is working with, and essentially ‘configures’ itself to work with that disk and controller.  At the end of this phase, diag tries to access the disk controller you have defined.  If the attempt succeeds, diag gives you a status report on the disk and gives you a ‘diag>’ prompt; this signals the beginning of diag’s second phase. If the attempt to access the controller fails (if the controller is mis-defined or non-existent, for example), you get a bus error message, and return to the PROM monitor.

During diag’s second phase, you can use the commands listed below in response to the ‘diag>’ prompt.  A specific diag command is called up by typing enough characters to uniquely identify the command.  The commands that diag currently recognizes are:

clearSends a restore command to a disk.  This is needed to manually reset disk errors. 

diagRe-initializes the diag program itself — goes back to phase one of the inititialization process described above. 

errorsToggles an option to report all errors as they occur. 

fixFormats a single track (Interphase 2180 controller) or sector (Xylogics SMD controller) of a disk.  This sub-command is not available for use with Adaptec disk controllers (ST-506 interface).  If the track/sector is already formatted, you are asked for confirmation in order to avoid destroying the data on the track/sector. 

formatFormats a disk. 

help or ?Displays a list of the available commands. 

infoToggles an option to report all disk activity as it completes. 

labelLabels the disk. 

mapExplicitly maps one track or sector to a different track or sector.  Usually required for bad track mapping.  The format command usually does this automatically.  Note that, like the the fix command above, map is disk controller-dependent: you can map tracks with an Interphase controller, and sectors with Xylogics controllers.  map is not available for use with Adaptec disk controllers (ST-506 interface). 

partitionCreates, assigns, or modifies logical partition tables for a disk.  The UNIX operating system requires logical partitions.  The label command writes the partition map to the disk.  There are standard partition tables for each type of disk that diag knows about. 

positionTests the disk by reading sectors from random positions on the disk.  This command runs until the user aborts it by typing the letter ‘a’. 

quitQuits from diag and returns to whoever called it up. 

readReads specified blocks from the disk.  The read command prompts for the starting block number, number of blocks, and the block increment.  The read command doesn’t report the data it reads — it is intended for verifying that blocks are readable. 

seekPerforms a seek test on the disk such that a seek is made to every cylinder and a seek is made to every possible cylinder distance. 

statusReports the ready status of each drive on the current controller. 

testDoes a general disk test by writing random data to random positions on the disk and then verifying that the correct data can be read back.  The test command destroys data on the disk.  It runs until the user aborts the process by typing the letter ‘a’. 

timeToggles an option to turn timing on and off.  When timing is on, diag reports on how long things take — diag is less verbose in this state so it doesn’t waste time displaying messages. 

verifyReads and displays the label from the disk.  Shows the logical partition assignments.  This is usually done automatically when the format command has labelled the disk. 

writeWrites garbage data to specified blocks on the disk.  The write command prompts for the starting block number, number of blocks, and the block increment.  The write is intended for verifying that blocks are writeable. 

+Adds two numbers and reports the result in decimal, hexadecimal, and as a disk address. 

−Subtracts two numbers and reports the result in decimal, hexadecimal, and as a disk address. 

Block numbers may be entered either as an absolute decimal block number, or as a disk address of the form cylinder/head/sector. 

Any diag command may be aborted by typing a ^C (control-C). 

Sun Release 1.1  —  Last change: 19 March 1984

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