[anounce] chkdsk beta 0.1
Imre Leber <[email protected]> Sat, 9 Nov 2002 19:58:41 +0100
| Newsgroups | gmane.os.freedos.devel |
|---|---|
| Message-ID | <[email protected]> |
I am proud to anounce the first version of FreeDOS chkdsk (for a realy long
time). This is an early beta version so expect that there are still bugs.
The following is the help screen for chkdsk:
ChkDsk beta 0.1
Copyright 2002, Imre Leber under the GNU GPL
Checks a volume and returns a status report
Usage:
Chkdsk [<volume>] [/f] [/d <files>] [/r] [/s]
/f: attempt to fix any errors found.
/d: print out the indicated files and show the fragmentation factor
/r: scan the data area and try to recover unreadable data
/s: only show drive summary.
Note: if volume is ommited, the current drive is assumed.
So what does it do:
1) It shows you a summary of the disk, when using the /s option this is the
only thing which is done.
2) It checks for the following errors:
The first label of the FAT does not contain the media descriptor. The first
label in the FAT is adjusted.
The string that gives an indication of the kind of file system is wrong, the
right string is put in the place.
FAT contains invalid cluster numbers. Cluster is changed to EOF.
Wrong valid in entries, the entries are filled with valid data.
Wrong LFN entries, the LFN entries are removed (only the SFN is kept).
File's cluster chain contains a loop. The loop is broken.
Files . and .. are non-directories. They are renamed.
Directories . and .. in root directory. They are dropped.
Duplicate directory entries. They are renamed.
Directories with non-zero size field. Size is set to zero.
Start cluster number of a file is invalid. The file is Deleted.
File contains bad or free clusters. The file is truncated.
File's cluster chain is longer than indicated by the size fields, or
File's cluster chain is shorter than indicated by the size fields.
The size field is adjusted. If the file in fact is empty then the file is
deleted.
Directory . does not point to parent directory. The start pointer is
adjusted.
Cross linked files, all the files get a copy of the cross linked clusters.
Lost clusters, they are converted to files.
and can fix them when using the /f option
3) With the /r option it can perform a scan of the data area and attempt to
recover the data in bad clusters.
4) It can show the fragmentation of the files, an example:
C:\>chkdsk defrag.img /d *.*
ChkDsk beta 0.1
Copyright 2002, Imre Leber under the GNU GPL
BIN ----D (100%)
CVS ----D (100%)
SOURCE ----D (100%)
The first collumn are the files, the second the attributes and the third the
defragmentation factor.
You can download it from:
http://savannah.nongnu.org/download/free-defrag/
The source is in:
ckdsk01s.zip
and the binary is in:
ckdsk01x.zip
I can not stress enough that this is only a first version, but it hast been
tested on FAT12 and FAT16, both in win98 and with FreeDOS in DOSemu 1.0.2
(the out of the box installation). Especially the scanning has been tested,
the fixing still needs a lot more testing.
When you are planning to recompile from sources it may be interesting to
know that this entire thing has been written with FAT32 in mind so pretty
much all calculations are 32 bit. So compiling with 386 optimization might
give you a smaller and faster executable. If you do compile it for 386 let
me know wether there is a serious gain. I can not test it, because i do not
have a compiler that generates 386 code.
Imre