

                                The Disk Doctor



         Repair Menu Commands

              The repair menu has several important features,
         including the ability to display disk and file information,
         trace and locate files, repair damaged disks and files and
         recover deleted files. Most of these features are fully
         automated and require little if any input from the user. This
         makes it particularly easy for the novice to use.


              VIEW DIRECTORY: Shows you the directory on the selected
         disk. If you want to change disks, move the cursor to the
         selector line and use the backspace or arrow keys to move to
         the disk id letter and change it to the desired disk. Then
         click on the shaded bar above the file display window. To
         display a directory, click on the ok box and the direct the
         output to the screen or printer. If there is a subdirectory
         on the disk you want to display, click on it then the ok box
         and the proper output. If you click on a file name, the
         contents of that directory will be displayed, not merely the
         file itself.


              The directory display shows the file name, date and time
         of last write (access), size in bytes, start sector and
         attributes. If the filename begins with "!", then it means
         the file has been deleted. You can attempt to recover it with
         the recover file feature. As long as none of the clusters it
         used have been allocated or damaged, it should return
         intact.


              The attributes have been described in the section on
         disk structure. R means read only, H hidden, S system, V
         volume name, D subdirectory and A archive. An 'x' below the
         attribute letter means that the attribute is set (on). Notice
         that you can see a hidden file listed here; it's not visible
         in the GEM selector window!


              On subdirectories (folders), you see two unique entries:
         "." and ".."; ".." refers back to the root directory (or
         parent subdirectory if this is a folder within a folder) and
         "." refers to the subdirectory itself.


              If you intend to recover deleted files or perform other
         activities on them or hidden/system files, send the directory
         output to the printer or write down the file names of these
         particular items. These will NOT show in a GEM file selector
         window although they may be on the disk itself. You CAN
         perform activities on them by typing their names in the line
         on the window but their filenames won't be visible for mouse
         clicking.



                            Repair Commands: Page 18




                                The Disk Doctor



              If you intend to do any work at all on a file such as
         tracing, recovery or repair, it's a good idea to view that
         disk's directory first to get an idea of what sectors are in
         use and where files begin. This also serves to load the
         directory information into memory before you attempt any
         work.


              DISK INFORMATION: This presents a brief overview of the
         disk. It lists the start and length of the two FATs, the root
         directory (but not the sub directories; they're listed by the
         view directory command above) and the data area. It also
         lists the number of sectors in a cluster, the number of
         clusters used and free in the data area.


              REPAIR DISK: This is one of Disk Doctor's most powerful
         features and is almost fully automated so doesn't require and
         technical knowledge to work. Once you specify the disk drive,
         Disk Doctor asks you if you want to send the information to
         the screen or the printer. This means seeing the numbers of
         the bad sectors as they are discovered by the program.


              It then goes looking for bad sectors by trying to read
         every sector on the disk. It gathers the associated clusters
         together into a file called BOGUSAAA.BAD (the next files will
         be BOGUSAAB.BAD, BOGUSAAC.BAD and so on if you repeat this
         process for different sectors on the same disk). This is a
         hidden file and it doesn't appear in a normal directory but
         it's there on the disk anyway, locking out any bad sectors
         from use. You CAN change it to a visible file by changing the
         attribute byte in the directory (between sectors 11 and 17)
         to '00' from '06'.


              Now while the Disk Doctor is a smart program, GEM isn't.
         It sees the bad sectors and interrupts the program to tell
         you about it by sending an error message to the screen asking
         you to retry or cancel. Always click on cancel; this returns
         control back to Disk Doctor and lets it continue searching.
         Retry only keeps GEM attempting to read the bad sector.


              Note that you can't repair a disk with a bad FAT or
         directory; Disk Doctor simply can't recreate those sectors
         and has no means of tracing sectors or cluster links and
         matching them up with the correct filenames.


              Bad sectors are listed on the screen or printer. If the
         sector is part of the boot sector, file allocation table or
         disk directory, the message "Entire disk endangered" is
         displayed alongside its number. If the bad sector is part of



                            Repair Commands: Page 19




                                The Disk Doctor


         a file, the message "a file is endangered" is displayed
         instead. No attempt is made to locate which file exactly.


              TRACE FILE: Files are often scattered in various
         clusters around a disk. Trace follows these clusters and maps
         them out, listing all the sectors associated with a file. You
         can trace hidden files by typing their names into the line in
         the GEM selector window rather than clicking on them (these
         files won't show in the file window). You cannot trace
         deleted files.


              REPAIR FILE: This is different than repairing a disk; it
         tries to recover damaged files, reading every sector in the
         file rather than the disk. If any bad sectors are in fact
         found, the rest of the sectors in that cluster are salvaged,
         if possible, and the entire cluster, or whatever parts are
         readable, is picked up and put in some more tractable spot on
         the disk, and the file allocation table adjusted
         accordingly.


              It assumes the first available free cluster in the data
         area for the damaged cluster. This means you may end up with
         blank or gibberish zones in your files where the original
         sectors were unreadable. If these are text files, you may be
         able to re-write the missing material. Otherwise, you may
         have to copy good sectors from a backup into the buffer and
         then retrieve them in the newly allocated sectors to rebuild
         your damaged file.


              You still get asked if you want the process output to
         screen or the printer. Again, Disk Doctor gets interrupted by
         GEM which tells you the disk is bad and asks you to retry or
         cancel. Click on cancel to let Disk Doctor continue
         rebuilding your files.


              If you have trouble with repairing or recovering a file,
         first view the directory; this loads into memory information
         about the disk and the directory which sometimes seems to get
         misplaced. Then try again. After you repair a file, repair
         the disk to catch up the bad sectors and keep them from being
         re-used.


              RECOVER FILE: Recover File attempts to undelete files.
         First you have to type in a name in the GEM file selector
         line. The names of any deleted files are listed through the
         'view directory' feature but not in the GEM window, so you'll
         have to remember. Substitute the "!" character in the file
         name for any other and Disk Doctor will take care of the
         rest.



                            Repair Commands: Page 20




                                The Disk Doctor



              You can preview the file as it is being rebuilt or not.
         If not, Disk Doctor simply locates the first of
         however-many-that-file-needs unclaimed clusters on the disk,
         starting from the first available in the FAT, and chains them
         together in order and calls it a file. This has obvious
         ramifications for files that were deleted a long time ago, or
         built out of order on the disk. Normally if a file was
         recently deleted and nothing else was added to or deleted
         from a disk, the file remains intact in its proper clusters,
         in order, on the disk and recover works fine.


              While previewing (only), you have the option to say
         whether or not Disk Doctor should assume succeeding clusters
         always follow preceding clusters. This means; is the file to
         be recovered in contiguous clusters on the disk? If you
         answer no, then the program doesn't go back to the beginning
         when looking for the next unclaimed clusters each time. These
         get skipped. The advantage of this is that you don't go over
         the same bad sectors if present each time it looks for a free
         cluster from the start to allocate. the disadvantage is that
         those damaged sectors may have been part of the file chain
         and you break the order and lose data when the file is
         eventually recovered.


              When you preview the file, Disk Doctor displays the
         sector associated with that cluster link and asks you "Is
         this the first sector?". This is done because other data may
         have overwritten the deleted file since the deletion and the
         cluster (sector) re-allocated to another file. You have to
         decide if the first sector is actually the one you expected
         or want. Disk Doctor can't verify the data, only rebuild the
         links in the file chain.


              Each cluster in order is shown until you OK enough to
         make the file according to the file's FAT linkage. The entire
         cluster must be accepted before any of it is included in the
         file, of course. This is the origin of the "Is this the next
         sector?"/ "And this one follows?" message pairs. Pick Yes for
         both and you have an entire cluster. Pick No for either and
         none of that cluster is included. Pick Stop for either and
         whatever has been selected so far IS included, and the file
         recovering process is stopped.


              You can also specify at the beginning of the process
         that you intend to make the file longer than the directory
         says it ever was. This is intended for rebuilding
         subdirectories, which have a "length" of 0. In this case,
         file recovery stops only when the disk runs out of space, or
         you hit Stop, or an asteroid hits the computer. Never for
         anything else.



                            Repair Commands: Page 21




                                The Disk Doctor



         Obviously a file can only be partially recovered if fragments
         have been written over or damaged. Disk doctor only sees that
         the file needs so many sectors and tries to take them
         sequentially. If other file data has intruded on a cluster
         previously used by your file, then you can answer no when
         asked if the sector was the one to follow or not. A fair
         amount of judgement is needed to recover a file properly.


















































                            Repair Commands: Page 22


