
                        DiscKnight Desktop Use
                        ======================
                        
                          Step By Step Guide
                          ==================
                    
                    
Please follow the instructions carefully. For more information refer to the 
full manual in the !Help file (or select help from the filer menu).


1) Preparations
---------------

If DiscKnight reports it requires later versions of toolbox modules, please
obtain new versions from the RISC OS Ltd website http://www.riscos.com/

If you cannot run the front end because of your disc containing the toolbox
modules is broken, you should run DiscKnight utility at the command prompt
(F12). See the Usage section of the !Help file for details.

Close all applications which may have files open on the disc to be repaired.
This includes email software and anything which was auto-booted from the
problem drive when the computer was started-up.

You will however, need to have an editor running to handle the taskwindow
which DiscKnight uses. !Zap, !StrongEd or !Edit are suitable.

Check that you have some free space on a DIFFERENT disc to receive 'Undo'
files and Reports. You will need at least 3Mb if the problem disc is E format
or 5Mb+ if the problem disc is E+ format. A similar amount of memory free
memory is required when the program is running.

Run !DiscKnight and click on the iconbar to display the setup window. Use
the pop-up menus in the HardDisc details section to select the filing system
name and the problem drive number/name.

On the icon bar, dismount the problem disc to be checked/repaired. (If the
disc is not accessible, this option may not be available; so skip this step.)


2) Check the disc first
-----------------------

With the !DiscKnight setup window showing the filing system and the problem
drive number to be checked (see section 1,above), ensure the 'Check' option
is selected and click on the OK button to start.  

Whilst !DiscKnight runs, a window will appear containing data. When it has
finished, you may wish to save the contents of this window to your different
disc, using the window menu.

a) "Disc is good"
        
        The disc passed all tests and no further action is needed.

b) "Disc is bad, N faults found"
   "Run a repair (-f and -u flags) to fix"

        Problems were encountered with the disc.
        
        Always check the output from DiscKnight very carefully, if looks like
        DiscKnight was not able to read the disc, denoted by lines starting
        with '!' an describing read errors, or an extremely high number of
        faults are reported, it is unlikely that a repair will be successful
        and you should contact DiscKnight support at the address below.

        Otherwise continue with step 3 below.

c) "Errors prevent the completion of checking"

        Lack of memory or physical disc errors prevented DiscKnight from
        finishing the checks. Examine the output for lines beginning with a
        '*' which may describe actions to perform or addition parameters to
        be given to DiscKnight on subsequent runs.

d) "DiscKnight is unable to fix these problems"

        Either the disc is very seriously damaged, or the disc's format is
        later than DiscKnight expects. A more recent version of this program
        may be able to solve some of these problems. Please contact the
        DiscKnight support at the address at the end of this document.



3) Repairing the disc
---------------------

In the setup window, click on the repair button.

It is highly recommended you create an undo file, this will allow any
modifications done to the disc to be reversed in the case the DiscKnight does
not successfully repair it. To create an undo file, click on the create undo
file option button so it is ticked, and drag the UndoData icon to another
hard disc or a RAM disc of at least 4MB.

               **** DO NOT SAVE TO THE DISC BEING FIXED ****
               
To recover deleted files, tick the otions box, and read section 3a below.               
Click on OK to start the repair. DiscKnight will then run producing an output
window as for the checking process, save this information using the window
menu, as you will need it to identify recovered files, as described in section
5 below.

When complete one of the following messages will be displayed at the end of
the window:-

a) "Disc is repaired, N faults corrected"
        
        The has been repaired, continue to step 4.

b) "N faults corrected, rerun required"

        Problems were encountered with the disc, which require a further
        repair operation to fix. Examine the output for lines beginning with
        a '*' which may describe actions to perform or addition parameters to
        be given to DiscKnight on subsequent runs. Refer to the !Help manual
        for the full list of parameters which can be used.

