From owner-freebsd-hackers Tue May 7 00:34:38 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id AAA21276 for hackers-outgoing; Tue, 7 May 1996 00:34:38 -0700 (PDT) Received: from eac.iafrica.com (h196-7-192-157.iafrica.com [196.7.192.157]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id AAA21270 for ; Tue, 7 May 1996 00:34:30 -0700 (PDT) Received: (from rnordier@localhost) by eac.iafrica.com (8.6.12/8.6.12) id JAA02147; Tue, 7 May 1996 09:30:34 +0200 From: Robert Nordier Message-Id: <199605070730.JAA02147@eac.iafrica.com> Subject: Re: dosfsck anyone? To: msmith@atrad.adelaide.edu.au (Michael Smith) Date: Tue, 7 May 1996 09:30:33 +0200 (SAT) Cc: hackers@freebsd.org In-Reply-To: <199605070604.PAA20167@genesis.atrad.adelaide.edu.au> from "Michael Smith" at May 7, 96 03:34:15 pm X-Mailer: ELM [version 2.4 PL24 ME8a] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Tue, 7 May 1996, Michael Smith wrote: > It's fairly easy to determine which sectors in the FAT have had the Big A; > if you look at a "typically" corrupted filesystem, there'll be problems > related to entries in one or more contiguous sectors. > > If I recall correctly, DOS' normal allocation strategy tends to use the > clusters towards the end of the filesystem last. > > A combination of these two would tend to imply that you could generally > expect to pick up free clusters from the end of the filesystem, and that > it should be possible to determine whether the FAT in that area had been > damaged. OK. I guess that should do it. Which at least opens up the possibility of conjuring up '/lost.fnd', if necessary. And I'll give the other stuff a go, and see how much additional complexity is entailed, if any. > > > hierarchy, and this just doesn't apply in the DOS world ... where > > designing "a better disk defrag utility" seems like a neat learn C++ > > project. 8( > > Yecch. I tried (several times) to write a 'dosfsck'-style program for > the Atari ST, which uses essentially the same filesystem layout. It > was one of the most frustrating and scarring parts of my early > programming days 8( (None of the commercial tools was particularly good, > and the filesystems were sufficiently different that you couldn't just > move it to a DOS machine and hit it with 'chkdsk'.) Wish I'd know this before: maybe some subtle hints, along the lines of "unfinished business", could have gotten a BSD 'dosfsck' from you, and saved me the trouble. 8) -- Robert Nordier