BADTRK(M) XENIX System V BADTRK(M)
Name
badtrk - Scans fixed disk for flaws and creates bad track
table.
Syntax
badtrk [-e] [-s qtdn] [-f /dev/rhd*]
Description
Used chiefly during system installation, badtrk scans the
media surface for flaws, creates a new bad track table,
prints the current table, and adds and deletes entries to
the table.
WARNING: The -e flag should not be invoked by the user. It
is called by hdinit during installation to change the space
allocated for bad tracks. Use of the -e flag at any other
time may restructure the hard disk, rendering much of the
information stored on it unusable.
To use badtrk, you must be in single user mode. (See
shutdown(C)). To address the active partition on your
primary fixed disk, enter:
badtrk -f /dev/rhd0a
To address the active partition on your secondary fixed
disk, enter:
badtrk -f /dev/rhd1a
Usage
When badtrk is executed, the program first displays the main
menu:
1. Print Current Bad Track Table
2. Scan Disk (You may choose Read-Only or Destructive later)
3. Add Entries to Current Bad Track Table by Cylinder/Head Number
4. Add Entries to Current Bad Track Table by Sector Number
5. Delete Entries Individually From Current Bad Track Table
6. Delete All Entries From Bad Track Table
Enter your choice or `q' to quit:
You are prompted for option numbers, and, depending upon the
option, more information may be queried for later.
Page 1 (printed 8/7/87)
BADTRK(M) XENIX System V BADTRK(M)
A bad track table (option `1') might look like this:
Defective Tracks
_________________________________________
| Cylinder Head Sector Number(s)|
|________________________________________|
| 1. 190 3 12971-12987 |
|________________________________________|
Press <RETURN> to continue.
Option `2' scans the disk for flaws. If badtrk thinks
changes may have been made to your bad track table since
entering badtrk or updating your table, you will be asked if
you want to update the device with the new table before
scanning. You should answer `y' to save your changes, `n'
if you don't want to save changes made up to this point.
Next you are prompted for more information. After you
respond to these prompts, badtrk begins its scan. You can
interrupt a scan by typing ``q'' at any time. You are then
prompted to continue the scan or return to the main menu.
As the program finds flawed tracks, it displays the location
of each bad track. An example error message might be:
error on dev Fixed Disk (0/47), block=12954 cmd=0003 status=0018
sector = 12971, cylinder/head = 190/3
(You may see this kind of message if there is a read or write
error during the scanning procedure.)
When the scan is complete, the main menu reappears. The
program automatically enters any detected flaws in the bad
track table.
If there are no entries in your bad track table and a scan
does not reveal any flaws, but your disk is furnished with a
flaw map, you should enter these flaws into the bad track
table. Select either option `3' or `4' to add the entries.
(See next paragraph.)
To add flaw locations to an existing bad track table, select
either option `3' or option `4', depending upon the format
of the flaw map furnished with your disk. Enter the
defective tracks, one per line.
When you are satisfied that badtrk contains a table of the
desired flaws, quit the badtrk program by entering `q' at
the main menu.
Page 2 (printed 8/7/87)
BADTRK(M) XENIX System V BADTRK(M)
If badtrk was invoked with the -e option (which should only
occur when called by hdinit, during the installation
procedure), you are prompted for the the number of bad
tracks to allocate space for. There will be a recommended
number of replacement tracks to allocate based on the number
of known bad tracks plus an allowance for tracks that will
go bad in the future. You should choose to allocate at
least as many as the recommended number of replacement
tracks. Make your choice carefully, because if you want to
change this amount later, you will have to reinstall .
At this point, you are asked if you want to ``update''.
This is badtrk's way of asking if any changes which were
made should be saved. You should answer `y' to save your
changes, `n' to leave the bad track table as it was when
last updated.
Arguments
-f name
Opens the partition name and reads the bad track table
associated with that partition. The default is
/dev/rhd0a.
-s options
Invokes badtrk non-interactively. Valid options for
this flag are:
[q]uick
[t]horough
[d]estructive
[n]on-destructive
The -s flag takes two options at a time. Choose quick or
thorough scan, and destructive or non-destructive scan.
Notes
This utility can only be used in single-user mode.
If a bad spot develops in the inode table or superblock,
reinstallation is required.
Files
/etc/badtrk
Page 3 (printed 8/7/87)