Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 May 1996 17:35:38 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        rnordier@iafrica.com (Robert Nordier)
Cc:        msmith@atrad.adelaide.edu.au, hackers@freebsd.org
Subject:   Re: dosfsck anyone?
Message-ID:  <199605070805.RAA21745@genesis.atrad.adelaide.edu.au>
In-Reply-To: <199605070730.JAA02147@eac.iafrica.com> from "Robert Nordier" at May 7, 96 09:30:33 am

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Nordier stands accused of saying:
> > 
> > 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.

You might want to spare a thought for the _sorts_ of corruption that
often occur, too.  As you've noted, the odd sprinkle of 0's is one,
and the cluster-sized slab of the FAT plastered with someone's
pizza-order-fax is probably the most common other.

In the first case, addressing the logical damage is reasonable, but if
you can identify the second (probably not too hard 8), then the best
bet might be to identify all the files that point into the trampled
area, chop them off at that point, park the remaining shreds in the
lost.fnd directory, and just blow the damaged FAT sector(s) away.

This saves you the problem of having a file link into this area, hit a
wrong-but-reasonable value in there, and then crosslink out to an otherwise
totally innocent file which would otherwise have survived OK.  (The 
'innocent bystander' effect.)

> > 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)

No <expletive> way!  I was young and foolish then, and I had lots more
spare time.  (as well as proprotionately more hardware to test on...)

> Robert Nordier

-- 
]] Mike Smith, Software Engineer        msmith@atrad.adelaide.edu.au    [[
]] Genesis Software                     genesis@atrad.adelaide.edu.au   [[
]] High-speed data acquisition and      (GSM mobile) 0411-222-496       [[
]] realtime instrument control          (ph/fax)  +61-8-267-3039        [[
]] Collector of old Unix hardware.      "Where are your PEZ?" The Tick  [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605070805.RAA21745>