🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #40736

Re: Stumpers

#40736
From: Tim Meighan
Date: Thu, 04 Jan 1990 17:44
38 lines
2453 bytes
In article <21990002@hpvcfs1.HP.COM> rexw@hpvcfs1.HP.COM
(Rex Wickenkamp) writes:

>2)  I have always wondered why CHKDSK, when used with the /F parameter,
>    creates FILE0000.CHK files in the root directory.  Can anyone give me
>    a good explanation of this?

This is because CHKDSK is finding a lost chain of one or more clusters on
your disk that doesn't seem to belong to a file.  In order for the file
system to recover the lost sectors and make them available for use again,
they have to be attached to a directory entry, which is where the file system
gets the first pointer to the chain.  (The FAT contains the pointers to
subsequent clusters in the chain, which is how CHKDSK determined there was a
lost chain in the first place -- it found a chain allocated in the FAT
that no directory entry pointed to.)

CHKDSK creates a directory entry for each unnattached chain it finds in
the FAT.  (It generates a unique FILExxxx.CHK name for each entry by
having xxxx be a 4-digit number that is incremented for each new filename
it needs.)  It then sets the directory pointer to the lost chain, and this
makes the chain available for your use.  It does this so you can examine
the file if you think it might contain data you would like to try to
salvage.  You can also just erase the file and return the recovered
clusters back to the pool of available storage on your disk.

Note that CHKDSK could just as easily have automatically returned
any lost chains back to the disk free pool.  However, the lost clusters
are purposely converted to files instead, to give you a chance to 
examine them just in case they contain something you need.

CHKDSK will always tell you when there are lost clusters in the FAT.
However, it won't actually convert the clusters to files unless you
specifically tell it to with the /F (fix) switch as a command argument. 
If you don't convert the clusters to files, they remain lost, and you
will never be able to use them for anything.

Tim Meighan
SilentRadio
Technical Details
Message-ID: <1236@srhqla.SR.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!srhqla!tcm

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!srhqla!tcm
From: tcm@srhqla.SR.COM (Tim Meighan)
Newsgroups: comp.sys.ibm.pc
Subject: Re: Stumpers
Summary: CHKDSK /F files
Message-ID: <1236@srhqla.SR.COM>
Date: 4 Jan 90 17:44:21 GMT
Reply-To: tcm@srhqla.SR.COM (Tim Meighan)
Organization: Silent Radio, Los Angeles
Lines: 38