home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / HARDDISK / HDTESTNU.ZIP / HDTEST.DOC < prev    next >
Encoding:
Text File  |  1987-08-04  |  56.5 KB  |  1,199 lines

  1.           
  2.           Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher          _______________________________        _______________________________
  3.           
  4.           
  5.                                   USER-SUPPORTED SOFTWARE                                  _______________________
  6.           
  7.           Much of the software which is available for your computer seems to be
  8.           produced and sold on the assumption that you are a crook, and will
  9.           take any available opportunity to cheat its creators and vendors out
  10.           of their rightful reward. It is copy-protected within an inch of its
  11.           (and your computer's) life and is still priced at a level which
  12.           guarantees its producers a profit even if four or five illegal copies
  13.           are made for each one sold. User-supported software is different. You
  14.           may have got a copy of this package free from a friend or a bulletin
  15.           board or (for a nominal fee) from a users' group or software library.
  16.           In any case, you have a perfectly legal copy. You are further
  17.           encouraged to make as many copies of the package as you like and to
  18.           distribute them to all your friends. However, if, after trying the                                               ________                     
  19.           program out, you find that it is useful and want to keep it and
  20.           continue using it, you must register your copy by sending the                                 ____                                  
  21.           registration fee ($30.00,) together with a completed registration
  22.           form, to the address on the form. If you continue to use the program
  23.           after an appropriate trial period (and the "Shareware" system lets you                                                                             ___
  24.           determine what is appropriate), you are breaking both the terms of the
  25.           license under which you have received the software and the law. You
  26.           may believe that the chances of the law of Copyright being enforced
  27.           against you are very low (and you may even be right!), and the
  28.           distributors of "user-supported" software do, in fact, usually simply
  29.           have to trust you to be honest and willing to pay a reasonable price
  30.           for a useful program. However, you should bear in mind that
  31.           unsupported "Shareware" software is likely either to cease to exist
  32.           altogether or to go commercial. The former eventuality benefits nobody
  33.           - the latter only the "middlemen". Many of the commercial software
  34.           vendors also apparently assume that you are a crook - you can decide
  35.           whether you want to prove them right. As a bonus, registered users
  36.           will get a copy of V4.36 of HDTEST, which includes a number of
  37.           significant enhancements over V3.13, and will be entitled to support
  38.           and help with HDTEST-related problems (including telephone support)
  39.           for a year from the date of registration. Additional features in V4.36
  40.           included support for a wider variety of computer systems and storage
  41.           media, more detailed documentation of the meaning of HDTEST's
  42.           sometimes rather cryptic error messages, and a "fast" test mode. the
  43.           newest version also includes BIOS-level support for logical devices
  44.           created by means of IBM DOS 3.3's extended partitioning scheme and
  45.           allows more flexibility in the handling of unrecoverable read errors
  46.           in data-containing clusters.
  47.           
  48.           Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher          _______________________________        _______________________________
  49.           
  50.           
  51.           
  52.                                        INTRODUCTION                                       ____________
  53.           
  54.           This "Shareware" version of the HDTEST package may be copied and
  55.           distributed freely, provided that no changes are made to the programs
  56.           and/or documentation. The programs are fully functional, but they are
  57.           licensed to you for evaluation purposes only. If, after a reasonable                          ____________________________                        
  58.           trial period ("Shareware" gives you the right to determine what that                                          ___                                 
  59.           means), you decide that you wish to make HDTEST a permanent (or semi-
  60.           permanent) part of your software utility "toolkit", you must register                                                                  ____         
  61.           as a user by completing and returning the Registration Form which is
  62.           to be found at the end of this documentation, together with a check or
  63.           money order for the appropriate Registration Fee (U.S. $30.00, or
  64.           equivalent). Incidentally, if you try the package out and decide not                                                                           ___
  65.           to continue using it, I would appreciate it if you could drop me a
  66.           line explaining why you made that decision, particularly if the reason
  67.           is a bug or apparent bug in the program.
  68.           
  69.           HDTEST was written to allow comprehensive Read/Write testing of hard
  70.           disks on IBM PCs, XTs, ATs, and "true" compatibles. Although many
  71.           programs, including IBM's diagnostics, allow "surface scanning" and
  72.           seek testing of hard disks, none that are available to the average
  73.           user test whether the whole disk can retain the data that is or will
  74.           be written to it. HDTEST's principal "claim to fame" is the ability
  75.           thoroughly to test the surface of a hard disk which contains data
  76.           while preserving the data (although data loss is unavoidable if a          _________________________                                        
  77.           cluster which is in use has become unreadable).  HDTEST tests the disk                                               ____                             
  78.           much more thoroughly than programs such as DFixer, Mace, and Norton's
  79.           DT. Mace and DT, like many public domain "disk test" programs, simply
  80.           read every cluster on the disk and report on any errors encountered.
  81.           DFixer does better, writing 4 test patterns to every free cluster and
  82.           checking that they can be read back correctly, but it makes no attempt
  83.           to test clusters that are already in use - the very ones which contain
  84.           your precious data!
  85.           
  86.           HDTEST writes 20 different test patterns to every cluster on the disk                                                      _____                    
  87.           and checks that each pattern can be read back correctly, while
  88.           preserving the contents of the clusters that already contain data.
  89.           HDTEST can also (on most systems) detect errors which are minor enough
  90.           to be correctable (and corrected) by the disk controller's own "error-
  91.           correcting code" (ECC).  These errors are normally totally invisible
  92.           to programs running under DOS and will not usually be picked up by
  93.           other disk test utilities.  They may, however, be early signs of a
  94.           problem that will become significant later, and HDTEST will
  95.           consequently mark the offending cluster as bad. As long as HDTEST can
  96.           read the data from a flaky cluster correctly once (and it tries quite
  97.           hard) the program will be able to save the file of which that cluster
  98.           is a part intact, while marking the cluster so that DOS does not try                    ______                                                    
  99.           to use it again. The program was designed to minimize the likelihood
  100.           of user error causing data loss on a good (or slightly bad) disk, and
  101.           to be easy to use - it could not be designed to be fast, since
  102.           multiple bit patterns have to be written to and read from each
  103.           cluster, and this takes time. The program can be used to test single
  104.           and double-sided 8- and 9-sector floppy disks (if you have plenty of                                                                     ______   
  105.           patience!), as well as AT-format 1.2Mb floppies (with the same
  106.           proviso).
  107.           
  108.           
  109.           
  110.                                           Page 2                                
  111.           
  112.           Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher          _______________________________        _______________________________
  113.           
  114.           
  115.           HDTEST's companion program, HDCHEK, simply examines the logical
  116.           structure of the device and reports on what it finds. It does not
  117.           write to the disk, and is provided principally to allow a quick and
  118.           easy, but fairly reliable, check on the compatibility between HDTEST
  119.           and a given software/hardware configuration. In general, if HDCHEK                                                       ___________          
  120.           runs successfully on a system, then HDTEST can be expected to do so,
  121.           although the latter program does require more memory.
  122.           
  123.           The HDTEST package is distributed as "User-supported Software". If you
  124.           find it useful, you are asked to become a registered user by sending a
  125.           completed copy of the Registration Form (which is included in this
  126.           documentation), together with a check or money order for $30.00
  127.           ($40.00 Canadian, $25.00 Sterling) to me at the address which appears
  128.           on the form (and on the program's copyright screen). I will send you a
  129.           personalised copy of the latest, considerably enhanced, version of the
  130.           HDTEST package (V4.34), and register you for a year's support.
  131.           Registration entitles you to be notified of upgrades, bug fixes, newly
  132.           discovered incompatibilities, etc., and to ask for (and get) necessary
  133.           help in adapting the program to work on your hardware. I cannot guar-
  134.           antee to make HDTEST work with every possible combination of hardware
  135.           and software, but I will promise to try to solve problems as they come
  136.           up, and I will return your registration fee if I cannot support your
  137.           system.  Support will be available TO REGISTERED USERS ONLY by mail,                                             ________________________         
  138.           BIXmail, Compuserve EMail and telephone. Please also bear in mind that
  139.           my willingness and ability to continue to support and enhance these
  140.           programs will be directly dependent on your willingness to pay the
  141.           registration fee and (to some extent) inversely dependent on the
  142.           number of questions I get that could be answered by reading the docu-
  143.           mentation(!).
  144.           
  145.           The HD programs were written principally in C, compiled by the
  146.           Microsoft C compiler (Version 4.00) using its "small" memory model,
  147.           and linked with code from the distributed Microsoft C object libraries
  148.           using the Microsoft LINK program (Version 3.51).  Additional assembly
  149.           language routines were assembled by the Microsoft MASM Macro Assembler
  150.           (Version 4.00). Portions of the distributed program are consequently
  151.           Copyright (C) by Microsoft Corp., 1985, 1986. All rights reserved.
  152.           These portions are used under the terms of a license from Microsoft
  153.           Corp.
  154.           
  155.           The HD programs were written with care and have been extensively
  156.           tested on a number of different systems.  I cannot, however, give any
  157.           guarantee as to their performance on a specific system, nor can I
  158.           accept liability for any actual or consequential loss resulting from
  159.           their use. The programs may only be used and/or copied in their
  160.           original form. Unauthorised modifications and/or the use of all or
  161.           part of the programs in other software, commercial or otherwise, are
  162.           strictly prohibited.
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.           
  173.           
  174.                                           Page 3                                
  175.           
  176.           Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher          _______________________________        _______________________________
  177.           
  178.           
  179.           
  180.                                       GETTING STARTED                                      _______________
  181.           
  182.           This section gives step by step instructions for running HDCHEK and
  183.           HDTEST on the C: drive of a standard IBM PC, XT, or 100% compatible.
  184.           Owners of ATs or AT clones may safely follow these instructions, too,
  185.           but proper testing of disks on these machines requires the /A command
  186.           line flag to be used, as discussed in later sections. The following
  187.           sections also go into much more detail about some of the program's
  188.           other features and options, and should help to explain and let you
  189.           deal with any problems which you may encounter.
  190.           
  191.           1) (If you obtained a copy of the package on a floppy disk) Use DOS's
  192.           DISKCOPY program to make a duplicate of the distribution disk, put the
  193.           original away in a safe place, and use the duplicate as your working
  194.           disk.
  195.           
  196.           2) Make sure that you have current backups of all the files on drive
  197.           C:. This is particularly important when running the HD program for the
  198.           first time on a new system.
  199.           
  200.           3) Run DOS's CHKDSK program on drive C: and correct any errors
  201.           reported by it before proceeding further.
  202.           
  203.           4) Make the drive and/or directory which contains HDCHEK.EXE and
  204.           HDTEST.EXE your current drive and/or directory.
  205.           
  206.           5) Insert a formatted, non-write-protected floppy disk in drive A. A
  207.           log file called HDTEST.LOG will be written to this disk - any other
  208.           files on it will be undisturbed.
  209.           
  210.           6) Give the command: "HDCHEK C:". After a certain amount of disk
  211.           activity has taken place, and certainly within a minute or two, your
  212.           screen should look like one of the examples given in Appendix B. If
  213.           any errors are reported, DO NOT PROCEED until you have read the rest                                   ______________                             
  214.           of the documentation and/or are sure you know what is going on.
  215.           
  216.           7) If HDCHEK reported no errors, give the command "HDTEST C: A:".             ____________________________                                  
  217.           After some disk activity, the program will prompt for replies to three
  218.           questions - press <Return> in response to each prompt. The program
  219.           will report its progress to the screen and will record any problems
  220.           encountered in the log file on the floppy disk. Depending on the size
  221.           of your DOS partition and the access time of the disk, a complete run
  222.           of HDTEST will take between 2 and 5 hours. Your intervention will only                                              _____                             
  223.           be required if a bad cluster is found in a "hidden", "system", or
  224.           write-protected file, when you will be asked to approve remapping;
  225.           otherwise, bad clusters will be automatically remapped. HDTEST can be
  226.           aborted at any time by pressing <Esc> and responding to the "Are you
  227.           sure...." prompt by pressing <Return>.
  228.           
  229.           8) If HDTEST finishes testing without finding any bad clusters, it
  230.           will simply record that fact and the finishing time in the log file
  231.           and return to the DOS prompt. Otherwise, when read/write testing has
  232.           been completed, you will be prompted for permission to complete the
  233.           remapping process by updating the disk FATs and Directories.  Pressing
  234.           <Return> will allow this to take place, and you will then be returned
  235.           to the DOS prompt.
  236.           
  237.           
  238.                                           Page 4                                
  239.           
  240.           Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher          _______________________________        _______________________________
  241.           
  242.           
  243.           
  244.           9) If HDTEST reported and remapped some bad clusters, see the section
  245.           on "Dealing with bad clusters" later in this documentation.
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.           
  301.           
  302.                                           Page 5                                
  303.           
  304.           Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher          _______________________________        _______________________________
  305.           
  306.           
  307.           
  308.                              HARDWARE & SOFTWARE REQUIREMENTS                             ________________________________
  309.           
  310.           HDTEST and HDCHEK make a number of assumptions about the environment
  311.           in which they are operating. They will, generally speaking, abort with
  312.           an informative error message if they find one of these assumptions to
  313.           be untrue! They require MS/PC-DOS 2.x or above and (for HDTEST) up to
  314.           about 256 Kb of free memory (the exact amount required depends on the
  315.           characteristics of the device being tested) to run - the presence of
  316.           more memory may (slightly) increase HDTEST's speed when testing
  317.           devices with large cluster sizes. The device to be tested must have
  318.           been initialized by FDISK and FORMATted by the DOS utility; only the
  319.           first DOS partition of a multi-partition disk can be tested by this
  320.           Shareware version of the program, although the Registered version of
  321.           HDTEST does allow testing of all DOS partitions.  For this reason, if
  322.           you wish to use V3.12 of HDTEST to test a new hard disk which is to                                             ____                            
  323.           contain multiple partitions, you should first configure it as a single
  324.           DOS partition, test it in that configuration, and then reconfigure it
  325.           to its final form. Note that, under these circumstances, HDTEST is
  326.           only a test - when you repartition the disk, any remapping and/or          ____                                                             
  327.           marking of bad clusters which it may have done is lost. The BIOS
  328.           handler for interrupt 13 must be capable of handling (at least) normal
  329.           disk reads and writes (sub-functions 2 and 3) in a way that is
  330.           compatible with that documented for the XT and AT disk adapters in
  331.           IBM's technical documentation (the Registered version of the program
  332.           also relaxes this restriction). This should be no problem for most
  333.           disk systems on IBM PCs and most compatibles.  HDTEST V3.12 may not,
  334.           however, be usable with non-bootable hard disks and/or with hard disks
  335.           which require special device drivers to be installed.
  336.           
  337.           If run under DOS 3.0 or above, HDTEST attempts to locate and use the
  338.           ROM BIOS INT 13 entry point, rather than the normal INT 13 vector
  339.           (which DOS 3.x intercepts and interferes with). By default, unless the
  340.           /A or /D flag is set, the program assumes that, if a ROM is present at                                                          ___________________   
  341.           absolute address C8000H, it contains the hard disk BIOS and has                                                                  ___    
  342.           initialization code starting at offset 3. This assumption is true for
  343.           all hard disks which "plug in" to the IBM PC and XT. It may not be
  344.           true for all clones which come with hard disks installed, although it
  345.           is likely to be true for most of them. The AT and some of its clones
  346.           have no ROM at all at this location, which is OK, too, even if you
  347.           forget to use the /A flag (but see para 5 in the "Limitations and
  348.           Restrictions" section). Problems (up to and including system halts)
  349.           may occur if neither flag is set and there is a ROM at C8000H but it                                                     __                       
  350.           does not control the hard disk. They are almost guaranteed if the               ___                                                         
  351.           initialization code does not start at offset 3 in the ROM. If you have
  352.           problems running HDCHEK and HDTEST on such systems, try running the
  353.           programs with the /D flag (for PCs and XTs) or the /A flag (for ATs).
  354.           
  355.           Note that, since HDTEST remaps bad clusters to free space, there is
  356.           not much point in running it on a disk which has none (as shown by
  357.           DIR or CHKDSK), since it will abort immediately if it finds a bad
  358.           cluster.  Unless you have a really flaky disk, however, you should not
  359.           need more than a couple of hundred Kb free to remap any reasonably
  360.           probable number of bad clusters.
  361.           
  362.           ANSI.SYS, or another ANSI console driver, should be installed on those
  363.           systems (including the IBM family) which do not support ANSI screen
  364.           
  365.           
  366.                                           Page 6                                
  367.           
  368.           Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher          _______________________________        _______________________________
  369.           
  370.           
  371.           I/O in Video BIOS - nothing terrible will happen if ANSI.SYS is not
  372.           installed, but the screen display will be very strange (!!). The HD
  373.           programs have been tested and run with NANSI.SYS and FANSI-Console,
  374.           both of which have advantages (for uses other than running HDTEST!)
  375.           over the DOS driver and are also distributed as Shareware.
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.           
  429.           
  430.                                           Page 7                                
  431.           
  432.           Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher          _______________________________        _______________________________
  433.           
  434.           
  435.           
  436.                                LIMITATIONS AND RESTRICTIONS                               ____________________________
  437.           
  438.           The current version of HDTEST has a few limitations, most of which
  439.           result from the way data is stored internally by the program. None of
  440.           them are "etched in stone", although some could only be avoided at the
  441.           cost of slowing down what is already far from a fast process. The
  442.           known limitations are as follows:
  443.           
  444.           1) Maximum number of clusters per disk = 24,000 (this number is
  445.           approximate, because it depends on dynamic memory allocation). This
  446.           limit may be increased to 32,768 in a subsequent version of the
  447.           program.
  448.           
  449.           2) Maximum cluster size = 65,528 bytes. I do not believe that a DOS
  450.           disk can ever have clusters larger than 64 Kb, but my limit is a few
  451.           less than that and may, since sector and cluster sizes tend to run in
  452.           powers of 2, effectively limit cluster size to 32 Kb - this should be
  453.           enough for most people!.
  454.           
  455.           3) Because of certain inherent limitations in the chips used to
  456.           support direct memory access (DMA, the method used to transfer data
  457.           from disk to memory and vice versa), HDTEST may be unable to use free
  458.           memory efficiently when cluster sizes are large. This can result in
  459.           "Insufficient Memory" or "Memory Allocation" errors, even on systems
  460.           with more than the minimum 256 Kb of free memory prescribed above. The
  461.           only cure for this is to free up (or buy!) more memory (remove
  462.           RAMdisks, remove resident software, etc.).
  463.           
  464.           4) The current version of HDTEST will run on ATs and some AT clones,
  465.           but may not, even with the /A flag set, be able to detect corrected
  466.           ECC errors when run on some of the clones - a warning message will be
  467.           displayed when the program initializes itself if corrected ECC errors
  468.           are not being detected.  The program will also not detect corrected
  469.           ECC errors when invoked with the /D flag (under DOS 3.0 or above).
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.           
  493.           
  494.                                           Page 8                                
  495.           
  496.           Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher          _______________________________        _______________________________
  497.           
  498.           
  499.           
  500.                                    RUNNING THE PROGRAMS                                   ____________________
  501.           
  502.           Always run HDCHEK on any new hardware/software configuration before
  503.           you attempt to run HDTEST (at least the first time). The latter
  504.           program has been written as conservatively as possible, but it is not
  505.           possible to predict the behavior of every conceivable combination of
  506.           hardware and operating system when dealing with a program which
  507.           bypasses most of the controls which normally protect the user from
  508.           destroying his world. HDCHEK is invoked with the command line:
  509.           
  510.                           HDCHEK device [/A] [/D]
  511.           
  512.           "device" is the device to be tested (e.g. A:, B:, etc. - the colons
  513.           are permitted but not required).                            ___           
  514.           
  515.           The /A(T) flag is used to tell the HD program that it is being run on
  516.           an AT or AT-clone (which has its hard disk BIOS in a ROM at F0000H,
  517.           rather than C8000H).
  518.           
  519.           The /D(OS interrupt) flag has no effect under DOS 2.x.  Under DOS 3.0
  520.           or above, it forces HDCHEK to use the existing INT 13 vector (which it
  521.           always does under DOS 2.x), and prevents the program from trying to
  522.           determine the ROM BIOS entry point; the flag should be used if you
  523.           know that your system's fixed disk BIOS does not follow IBM's "rules"
  524.           or if the program crashes the system when invoked without it.
  525.           
  526.           After a short delay, during most of which the specified device will be
  527.           active, a description of the device's logical structure will be disp-
  528.           layed.  After a further delay, and more disk activity, a message will
  529.           be printed giving the number of files and subdirectories found on the
  530.           disk, and the program will exit back to DOS. Note that the total
  531.           number of files and subdirectories reported by HDCHEK will be greater
  532.           than the sum of the counts reported by CHKDSK. This is because HDCHEK
  533.           counts the "." and ".." entries in subdirectories and CHKDSK doesn't.
  534.           
  535.           Errors and/or problems encountered, if any, will be reported on in
  536.           some detail. A number of example screen displays and log files
  537.           produced by running HDCHEK (and HDTEST) on different systems will be
  538.           found in Appendix B at the end of this documentation.
  539.           
  540.           Always run the DOS CHKDSK program immediately before running HDTEST on
  541.           a disk. If CHKDSK reports any problems, its /F option (or other means)
  542.           should be used to correct them before HDTEST is run.                                         ____________________ 
  543.           
  544.           HDTEST is invoked with the command line:
  545.           
  546.               HDTEST device1 [device2] [/A] [/B] [/D] [/N] [/P] [/Snnnnn]
  547.           
  548.           "device1" is the device to be tested, as for HDCHEK. "device2" (which,
  549.           if present, must be different from "device1") is the name of a device
  550.           on which a log file (called HDTEST.LOG) is to be written. If "device2"
  551.           is not specified, errors are reported to the console terminal and                                                                        ___
  552.           should not be redirected.          ________________________ 
  553.           
  554.           The /A and /D flags have the same meaning and effect that they do for
  555.           HDCHEK.
  556.           
  557.           
  558.                                           Page 9                                
  559.           
  560.           Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher          _______________________________        _______________________________
  561.           
  562.           
  563.           
  564.           The /B(oot/Partition sector test) flag forces the program to include
  565.           the boot/partition sector (track 0, head 0, sector 1) in the DOS area
  566.           for the purposes of read/write testing. The default action is only to
  567.           perform read and seek tests on this sector, even if read/write testing
  568.           of the DOS area is specified. Since the boot/partition sector is
  569.           effectively read-only under normal circumstances (it is only written                                                                       _______
  570.           to during low-level formatting and by FDISK), read/write testing is          __                                                                 
  571.           less vital than for the rest of the disk. In addition, at least one
  572.           hard disk controller (a Western Digital board which allows a single
  573.           physical disk to be divided into two logical disks) will not allow
  574.           test patterns to be written to this sector.
  575.           
  576.           The /N(o Query) flag disables the individual prompts for confirmation
  577.           which the program normally issues before remapping clusters which are
  578.           marked as "Reserved" or which are part of a file which is marked as
  579.           "System", "Hidden", or "Readonly".  The /N flag does not prevent the                                                               ___            
  580.           program from prompting for confirmation before updating the disk.
  581.           
  582.           The /P(rint) flag causes the log file to be directed to the PRN device
  583.           (normally LPT1), and overrides any "device2" specification that may
  584.           have been given.
  585.           
  586.           The /S(tart) flag causes HDTEST to start testing occupied clusters at                                                           ________            
  587.           cluster number nnnnn (expressed as a decimal number). There must be no
  588.           space between the "S" and the number. This option will mainly be
  589.           useful when a previous run of HDTEST was interrupted (by pressing
  590.           <Esc>), since it allows you to start where you left off. Note that, in
  591.           order to be sure that data is not remapped to a bad area, HDTEST
  592.           always tests all empty clusters before starting to test occupied          ______       ___                                                
  593.           clusters. For this reason, using the /S flag will not result in a
  594.           large time saving if your disk is nearly empty, and will make the most
  595.           difference on a full, or nearly full, disk.
  596.           
  597.           After displaying its copyright message, HDTEST reads the FATs and
  598.           scans the root directory and all subdirectory trees of the specified
  599.           device before initiating a short dialogue. All questions are of the
  600.           "Yes/No" type and should be answered by typing "Y" or "N" (case does
  601.           not matter) and pressing the <Return> key.  Pressing the <Return> key
  602.           alone is equivalent to giving the default response (which appears in
  603.           square brackets at the end of each prompt).  HDTEST then proceeds to
  604.           test the specified device. By default, the DOS area (boot sector,
  605.           FATs, and root directory) is not subjected to Read/Write testing,
  606.           since failures in this area usually make themselves apparent fairly
  607.           rapidly. The user can, however, choose to run these tests on the DOS
  608.           area too, or to limit testing to read and seek tests only over the
  609.           whole partition.
  610.           
  611.           In its reports to the screen, HDTEST uses the convention that read-
  612.           only testing is "Checking" while read/write testing is "Testing" - it
  613.           always "checks" the boot/partition sector and the rest of the DOS
  614.           area, but only "tests" them if requested to do so.
  615.           
  616.           In "checking" or "testing" a block (sector or cluster), HDTEST first
  617.           reads it (retrying, if necessary, up to five times) and then does the
  618.           longest possible seek away from it before attempting to read it again.
  619.           "Checking" is complete at this point. "Testing" continues with the
  620.           
  621.           
  622.                                          Page 10                                
  623.           
  624.           Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher          _______________________________        _______________________________
  625.           
  626.           
  627.           program sequentially writing 20 different bit patterns to the block
  628.           and checking that each one can be read correctly, before rewriting the
  629.           original contents of the block (and checking to ensure that it has
  630.           been restored correctly). Errors that occur at any point in this
  631.           process are reported and (if the block is in the data area - errors in
  632.           the DOS area are always treated as fatal) the block is remapped. If an
  633.           error is detected in a "Reserved" cluster or in one that is part of a
  634.           file which is marked as "System", "Hidden", or "Readonly", the user is
  635.           normally asked for confirmation before the cluster is remapped,
  636.           otherwise it is assumed that remapping is desirable.
  637.           
  638.           HDTEST keeps a copy of the FAT and a map of the device's directory
  639.           structure in memory. A bad cluster is remapped by transferring its
  640.           contents to a free cluster and (if it was in use) changing all
  641.           necessary FAT and directory entries so that the pointer chain which
  642.           maintains the structure of the affected file or subdirectory remains
  643.           valid. The bad cluster's FAT entry is then altered to identify it as
  644.           bad to DOS. The disk's FATs and directories are not altered until the                          ______                                               
  645.           whole disk has been scanned, and then only after the user has
  646.           confirmed that it is OK to proceed. This means that a power failure
  647.           and/or an inadvertent power-off which occurs while the program is
  648.           running will cause the loss of, at most, one cluster of data and of no
  649.           FAT or root directory information (unless you are very unlucky and it                                                            ____               
  650.           happens after you have confirmed that you want a damaged data area to
  651.           be remapped and while this is being done). If a power failure and/or
  652.           power-off occurs while a cluster which contains the directory
  653.           information of a subdirectory is being tested, part or all of that
  654.           subdirectory will probably become inaccessible to DOS, although the
  655.           data in it will remain on the disk and be potentially recoverable with
  656.           the aid of (e.g.) the Norton Utilities (TM).
  657.           
  658.           You can safely interrupt the testing process part way through (by
  659.           pressing the <Esc> key) with no risk of leaving a partially updated
  660.           FAT or directory. If you do interrupt the program in this way, you
  661.           will still be given the option of updating the disk, so that bad
  662.           clusters which were detected before <Esc> was pressed can be remapped.
  663.           
  664.           Errors which occur in the program's initialization phase cause it to
  665.           abort with an error message and (sometimes) a hexadecimal error code.
  666.           The meaning of the error code is context-dependent. Errors detected
  667.           during read-write testing only cause the program to abort if they
  668.           occur during testing of the DOS area, or if remapping is impossible
  669.           (only likely to happen if the disk is full). In any event, a
  670.           description of the error is written to the log file (if any) or to the
  671.           screen. This specifies the cluster or (for the DOS area) sector
  672.           number and the name of the affected file (if any), and defines the
  673.           type(s) of error which occurred.
  674.           
  675.           HDTEST takes a very long time to run to completion because of the                         ____                                              
  676.           large number of reads and writes it does for each cluster. A typical
  677.           time for an XT disk (10 Mb) would be 2 hrs; full disk testing on a 30
  678.           Mb AT Plus takes at least 4 hrs.
  679.  
  680.  
  681.  
  682.  
  683.  
  684.           
  685.           
  686.                                          Page 11                                
  687.           
  688.           Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher          _______________________________        _______________________________
  689.           
  690.           
  691.           
  692.                                  DEALING WITH BAD CLUSTERS                                 _________________________
  693.           
  694.           It is, unfortunately, not unusual for a new hard disk to have a small,                                                                          ______
  695.           constant, number of bad clusters. IBM's quality control standards          ________                                                         
  696.           allow, for example, 5% of the surface area of a disk to be bad (!).
  697.           These bad clusters, which correspond to imperfections in the magnetic
  698.           coating on the disk, will normally be detected and marked by the DOS
  699.           FORMAT program and HDTEST will report them as "already marked as bad".
  700.           This should not be regarded as evidence of any real problem with the
  701.           disk, although some suppliers (not including IBM) will replace such                                         ___                                 
  702.           disks under warranty if pressed to do so.  It is also not unusual for
  703.           a disk to develop a few more defects as it ages. When these do                              ___                                       
  704.           develop, they are also usually constant in size and position, and will
  705.           be reported as "already marked as bad" by HDTEST on runs subsequent to
  706.           that during which they are first found. The occasional appearance (and                                                      __________                
  707.           subsequent persistence) of a new bad cluster is, therefore, not
  708.           necessarily evidence of serious trouble developing.  However, if more
  709.           than one or two new bad clusters are reported by HDTEST, and
  710.           especially if two consecutive runs of HDTEST report different bad                                                              _________    
  711.           clusters, there is a good chance that the hard disk or controller is
  712.           developing a serious problem - the disk should be backed up
  713.           immediately and the system sent for repair at the earliest opportunity.
  714.           
  715.           New bad clusters in the data area are automatically mapped out by
  716.           HDTEST, and no further action is necessary. Bad sectors in the DOS
  717.           area can be handled in two ways:
  718.           1) If you are able to do a low-level format on your hard disk (most                                     _________                               
  719.           makers of "add-on" hard disks supply a method of doing this, either in
  720.           the form of a short program, or by giving instructions for running a
  721.           program in the ROM BIOS from DEBUG), back up the entire hard disk                                                           ______          
  722.           (including any non-DOS partitions), run the low-level format, use
  723.           FDISK to repartition the disk, and then run the DOS FORMAT program. If
  724.           HDTEST now reports no errors in the DOS area you can restore all your
  725.           files and continue to use the disk. You should, however, use HDTEST to
  726.           test (at least) the DOS area fairly frequently for a month or so to be
  727.           sure that the problems are not going to recur.
  728.           2) If you do not have the wherewithal to do a low-level format, or if
  729.           you follow the above instructions and HDTEST continues to report bad
  730.           sectors in the DOS area, your only other choice is to back up the DOS
  731.           partition, reconfigure the disk with FDISK so that the new DOS
  732.           partition starts above the bad area, reFORMAT it, and restore all of
  733.           the old files to the new DOS partition (which will unavoidably be a
  734.           little smaller than the old).
  735.           
  736.           If absolute sector zero (track 0, Head 0, sector 1) really becomes
  737.           bad, the disk must be replaced. This sector is only subjected to
  738.           read/write testing if the /B flag is specified on the command line, so          __________                                                            
  739.           any reported errors (in sector -1) during normal testing represent a                                         __                                   
  740.           problem reading the sector and are likely to be significant. Problems                  _______                                                      
  741.           encountered during read/write testing of this sector do not always                                                                  ___       
  742.           indicate a bad disk - certain controller cards may not allow test
  743.           patterns to be written to it, resulting in multiple errors on
  744.           read/write testing. Consequently, if multiple errors are reported on
  745.           read/write testing of this sector, but read-only testing proceeds
  746.           without problems and the rest of the disk seems to be OK, there is
  747.           probably no cause for concern.
  748.           
  749.           
  750.                                          Page 12                                
  751.           
  752.           Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher          _______________________________        _______________________________
  753.           
  754.           
  755.           
  756.                             BUGS AND OTHER UNPLEASANT SUBJECTS                            __________________________________
  757.           
  758.           Although, like all programmers, I like to think that my product is
  759.           perfect, it is possible that there are a few bugs lurking in the
  760.           depths of the program, and likely that some combination of software
  761.           and hardware exists which HDTEST cannot figure out and/or cope with.
  762.           If you think you have found a bug and/or if you cannot get either of
  763.           the programs to work on your system, do the following:
  764.           
  765.           1) Reread this documentation! Make sure that you are doing exactly
  766.           what the documentation says to do. Make sure (if you are testing a
  767.           drive with removable media) that the media is not write-protected.
  768.           
  769.           2) Boot your system from a "virgin" DOS disk - preferably a copy of
  770.           your DOS distribution disk - and try to run the HD programs again. If
  771.           they run in this environment but not in your normal DOS environment,
  772.           try reconstructing the system under which they failed by adding things
  773.           one by one until the problem recurs. If you find a specific piece of
  774.           software which causes the trouble, let me know about the
  775.           incompatibility.
  776.           
  777.           3) If the above approaches do not help, or if HDCHEK runs but HDTEST
  778.           bombs (the reverse should never happen), send me as detailed a
  779.           description of the problem as possible and, if you are a Registered                                                      _______________________
  780.           User, I will do my best to diagnose and fix it. A bug report should          _____                                                              
  781.           always include a full description of the system being used, as well as          ______           ____                                                 
  782.           the output from a run of HDCHEK.
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.           
  813.           
  814.                                          Page 13                                
  815.           
  816.           Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher          _______________________________        _______________________________
  817.           
  818.           
  819.           
  820.                               CHANGES FROM PREVIOUS VERSIONS                              ______________________________
  821.           
  822.           The first version released (other than beta-test versions) was V2.60.
  823.           
  824.           
  825.           Version 3.13 (this version) -
  826.           
  827.           The following (visible) changes have been made in HDCHEK:
  828.           
  829.           1) Minor bug in V2.60 (which resulted in a failed directory scan if
  830.           HDCHEK was run on a write-protected device) fixed (at V2.71).
  831.           
  832.           2) /A option for full functionality on ATs and AT clones added (at
  833.           V3.00).
  834.           
  835.           The following (visible) changes have been made in HDTEST:
  836.           
  837.           1) Bug in V2.60 (which could cause bad termination of the program and
  838.           possible subdirectory inconsistencies if a sector which was not in use
  839.           was found to be bad) fixed (at V2.70).
  840.           
  841.           2) Bug in V2.70 (which caused the program to enter a terminal input
  842.           loop if ANSI.SYS was not loaded and <Esc> was entered to abort it)
  843.           fixed (at V2.73).
  844.           
  845.           3) Assorted minor bugs and deficiencies in error reporting and
  846.           termination routines fixed (V3.00 to V3.11).
  847.           
  848.           4) Bug causing improper handling of multiple corrected ECC errors on
  849.           first read fixed (at V3.12).
  850.           
  851.           5) Internal changes made to avoid interference with expanded memory
  852.           device handlers (at V2.72).
  853.           
  854.           6) Disk reset before retry on all errors enabled (at V3.00).
  855.           
  856.           7) Absolute limit on number of files and directories on device removed
  857.           (at V3.00).
  858.           
  859.           8) Ability to update disk after program terminated by user (typing
  860.           <Esc>) added (at V2.70).
  861.           
  862.           9) Total sector or cluster count shown on screen during testing along
  863.           with current sector or cluster number (at V3.01).
  864.           
  865.           10) /S option to start checking occupied clusters at a given cluster
  866.           number added (at V2.70).
  867.           
  868.           11) /A option for full functionality on ATs and AT clones added (at
  869.           V3.00).
  870.           
  871.           12) /B option to include the boot/partition sector in the DOS area for
  872.           the purposes of read/write testing added. This sector was previously
  873.           automatically included in the DOS area. (added at V3.00)
  874.  
  875.  
  876.           
  877.           
  878.                                          Page 14                                
  879.           
  880.           Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher          _______________________________        _______________________________
  881.           
  882.           
  883.           
  884.                            APPENDIX A - SUMMARY OF FLAG SETTINGS                           _____________________________________
  885.           
  886.           /A(T) - used to tell the HD program that it is being run on
  887.           an AT or AT-clone (HDCHEK and HDTEST).
  888.           
  889.           /B(oot/Partition sector test) - used to include the hard disk
  890.           boot/partition sector in the DOS area for the purposes of read/write
  891.           testing (HDTEST only).
  892.           
  893.           /D(OS interrupt) - forces the program to use the existing INT 13
  894.           vector.  This is the default under DOS 2.x (HDCHEK and HDTEST).
  895.           
  896.           /P(rint) - causes the log file to be directed to the PRN device
  897.           (HDTEST only).
  898.           
  899.           /N(o Query) - disables the individual prompts for confirmation which
  900.           the program normally issues before remapping "special" clusters - does
  901.           not prevent the program from prompting for confirmation before          ___                                                           
  902.           updating the disk (HDTEST only).
  903.           
  904.           /Snnnnn - causes HDTEST to start testing occupied clusters at                                                   ________            
  905.           cluster number nnnnn (expressed as a decimal number) (HDTEST only).
  906.           
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.           
  941.           
  942.                                          Page 15                                
  943.      
  944.      Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher     _______________________________        _______________________________
  945.      
  946.      
  947.  
  948.                    APPENDIX B - EXAMPLE PROGRAM RUNS                   _________________________________
  949.  
  950.      Screen display from successful run of HDCHEK on 14 Mb DOS partition of
  951.      20 Mb hard disk:
  952.  
  953. Device C: is the DOS partition of a hard disk.
  954. It contains 29104 sectors.
  955. Total partition size is approximately 14 Mb.
  956. It starts at absolute sector 8364 on the disk.
  957. There are 4 heads and 17 sectors/track.
  958. Sector size is 512 bytes.
  959. Each (12 bit) FAT occupies 11 sectors.
  960. The Root Directory occupies 32 sectors.
  961. The data area starts at DOS sector 55, and contains 3631 clusters, each
  962. consisting of 8 sectors.
  963. The directory scan was successful; a total of 1018 files and subdirectories
  964. was found.
  965.  
  966.  
  967.  
  968.      Screen display from successful run of HDCHEK on DSDD 9-sector floppy disk:
  969.  
  970. Device A: is a floppy disk.
  971. The disk contains 720 sectors.
  972. There are 2 heads and 9 sectors/track.
  973. Sector size is 512 bytes.
  974. Each (12 bit) FAT occupies 3 sectors.
  975. The Root Directory occupies 7 sectors.
  976. The data area starts at DOS sector 12, and contains 354 clusters, each
  977. consisting of 2 sectors.
  978. The directory scan was successful; a total of 38 files and subdirectories
  979. was found.
  980.  
  981.  
  982.  
  983.      Screen display from run of HDCHEK on 14 Mb DOS partition - directory
  984.      structure bad or unrecognizable:
  985.  
  986. Device C: is the DOS partition of a hard disk.
  987. It contains 29104 sectors.
  988. Total partition size is approximately 14 Mb.
  989. It starts at absolute sector 8364 on the disk.
  990. There are 4 heads and 17 sectors/track.
  991. Sector size is 512 bytes.
  992. Each (12 bit) FAT occupies 11 sectors.
  993. The Root Directory occupies 32 sectors.
  994. The data area starts at DOS sector 55, and contains 3631 clusters, each
  995. consisting of 8 sectors.
  996. The preliminary directory scan failed.
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.      
  1005.      
  1006.                                     Page 16                                
  1007.      
  1008.      Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher     _______________________________        _______________________________
  1009.      
  1010.      
  1011.  
  1012.      Screen display from run of HDCHEK on 14 Mb DOS partition - FATs not
  1013.      identical:
  1014.  
  1015. FATS are different
  1016. FAT discrepancy at byte 20F - FAT 1 has FF; FAT 2 has F8
  1017. Continue comparison (Y/N)? [Y]: n     {user input}                                _                 
  1018.  
  1019. Device C: is the DOS partition of a hard disk.
  1020. It contains 29104 sectors.
  1021. Total partition size is approximately 14 Mb.
  1022. It starts at absolute sector 8364 on the disk.
  1023. There are 4 heads and 17 sectors/track.
  1024. Sector size is 512 bytes.
  1025. Each (12 bit) FAT occupies 11 sectors.
  1026. The Root Directory occupies 32 sectors.
  1027. The data area starts at DOS sector 55, and contains 3631 clusters, each
  1028. consisting of 8 sectors.
  1029.  
  1030.  
  1031.  
  1032.      Screen display from run of HDCHEK - program unable to deduce disk
  1033.      structure - disk not recognizable as a DOS device:
  1034.  
  1035. Unrecognised media descriptor byte! - see error code
  1036. Error Code = F1      {F1 is not a media descriptor byte used by DOS}
  1037.      
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068.      
  1069.      
  1070.                                     Page 17                                
  1071.      
  1072.      Documentation for HDTEST V3.13          Copyright 1987, P. R. Fletcher     _______________________________        _______________________________
  1073.      
  1074.      
  1075.      
  1076.      Log file from successful run of HDTEST on 14 Mb DOS partition of 20 Mb hard
  1077.      disk:
  1078.      
  1079.      HDTEST Log File - Tue Jul 08 11:44:52 1986
  1080.      Testing Device C:
  1081.      
  1082.      No bad clusters found - HDTEST finished.
  1083.      Tue Jul 08 14:10:41 1986
  1084.      
  1085.      
  1086.      Log file from run of HDTEST on 14 Mb DOS partition - one bad cluster
  1087.      detected and remapped:
  1088.      
  1089.      HDTEST Log File - Tue Jul 08 11:44:52 1986
  1090.      Testing Device C:
  1091.      
  1092.      Read/Write error at cluster number 275!!
  1093.      Uncorrected ECC error occurred during pattern read/writes
  1094.      This error is recoverable (no data loss has occurred).
  1095.      Bad cluster is in file \MYFILES\DATA5\FFT1234.DAT
  1096.      
  1097.      1 bad clusters found and remapped - HDTEST finished.
  1098.      Tue Jul 08 14:01:04 1986
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.      
  1133.      
  1134.                                     Page 18                                
  1135.      
  1136.      
  1137.                             REGISTRATION FORM - HDTEST V 3.13                            _________________________________
  1138.      
  1139.      Please complete this form and return it with a check or money order (no
  1140.      cash, please) for $30.00 ($40.00 Canadian, L25.00 Sterling) to:
  1141.      
  1142.                      Peter R. Fletcher
  1143.                      1515 West Montgomery Avenue
  1144.                      Rosemont
  1145.                      PA 19010
  1146.                      U.S.A.
  1147.      
  1148.      None of the information on this form will be passed on to any other
  1149.      individual or commercial organization. Use the back of the form for
  1150.      comments or additional space.
  1151.      
  1152.      --------------------------------------------------------------------------
  1153.      
  1154.      This information is required to process your Registration:
  1155.      
  1156.      Last Name:____________________________  Other Names:______________________
  1157.      
  1158.      Address:______________________________  Town/City:________________________
  1159.      
  1160.      State:_____________  Post Code:____________  Telephone:_________________
  1161.                                                            (evenings/weekends)
  1162.      
  1163.      I understand that this software is supplied without warranty, express or
  1164.      implied, and agree not to hold its author liable for any direct or
  1165.      consequential loss arising out of my use of it.
  1166.      
  1167.      Signature:______________________________
  1168.      
  1169.      -------------------------------------------------------------------------
  1170.      
  1171.      You are requested, but not required, also to answer the following
  1172.      questions:
  1173.      
  1174.      On What type(s) of computer are you using HDTEST? _________________________
  1175.      
  1176.      CPU (8088, 8086, etc.)? __________   Amount of RAM (kB)? ____________
  1177.      
  1178.      Type & Size of Hard Disk(s)? ____________________________________
  1179.      
  1180.      Make and Type of Hard Disk Controller(s)? ______________________________
  1181.      
  1182.      Do you own a Modem?                                             Y  N
  1183.      
  1184.      Are you a member of BIX?   Y  N        Compuserve?              Y  N
  1185.      
  1186.      Do you own or have access to a Cauzin Softstrip Reader          Y  N
  1187.      
  1188.      Did you think that the $30.00 registration fee for this program was:
  1189.      
  1190.      Very Good Value?              About Right?             Excessively High?
  1191.      
  1192.      
  1193.      Are there any other utility programs that you would like to see made
  1194.      available as "User Supported Software"? What sort of programs?
  1195.      
  1196.      
  1197.      
  1198.  
  1199.