bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fw: Bad Fat


From: Andrew Clausen
Subject: Re: Fw: Bad Fat
Date: Sat, 11 Nov 2000 19:28:08 +1100

Pixel wrote:
> 
> Andrew Clausen <address@hidden> writes:
> 
> > Pixel wrote:
> > > well, as far as i remember, it was that way with FAT16&DOS.
> >
> > Which version of DOS?  I'll see if my old DOS disks still work,
> > and try it out...
> 
> well any DOS i know of (5.0 and later)

I just tried with DOS 6.2.  It terminates directories on the
first NULL entry.

This is the script I'm using to generate the test:

parted /dev/hdb mklabel msdos mkpartfs primary fat 0 200
mount /dev/hdb1 /mnt/test
mkdir /mnt/test/dir1
mkdir /mnt/test/dir2
echo a > /mnt/test/dir1/file1
echo b > /mnt/test/dir1/file2
echo c > /mnt/test/dir1/file3
echo d > /mnt/test/dir2/file1
echo e > /mnt/test/dir2/file2
echo f > /mnt/test/dir2/file3
umount /mnt/test
sync

dd if=/dev/zero of=/dev/hdb1 bs=1 count=32 seek=$[0x0035260]


Note: the you'll need to change the number on the seek=$[0xXX],
because you will probably get a different size partition (with
a different size FAT and cluster offset, etc.), because you
may have different geometry to me.

Basically, I'm dd'ing over the TEST2 entry in DIR1.  If you
do an ls in Linux, you get "test1 test3".  If you do a dir
in DOS/Windows (for me) you get "test1".  You claim you can
get it to do "test1 test3" in some version of DOS.  Show me!

Hint: you can find the offset of the seek, by doing:

        # xxd /dev/hdb1 | less
        /TEST2

It might take 30 seconds.  You can probably speed it up with dd:

        # dd if=/dev/hdb1 bs=128k | xxd | less

Thanks!
Andrew Clausen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]