[comp.sys.ibm.pc] How do ya when your FATs corrupt?

todd@SEAS.UCLA.EDU (02/26/88)

I use the Norton utilities to save a copy of my FAT table, but how do I
know if the FAT was good to start with?

--todd booth / ucla data comm
ArpaNet	todd@seas.ucla.EDU 	      /  BitNet csdctgb@uclamvs.bitnet
UUCP    {ihnp4,ucbvax}!ucla-cs!todd   / 213 825-1933

murillo@sigi.Colorado.EDU (Rodrigo Murillo) (02/26/88)

In article <9765@shemp.CS.UCLA.EDU> todd@SEAS.UCLA.EDU (Todd Booth) writes:
>I use the Norton utilities to save a copy of my FAT table, but how do I
>know if the FAT was good to start with?

Most of the time a FAT failure will be catastrophic.  You will get
death messages from DOS.  You also can check for it's condition
by using Norton DT,  it will check your FAT area.


-- 
_______________________________________________________________________________
 Rodrigo Murillo, University of Colorado - Boulder  (303) 761-0410 
 murillo@boulder.colorado.edu | ..{hao|nbires}!boulder!murillo
 ( Machines have less problems.  I'd like to be a machine. -- Andy Worhol )

feg@clyde.ATT.COM (Forrest Gehrke) (03/01/88)

In article <9765@shemp.CS.UCLA.EDU>, todd@ucla-cs.UUCP writes:
> I use the Norton utilities to save a copy of my FAT table, but how do I
> know if the FAT was good to start with?
> 
> --todd booth  UUCP    {ihnp4,ucbvax}!ucla-cs!todd   / 213 825-1933


There are two copies of FAT.  Run a binary compare on them. The probability
of both being identically corrupted is fairly low.

Forrest Gehrke

pjh@mccc.UUCP (Peter J. Holsberg) (03/04/88)

In article <22568@clyde.ATT.COM> feg@clyde.ATT.COM (Forrest Gehrke) writes:
|In article <9765@shemp.CS.UCLA.EDU>, todd@ucla-cs.UUCP writes:
|> I use the Norton utilities to save a copy of my FAT table, but how do I
|> know if the FAT was good to start with?
|> 
|> --todd booth  UUCP    {ihnp4,ucbvax}!ucla-cs!todd   / 213 825-1933
|
|
|There are two copies of FAT.  Run a binary compare on them. The probability
|of both being identically corrupted is fairly low.

How do you do that?  Does DOS itself have any use for the 2nd FAT?



-- 
Peter Holsberg                  UUCP: {rutgers!}princeton!mccc!pjh
Technology Division             CompuServe: 70240,334
Mercer College                  GEnie: PJHOLSBERG
Trenton, NJ 08690               Voice: 1-609-586-4800

feg@clyde.ATT.COM (Forrest Gehrke) (03/08/88)

In article <268@mccc.UUCP>, pjh@mccc.UUCP (Peter J. Holsberg) writes:
> In article <22568@clyde.ATT.COM> feg@clyde.ATT.COM (Forrest Gehrke) writes:
> |In article <9765@shemp.CS.UCLA.EDU>, todd@ucla-cs.UUCP writes:
> |> I use the Norton utilities to save a copy of my FAT table, but how do I
> |> know if the FAT was good to start with?
> |> 
> |There are two copies of FAT.  Run a binary compare on them. The probability
> |of both being identically corrupted is fairly low.
> 
> How do you do that?  Does DOS itself have any use for the 2nd FAT?
> 
  I have seen a few rare instances of DOS using the second FAT when something
  was wrong with the first, but I don't remember the circumstances.

  You can use DEBUG to get at the FAT's.  For a hard disk using 12 bit FAT's
  8 sectors per FAT are used.  They are sectors 1 thru 8 for the first FAT 
  and sectors 9 thru 16 for the second FAT.  (If your disk is using 16 bit
  FAT's more than 8 sectors are used per FAT).

  Using the load command of DEBUG (l) load into some unused memory locations
  the 16 sectors (remember to use hex with DEBUG):

  l cs:1000 2 1 10

  This command will load the 10h sectors of the hard disk starting with
  sector 1 contiguously into memory starting at location cs:1000. At 
  cs:2000 the second FAT will begin, so using the compare command of
  DEBUG:

  c cs:1000l1000 cs:2000   (meaning compare 1000h bytes of memory
                            staring at cs:1000 with the same number
                            of bytes starting at cs:2000 ---- that
                            character between the two 1000 numbers 
                            is an l for length)

  If there are any differences the compare will list the addresses and
  byte values that exist at the compared locations.

  Assuming all was OK, if you want to write this into a file on your 
  floppy, for example, do the following:

  r cx
  cx:0000   (This is what the DEBUG will come back with)
  :2000     (You key in the 2000  for the number of bytes 
             you want to write).

  n a:fats  (Naming filename FATS--or whatever on drive a:)
  w cs:1000 (Write starting at address cs:1000)
            DEBUG will respond with a message saying it is writing
            2000 bytes.

  q         (quit DEBUG)

You will now have on your floppy in drive a: a file named FATS having
the two FATS of total length decimal 8192

Obviously this is not a very handy procedure, but for those of you
proficient in C you will see the FAT information is located on the
hard disk.
 
These FAT's will change the next time you add or delete a file.

When using the write command of DEBUG, be doubly sure of what you are
doing.  Avoid writing to the hard disk unless you really know what
you are doing--because you may be horribly surprised at the next boot
up if you made a mistake (and which may be very difficult to rectify
short of a format).  Write to a formatted floppy which does not
contain anything crucial to you.

Forrest Gehrke

bill@wsccs.UUCP (Bill Housley) (03/13/88)

In article <9765@shemp.CS.UCLA.EDU>, todd@SEAS.UCLA.EDU writes:
> I use the Norton utilities to save a copy of my FAT table, but how do I
> know if the FAT was good to start with?


I have had Norton tell me (sometimes, even if there is nothing really
wrong with it).  Once I did the famous DBaseIII-editor-file to big-fry
your fat-#@$^&*#$  mistake and spent 4 hours finding a disk utility that
would help me re-construct it.  ALL and I repeat ALL utilities I tried
puked all over me and it (the gore was revolting) including all of old
Norton (didn't have new Norton then, so I don't know about it).  Except
of course Norton Format (or something like that) which made the disk
more readable for the others.  The point is that the FAT format is awful
picky and it's rather obvious when it's bad, because nobody wants to
talk to it.  CHKDSK and Norton DT will at least handle it with some
grace (tell you it's bad and exit normally), others just tell you it's
the wrong format or just give you the old:

    (some kind of generic device error message): abort, retry, or ignore.
......................................................................



Kirk: But this planet is destroying it's self around us!!!

Kruge: Invigerating, isn't it!!

---------------------------------------------------------------------
UUCP !ihup!utah-cs!utah-gr!uplherc!sp7040!obie!wsccs!bill  {WSC Utah}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Disclaimer: These opinions are my own, not those of my wife who neither
selects, sensurs, understands, nor cares about what I write here.-

Glenn_A_Story@cup.portal.com (04/03/88)

>>I use the Norton utilities to save a copy of my FAT table, but how do I
>>know if the FAT was good to start with?

>Most of the time a FAT failure will be catastrophic.  You will get
>death messages from DOS.  You also can check for it's condition
>by using Norton DT,  it will check your FAT area.

I believe that Norton's DT only _reads_ the FAT and reports on disk read 
errors.  To check the accuracy of the FAT, use the DOS-supplied utility
CHKDSK.  This program will report such integrity problems as multiply assigned
clusters, unassigned clusters, etc., all of which are errors in the data
stored in the FAT (or in a directory, which contains a pointer to a FAT entry).

Regards,
Glenn