home *** CD-ROM | disk | FTP | other *** search
- Recovering Data From Bad Directories
-
- L. V. Marks
- Rochester PC Club
-
- I have had good luck fixing disks
- that have had their directories
- destroyed through:
-
- o Removal of a disk before the
- computer is done writing;
- o Giving the three key reset (IPL)
- as a disk is being written;
- o Mysterious means.
-
- To effect the file recovery once a
- directory is destroyed, first find
- the sectors on which the file
- resides. A DISKRD program is best for
- this, as it displays the ASCII in
- longer, more recognizable lines. A
- DISKDUMP program can also be used.
- Write down the absolute sector
- numbers, not the track and sector.
- They will appear in the proper order,
- although they may be scattered about
- the disk.
-
- Next, load the files into memory
- using DEBUG, and write them back to
- diskette. As can be seen from the
- example, they are written to another
- filename or, preferably, to another
- diskette in case you don't get all
- the sectors right. Otherwise, DOS
- might write them on top of the old
- sectors, and you won't get a second
- chance.
-
- Load a DOS diskette with DEBUG in
- drive A and enter DEBUG d:ffffff.ext
- where ffffff.ext represents a
- nonexistent file. DEBUG will report
- the file not found, but it will begin
- anyway, as shown by the DEBUG prompt.
- Entering the nonexistent filename
- sets up a File-write Control Block
- (FCB), the name and drive to which
- the file will be restored.
-
- Next, load the sectors to be restored
- into memory. Each sector to be loaded
- takes 100 (hex) bytes, and you must
- keep track of how many sectors are
- loaded. Put the damaged diskette into
- one of the drives.
-
- Load the first one at 100. Type:
-
- L CS:100 D SS N
-
- where:
-
- L -- always L
-
- CS: -- always CS:
-
- 100 -- First load - don't forget to
- increase this for each
- successive command.
-
- D -- drive 0=A,1=B,2=C,3=D
-
- SS -- number of the sector to load
-
- N -- number of contiguous sectors
-
- If you have multiple sectors in a
- group, N may be greater than 1. N
- must be entered in hex. SS is the
- sector number of the sector (or first
- of a group) to be loaded. 100 is the
- address of the first load; it must be
- increased by 100 for each sector
- already loaded.
-
- For example, suppose your diskette is
- in drive A and bad sectors to be
- recovered are at 44, 48, 49, 4A, and
- 5C. You would enter:
-
- L CS:100 0 44 1
- L CS:200 0 48 3
- L CS:500 0 5C 1
-
- Now you must write out the recovered
- data to the nonexistent filename.
- First, however, you must tell DEBUG
- how much data to write by loading the
- BX and CX registers. This number is
- equal to the number of sectors loaded
- plus 100. In the example, the value
- would be 600. You would type R BX;
- DEBUG responds :0000. Then type 600
- and enter. Similarly, type R CX, and
- enter. Then type 600 and enter.
-
- Place a formatted diskette in the
- drive specified with the nonexistent
- filename. It could be the diskette
- from which you are recovering the
- data, but it is better if it is not,
- since an error may have occurred in
- this process, missing a sector. If
- you write to the damaged diskette,
- you may write over the missing
- sector.
-
- Type W, and Enter. The data in memory
- will be written to the diskette,
- under the non-existent filename.
-
- Type Q to quit the DEBUG program.