Path: utzoo!attcan!uunet!mcvax!ukc!eagle!icdoc!dcw From: dcw@doc.ic.ac.uk (Duncan C White) Newsgroups: comp.sys.atari.st Subject: A Hard disk problem Message-ID: <439@gould.doc.ic.ac.uk> Date: 20 Sep 88 11:45:13 GMT Sender: dcw@doc.ic.ac.uk Reply-To: dcw@doc.ic.ac.uk (Duncan C White) Organization: Dept. of Computing, Imperial College, London, UK. Lines: 58 Hi there everyone, I have a problem with my hard disk: at the recent Personal Computer [World] Show in London, I bought the Hisoft FTL Modula-2 compiler for the ST. [Show price, 90 quid including source level debugger and profiler and make and resource editor] I was happily installing this onto my SH204 hard disk, using the Desktop to copy disk 3 of 4 when the blasted ST collapsed in a heap.. Vertical lines appeared on the screen, and I had to power off.. Sadly, the result is that the \M2\FTL directory I was installing into is totally corrupted: if I open it with the Desktop the ST crashes again, complete with vertical lines. If, instead, I use Gulam and cd into the FTL subdirectory, the machine doesn't crash, but ls reveals total garbage.. The rest of the disk is fine however. So, what I want to do is remove the garbaged directory and start again. What I thought might be possible is the following: Recursively follow the directory structure, [except \M2\FTL of course] and follow each cluster used by each file: Mark in an array which clusters/sectors are used. Then, when I have finished the traversal, blank the FAT entry for every cluster/sector which the array marks as unused. Now the crunch: I don't know enough about the FAT format to do this. The only information I have is from an MS-DOS book "Tricks of the MS-DOS Masters" which helpfully says "the format of the FAT is beyond the scope of this book"... it recommends the "MS-DOS Developer's Guide" which I do not have. So, I wonder, would anyone care to tell me the format of the FAT table, and any other information I might need [partition table, boot sector??] or better yet, does anyone have source doing something similar to what I want to do ??? [C preferred, Pascal, Modula-2 and 68k assembler acceptable, 8086 assembler deplored but ok, if it's all you've got..] If you care to mail me, I'll gladly post a summary of anything I get.. [post only if you can't find a path to me] Thanks in advance, everyone... Duncan. [If dcw@gould.uucp fails, try dcw@doc.ic.ac.uk] ---------------------------------------------------------------------------- Duncan White, | Flying is the art of aiming oneself Dept. Of Computing, | at the ground and missing. Imperial College, | -- Douglas Adams, So Long and Thanks London SW7, England | for all the fish.