home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MISC / TNH_PC.ZIP / MARKS.NL < prev    next >
Encoding:
Text File  |  1987-01-14  |  3.3 KB  |  124 lines

  1. Recovering Data From Bad Directories
  2.  
  3.               L. V. Marks
  4.            Rochester PC Club
  5.  
  6. I have had good luck fixing disks
  7. that have had their directories
  8. destroyed through:
  9.  
  10. o   Removal of a disk before the
  11.     computer is done writing;
  12. o   Giving the three key reset (IPL)
  13.     as a disk is being written;
  14. o   Mysterious means.
  15.  
  16. To effect the file recovery once a
  17. directory is destroyed, first find
  18. the sectors on which the file
  19. resides. A DISKRD program is best for
  20. this, as it displays the ASCII in
  21. longer, more recognizable lines. A
  22. DISKDUMP program can also be used.
  23. Write down the absolute sector
  24. numbers, not the track and sector.
  25. They will appear in the proper order,
  26. although they may be scattered about
  27. the disk.
  28.  
  29. Next, load the files into memory
  30. using DEBUG, and write them back to
  31. diskette. As can be seen from the
  32. example, they are written to another
  33. filename or, preferably, to another
  34. diskette in case you don't get all
  35. the sectors right.  Otherwise, DOS
  36. might write them on top of the old
  37. sectors, and you won't get a second
  38. chance.
  39.  
  40. Load a DOS diskette with DEBUG in
  41. drive A and enter DEBUG d:ffffff.ext
  42. where ffffff.ext represents a
  43. nonexistent file. DEBUG will report
  44. the file not found, but it will begin
  45. anyway, as shown by the DEBUG prompt.
  46. Entering the nonexistent filename
  47. sets up a File-write Control Block
  48. (FCB), the name and drive to which
  49. the file will be restored.
  50.  
  51. Next, load the sectors to be restored
  52. into memory. Each sector to be loaded
  53. takes 100 (hex) bytes, and you must
  54. keep track of how many sectors are
  55. loaded. Put the damaged diskette into
  56. one of the drives.
  57.  
  58. Load the first one at 100.  Type:
  59.  
  60. L CS:100 D SS N
  61.  
  62. where:
  63.  
  64. L   -- always L
  65.  
  66. CS: -- always CS:
  67.  
  68. 100 -- First load - don't forget to
  69.        increase this for each
  70.        successive command.
  71.  
  72. D   -- drive 0=A,1=B,2=C,3=D
  73.  
  74. SS  -- number of the sector to load
  75.  
  76. N   -- number of contiguous sectors
  77.  
  78. If you have multiple sectors in a
  79. group, N may be greater than 1. N
  80. must be entered in hex. SS is the
  81. sector number of the sector (or first
  82. of a group) to be loaded. 100 is the
  83. address of the first load; it must be
  84. increased by 100 for each sector
  85. already loaded.
  86.  
  87. For example, suppose your diskette is
  88. in drive A and bad sectors to be
  89. recovered are at 44, 48, 49, 4A, and
  90. 5C. You would enter:
  91.  
  92. L CS:100 0 44 1
  93. L CS:200 0 48 3
  94. L CS:500 0 5C 1
  95.  
  96. Now you must write out the recovered
  97. data to the nonexistent filename.
  98. First, however, you must tell DEBUG
  99. how much data to write by loading the
  100. BX and CX registers. This number is
  101. equal to the number of sectors loaded
  102. plus 100. In the example, the value
  103. would be 600.  You would type R BX;
  104. DEBUG responds :0000. Then type 600
  105. and enter. Similarly, type R CX, and
  106. enter. Then type 600 and enter.
  107.  
  108. Place a formatted diskette in the
  109. drive specified with the nonexistent
  110. filename. It could be the diskette
  111. from which you are recovering the
  112. data, but it is better if it is not,
  113. since an error may have occurred in
  114. this process, missing a sector. If
  115. you write to the damaged diskette,
  116. you may write over the missing
  117. sector.
  118.  
  119. Type W, and Enter. The data in memory
  120. will be written to the diskette,
  121. under the non-existent filename.
  122.  
  123. Type Q to quit the DEBUG program.
  124.