NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/59924: NetBSD improperly does not update FAT0 on FAT12 MSDOS filesystem
I have figured out how to succeed with my use case, which is, indeed, to
use the raw floppy (via e.g. /dev/rsd3a).
And, if one does 'mount_msdos /dev/rsd3a /a[' and then 'disklabel -W sd3a'
then... standard reads / writes to files, deletion, creation, all work
properly.
The PROBLEM, as I see it, is: mount_mdsos needs to, effectively, ALSO do
"disklabel -W <disk>" because otherwise, other parts of the kernel protect
some sectors on cylinder 0 (prevent writes to it) because on other
filesystem types, that's the superblock etc. In the case of MS-DOS,
however, you must keep the two FATs synchronized (they are both in cylinder
0 on an actual 1.44 floppy). FAT 0 is not updated unless 'disklabel -W
<disk>' is performed first.
I created two small shell scripts
msmount:
echo example: msmount sd3a a
# this takes -x bit off msdos files
mount_msdos -m 0644 -M 0755 /dev/$1 /$2
disklabel -W $1
and the corresponding 'msumount' :
echo 'example: msumount sd3a a'
umount /$2
disklabel -N $1
This fixes the problem.
Thanks everybody,
Mike
On Sun, Jan 18, 2026 at 1:45 AM Michael van Elst via gnats <
gnats-admin%netbsd.org@localhost> wrote:
> The following reply was made to PR kern/59924; it has been noted by GNATS
Home |
Main Index |
Thread Index |
Old Index