DOS DOSFSCK 2.8.2 now actually reads raw DOS disks, try and debug...
Eric Auer <[email protected]> Thu, 14 Nov 2002 07:37:21 +0100 (MET)
| Newsgroups | gmane.os.freedos.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, as nobody else found the time by now, I have at least a version
of DOSFSCK for DOS that can READ actual disks made available.
Get it at:
http://www.coli.uni-sb.de/~eric/stuff/soft/specials/ dosdosfsck-2.8.2.zip
You can use upx to:
File size Ratio Format Name
-------------------- ------ ----------- -----------
164946 -> 56364 34.17% djgpp2/coff dosfsck.exe
DOSFSCK is 32bit software, compiled with DJGPP (http://www.delorie.com/djgpp/ )
and only runs if you have a 386 or better. Sorry Tom, but you have to turn off
FreeDOS emm386 while running this, for the usual reasons.
I have tested it in Dosemu with both this:
C:\>dosfsck -a -v a:
dosfsck 2.8 (28 Feb 2001)
dosfsck 2.8, 28 Feb 2001, FAT32, LFN
Boot sector contents:
System ID "FreeDOS "
Media byte 0xf0 (5.25" or 3.5" HD floppy)
512 bytes per logical sector
512 bytes per cluster
1 reserved sector
First FAT starts at byte 512 (sector 1)
2 FATs, 12 bit entries
4608 bytes per FAT (= 9 sectors)
Root directory starts at byte 9728 (sector 19)
224 root directory entries
Data area starts at byte 16896 (sector 33)
2847 data clusters (1457664 bytes)
18 sectors/track, 2 heads
0 hidden sectors
2880 sectors total
Reclaiming unconnected clusters.
a:: 69 files, 1533/2847 clusters
(Note the UNIX style arguments, do not get caught by this one:
C:\>dosfsck /?
dosfsck 2.8, 28 Feb 2001, FAT32, LFN
open /?:No such file or directory (ENOENT)
)
And also, Unix style:
C:\HOME\RAMDISK>dosfsck -a -v diski~6q.bin
dosfsck 2.8 (28 Feb 2001)
dosfsck 2.8, 28 Feb 2001, FAT32, LFN
Boot sector contents:
System ID "FreeDOS "
Media byte 0xf0 (5.25" or 3.5" HD floppy)
512 bytes per logical sector
...
(where diski~6q.bin is the image file that simulates a: ...)
If you select a DRIVE which has at least number C:, then this
DOSFSCK version will always use the > 32 MB access method for
now, probably a bit of a kludge.
Finally, I tried with one of those special compact diskimages
which simulates an 8.5 MB FAT12 harddisk in my Dosemu: Generally,
dosfsck works, but it gets so much confused over some orphaned
LFN chunks that it crashes after a few of them :-(. This does
not happen with the Linux version, I wonder where the problem
actually is, please help with debugging!
DOSFSCK in the Linux version is part of DOSFSTOOLS (mkfs and
dosfsck, or in other words, format and chkdsk). My port is based
on version 2.8, current maintainer is Roman Hodek,
[email protected]
Primary-site: ftp.uni-erlangen.de /pub/Linux/LOCAL/dosfstools
DOSFSCK is capable to analyze FAT12, FAT16 and FAT32 partitions and
is pretty fast, but eats pretty much of your RAM (possibly several
megabytes).
The driver that I have added was clearly simpler than expected, but
one of the reasons is that I did NOT write a disk WRITING driver yet.
So DOSFSCK for DOS currently can read and write diskimage files, but
real partitions it can only read. Further limitation is that the
interface for > 2 GB FAT32 partition access is not yet implemented
(see the edisklib.zip inside the dosfsck*.zip for some sketchy things,
basically a minimal cut and paste from DISKLIB, concerning FAT32...).
The good point is that you can hardly break anything that way (having
only readonly access in raw disk mode)...
Please help with some testing and bug-hunting.
Here again some typical command line options:
DOSFSCK -r -V a:
checks a:, prompts you for decisions when needed for repairs, and
first collects all writes in a simulation buffer, scans a: again with
the simulation active, and only then asks you if it should write changes.
DOSFSCK -a -v a:
checks a: with verbose output and does decisions itself.
DOSFSCK -a -t -v a:
checks a: and does a surface scan as well
DOSFSCK -a -v floppy.bin
same as above but with a diskimage instead of a real floppy. THIS TIME,
dosfsck will be able to MODIFY the floppy.bin file, while in all other
cases, you just get an "a: would have been written now" message for now.
Read the documentation for more information. DOSFSCK can also undelete and
drop single files and can convert lost chains into files. Another new
feature is Atari format mode, to scan Atari disks (strange idea :-)).
Basically, all features are due to Werner Almesberger and Roman Hodek.
I have only done some adjustments to make it compile with DJGPP (luckily,
DJGPP feels very Unix, so adjustments are small) to create what I had
called version 2.8.1 for DOS, and now added the raw disk read driver to
create what I now call version 2.8.2 for DOS. As I did not get feedback
on 2.8.1, I cannot tell you if the crashing of the DOS version is due to
some recent changes in 2.8.2 or "no news at all". Seems to be keyboard /
stack related, I think, but -a mode crashes sometimes, too. Please help
with hunting bugs.
Have fun with this one... Eric.
> http://www.coli.uni-sb.de/~eric/stuff/soft/specials/ dosdosfsck-2.8.2.zip