home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 015 / set_type.arc / HDCRASH.DOC < prev    next >
Encoding:
Text File  |  1986-03-08  |  4.3 KB  |  106 lines

  1.  
  2.  
  3.                     Recovery From Trashed Hard Disk
  4.  
  5.                                 MSDOS ONLY
  6.  
  7.  
  8.                WARNING THIS TECHNIQUE DESTROYS ALL INFO ON
  9.                YOUR HARD DISK !!!!!!!!
  10.  
  11.  
  12.                If you trash your hard disk system and are
  13.                able to run format on the drive, but still
  14.                get multiple error messages or format will
  15.                not run at all the following technique is
  16.                worth a try prior to taking your machine to
  17.                your friendly dealer. If you have had an actual
  18.                physical crash this will not help. However, if
  19.                the problem is caused by something written on
  20.                your drive that format will not remove, this
  21.                should do the trick.
  22.  
  23.  
  24.                The following code is entered with DEBUG. It
  25.                involves sending the full device control block
  26.                directly to the disk controller chip (here, to the
  27.                PC XT-compatible BIOS on the host adapter card).
  28.                While not yet tested, this process should work
  29.                on the XT controller as well.  The command set is
  30.                identical, and can be found in the IBM PC
  31.                Technical Reference Manual under Fixed Disk
  32.                Adapter. This technique has also been used
  33.                successfully on an ATT 6300 PC.
  34.  
  35.                The comments in the below example are set off with
  36.                semicolons, and are not entered into DEBUG.
  37.  
  38. ===================================================================
  39.  
  40.  
  41. ;low level formatting of 20 MB drives with Centan controller
  42. ;place MSDOS disk with debug in dive A:
  43.  
  44. A>debug C:
  45. -o 321 0             ;write port controller reset
  46. -o 322 0             ;write port controller select
  47.  
  48. -o 320 0c            ;init drive characteristics command------
  49. -o 320 0             ;..
  50. -o 320 0             ;..
  51. -o 320 0             ;..
  52. -o 320 0             ;..
  53. -o 320 0             ;..
  54.  
  55.                      ;-------8-byte parameter block-------------
  56. -o 320 02            ;max number of cylinders - high byte
  57. -o 320 64            ;max number of cylinders - low byte (264H = 612D)
  58. -o 320 04            ;maximum number of heads (= 4)
  59. -o 320 02            ;reduced write cylinder - high byte
  60. -o 320 64            ;reduced write cylinder - low byte (264H = 612D)
  61. -o 320 01            ;write precomp cylinder - high byte
  62. -o 320 00            ;write precomp cylinder - low byte (100H = 256D)
  63. -o 320 0b            ;ECC burst length (0BH = 11)
  64.  
  65. -i 320               ;read controller hardware status
  66. 00                   ;result here should be "00". If not, abort
  67.                      ;  and restart the sequence.
  68.  
  69.                      ;-----optional---------------------------
  70. -o 322 0             ;write port controller select
  71. -o 320 0             ;check for Drive Ready command----------
  72. -o 320 0             ;"0" for drive 0, "20" for drive 1
  73. -o 320 0             ;..whole command is optional, but may be
  74. -o 320 0             ;..required with some disks.
  75. -o 320 0             ;..
  76. -o 320 0             ;..
  77.  
  78. -i 320               ;read controller hardware status
  79. 00                   ;again, result here should be "00" for
  80.                      ;..logical drive 0, "20" for logical drive 1.  If not,
  81.                      ;..abort and restart.
  82.                      ;-------end optional command----------------
  83.  
  84. -o 322 0             ;write port controller select
  85. -o 320 4             ;format drive command-----------
  86. -o 320 0             ;drive 0, starting head 0 (00d hhhhh), "20" drive 1
  87. -o 320 0             ;starting cyl high (cc 000000) = 0
  88. -o 320 0             ;starting cyl low (cccccccc) = 0
  89. -o 320 4             ;interleave factor (000 iiiii)
  90. -o 320 0             ;retries, step option (r 0000 ssss) = 0
  91.  
  92. -                    ;disk drive will start formatting--watch for
  93.                      ;..drive busy light to go out.
  94. -quit
  95.  
  96.      Now either warm boot with <Ctrl><Alt><Del> or cold boot with
  97. a power cycle.  Some drives or controllers may require the cold
  98. boot to reset the disk parameters.
  99.  
  100.      Then from DOS (in the floppy drive), use FDISK to redefine
  101. the partition and FORMAT to format for the DOS version you are
  102. using.
  103.  
  104. (* This last step is very important !!!!!!!!!!!!!!!!!!!!!!   *)
  105.  
  106.