Hi,

At 01:55 11/04/02 +0100, Ian Dowse wrote:
>In message <[EMAIL PROTECTED]>, "Vladislav V. Zhuk" writes:
> >After attempt to write data to write-protected floppy
> >(or diskette with bad blocks) FreeBSD die.
> >
> >It's VERY VERY annoying...  :(
> >
> >Who can fix this bug??
>
>Unfortunately, this is believed to be very hard to fix, so the best
>recommendation is that you avoid mounting filesystems from floppy
>disks. [etc]

IMHO, panic or hang is an unacceptable response to a media bad block 
(except possibly in the case of the root filesystem).

The write-protect thing is hard but not impossible. The problem is that 
most floppy drives will only tell you about write-protect in response to a 
write attempt, by which time (in the case of a mount) it's a bit late. On 
our (picoBSD-powered) routers, we use a script that checks the write 
protection before attempting to mount the floppy.

The test is to read block 0 off the raw flop and attempt to write it back. 
This will trip the write-protect check reliably. I entertain the theory 
that the floppy driver could do this test on open for write.

To make it harder to shoot oneself in the foot, use an fstab entry like:

/dev/fd0a       /flop   <type>  ro,noauto       0       0

and mount /flop, followed by mount -uw if you really want to write.


--
Bob Bishop                  +44 (0)118 977 4017
[EMAIL PROTECTED]            fax +44 (0)118 989 4254


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message

Reply via email to