Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ badtrk(ADM) — Xenix 2.3.4g

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     BADTRK(ADM)              XENIX System V               BADTRK(ADM)



     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 the
          information stored on it unusable.

          To use badtrk, you must be in single user mode.  (See
          shutdown(ADM)).  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

          WARNING: badtrk must be applied to a partition, not a whole
          disk, division, or filesystem.

     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 2/7/91)





     BADTRK(ADM)              XENIX System V               BADTRK(ADM)



          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 the type of scan: all or part of
          the disk, a thorough or quick scan, and whether it is
          destructive or not.  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.  Here is an example error message:

          wd: ERROR : on fixed disk ctlr=0 dev=0/47 block=31434
          cmd=00000020
              status=00005180, sector = 62899, cylinder/head = 483/4

          (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.

          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.  (This should only be done
          on non-remapped drives; see cautions under Notes.)

          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 2/7/91)





     BADTRK(ADM)              XENIX System V               BADTRK(ADM)



          If badtrk was invoked with the -e option (which should only
          occur when called by hdinit, during the  installation
          procedure), if you are reinstalling and you have a valid
          disk division table, the following message is displayed
          prior to the badtrk menu:

          This device contains a valid division table.  Additional
          (non-root) filesystems can be preserved across this
          reinstallation.  If you wish to be able to preserve these
          file systems later, you must not change the current limit of
          the bad track table, which is n bad tracks.  Do you wish to
          leave it unchanged? <y/n>:/s+1

          If you respond ``y'', you will not be prompted later to
          enter a new limit for the size of your bad track table.  You
          can add or delete entries, but you will not be allowed to
          increase the maximum number of bad tracks allocated.  If you
          respond ``n'' and the size of your bad track table is
          changed, your disk division table will be destroyed.

          If you do not have a valid disk division table or you
          selected ``n'' when prompted, you are prompted for the
          number of bad tracks to allocate.  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 the
          table, meaning if you wish to save the changes made.  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



     Page 3                                           (printed 2/7/91)





     BADTRK(ADM)              XENIX System V               BADTRK(ADM)



          thorough scan, and destructive or non-destructive scan.

     Notes
          This utility only applies to standard disk controllers and
          not SCSI host adapters or SMS-OMTI controllers.

          badtrk can only be used in single-user mode.

          If a bad spot develops in the boot blocks or system tables
          at the very beginning of the fdisk partition, reinstallation
          is required.

          Some disk controllers support alternate modes known as
          "translation," "mapping" or "63-sector" modes that change
          the apparent shape of the drive.  This is often used to make
          a drive that has more than 1024 cylinders appear to have
          less cylinders in order to make it compatible with MS-DOS.
          If your drive has been formatted using one of these options,
          do not use options 3 and 4 to manually add entries to the
          bad track.

     Files
          /etc/badtrk
































     Page 4                                           (printed 2/7/91)



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