c) "Errors prevent completion of fixing"

        Lack of memory or physical disc errors prevented DiscKnight from
        finishing the checks. Examine the output for lines beginning with a
        '*' which may describe actions to perform or addition parameters to be
        given to DiscKnight on subsequent runs.
        
        If further parameters are required, click on the advanced options, 
        and enable the disc shape parameters. You can then enter the shape of 
        the disc as given by your formatting program. Refer -p parameter in
        the !Help file for more details.

d) "DiscKnight is unable to fix these problems"

        Either the disc is very seriously damaged, or the disc's format is
        later than DiscKnight expects. A more recent version of this program
        may be able to solve some of these problems. Please contact the
        DiscKnight support at the address at the end of this document.
        
NOTE: if you need to rerun DiscKnight in cases (b) and (c) ensure you save
the new undo file with a different name, and always restore them in the
reverse order (see section 4, below).


3a) Recovering deleted files
----------------------------

When this option is selected as part of a repair all free areas of the disc
will converted in to files and placed in the $.Lost+Found directory. If there
are a lot of free space blocks, the Lost+Found directory may become full
before they are all converted to files, especially on an E format disc. In
which case rename Lost+Found and run again.

NOTE: there is no guarentee that the files will still be on the disc as
FileCore can auto compact and reuse the space that they used as soon as they
are deleted.

This will enable you to look for your deleted files in the Lost+Found
directory using the procedure in section 5. There could be thousands of files
to search through however, so the best policy is still to keep backups and be
very careful when deleteing.


4) Accessing the disc again
---------------------------

After repairing the disc, attempt to look at it again by clicking on its
drive icon. If you still get a message such as "Disc not understood" or
"Broken directory", you may have to re-boot before continuing. If this does
not work, follow the procedure in below for restoring the disc, and contact
the DiscKnight technical support (address at the end of the document).

To restore the disc, click on advanced options in the setup window, and drag
an undo file to the restore target box. Click on OK to start the operation.

NOTE: Never use the restore feature if you have modified the disc since the
      undo_file was created.


5) Recovered files
------------------

Depending on the nature of the disc corruption, there may be files that have
been recovered. Most of these will be placed in a directory call Lost+Found
in the root directory of the hard disc. On old format hard discs more than
one Lost+Found directory (with numeric suffixes) may be created if there are
more than 77 files to recover.

Any files in Lost+Found named "FileXXXXX" where XXXXX is a number, are ones
which have been recovered without any information about their type or real
name. They could contain one or more whole files with junk in between, or
just all junk. You will need to use an editor, to examine the file, and save
out any parts that are recognisable to separate files.

The Lost+Found directory may also contain other directories, in which case
all the files in them will still have all their name and type information,
and can be moved back to the place on the disc where they came from
originally.

After you have looked at the contents of Lost+Found to see if there is
anything salvageable, you should always delete it. This is because DiscKnight
sometimes needs to claim slightly more space than is necessary to hold these
files, this will be released by deleting them.

You also need to look at messages produced in the output window of
DiscKnight, Taking note of any directories mentioned on lines beginning with
'>'. In some of these directories, if there was too much corruption, the
entries will have been removed. The files and sub-directories will have been
recovered to the Lost+Found directory, but some files which share the
directory space, will have been placed in a file called "Recovered". This
file could contain one of more files (such as !Boot and !Run) as well as
junk, so you will need an editor to save out any useful contents to separate
files. Remove the "Recovered" file after you have done this.


6) Double check
---------------

It is a good idea to repeat step 2, to verify that the disc is correct after
all the recovered files have been removed. In unusual circumstances it may be
necessary to repeat steps 4 & 5 again to fully repair the disc.


Contact Information
-------------------
DiscKnight is distributed by The ARM Club (http://www.armclub.org.uk/),
registered users may obtain support via:-

Email: DiscKnight@armclub.org.uk
Phone: 07010 709849 (charged at Flextel rates).
Post : The ARM Club, Merton Court, 38 Knoll Road, Sidcup Kent, DA14 4QA

Please quote your serial number and the program version number (displayed
whenever DiscKnight is run) in all correspondence. 
