Subject: Re: msdosfs-problems
To: Julio Merino <slink@unixbsd.org>
From: Michael Kukat <michael@unixiron.org>
List: netbsd-users
Date: 04/10/2002 16:03:03
Hi !

On Wed, 10 Apr 2002, Julio Merino wrote:
> > Get the FreeDOS 8 Beta installation image, configure it on a vnode:
>
> Why use that image? Maybe it is corrupted or is internally wrong. Try
> writting your own image and check with it.

okay... just to prove: (sorry for the rest for a bit of spamming this way)

bash-2.05# dd if=/dev/zero of=/tmp/img bs=512 count=$((18*2*80))
2880+0 records in
2880+0 records out
1474560 bytes transferred in 1 secs (1474560 bytes/sec)
bash-2.05# newfs_msdos -f 1440 /tmp/img
bash-2.05# vnconfig vnd0 /tmp/img 512/18/2/80
bash-2.05# fsck_msdos /dev/vnd0a
** /dev/vnd0a
** Phase 1 - Read and Compare FATs
** Phase 2 - Check Cluster Chains
** Phase 3 - Checking Directories
** Phase 4 - Checking for Lost Files
1 files, 1423 free (2847 clusters)
bash-2.05# mount_msdos /dev/vnd0a /mnt
bash-2.05# for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j; do echo test >/mnt/$i.txt; done
bash-2.05# rm /mnt/[4-5].txt /mnt/[d-g].txt
bash-2.05# fsck_msdos /dev/rvnd0a
** /dev/rvnd0a
** Phase 1 - Read and Compare FATs
** Phase 2 - Check Cluster Chains
** Phase 3 - Checking Directories
/6.TXT starts with free cluster
Truncate? [yn] ^C
bash-2.05# vnconfig -u vnd0
bash-2.05# fsck_msdos /tmp/img
** /tmp/img
** Phase 1 - Read and Compare FATs
** Phase 2 - Check Cluster Chains
** Phase 3 - Checking Directories
/6.TXT starts with free cluster
Truncate? [yn] ^C

> As said, the disk can be wrong from the start. I experienced lots
> of problems with FreeDOS like this, and maybe the image is damaged...

As seen above, it fails even in pure-netbsd-usage. And the opposite:
i did all my actions with mtools now, on a drive v: mapped to a file, and
now everything is okay:

[michael@calchas michael]$ /sbin/fsck_msdos /tmp/image
** /tmp/image
** Phase 1 - Read and Compare FATs
** Phase 2 - Check Cluster Chains
** Phase 3 - Checking Directories
** Phase 4 - Checking for Lost Files
21 files, 39 free (79 clusters)

So i would say... yes, we really have a problem :)

...Michael

-- 
http://www.bsdfans.org/    Home network powered by: NetBSD OpenBSD FreeBSD IRIX
Solaris AIX HP-UX Tru64 MUNIX Ultrix VMS SINIX Dolphin_Unix OpenStep MacOS A/UX