From owner-freebsd-stable Thu Apr 11 2:29:13 2002 Delivered-To: freebsd-stable@freebsd.org Received: from gidgate.gid.co.uk (gid.co.uk [194.32.164.225]) by hub.freebsd.org (Postfix) with ESMTP id 2F95C37B41B for ; Thu, 11 Apr 2002 02:29:04 -0700 (PDT) Received: (from rb@localhost) by gidgate.gid.co.uk (8.11.6/8.11.6) id g3B9SPK30000; Thu, 11 Apr 2002 09:28:25 GMT (envelope-from rb) Message-Id: <4.3.2.7.2.20020411100657.00c4f970@gid.co.uk> X-Sender: rbmail@gid.co.uk X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Thu, 11 Apr 2002 10:28:22 +0100 To: Ian Dowse , "Vladislav V. Zhuk" From: Bob Bishop Subject: Re: very old bug Cc: stable@FreeBSD.ORG In-Reply-To: <200204110155.aa50726@salmon.maths.tcd.ie> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, At 01:55 11/04/02 +0100, Ian Dowse wrote: >In message <20020410110605.GJ82820@dru.dn.ua>, "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 ro,noauto 0 0 and mount /flop, followed by mount -uw if you really want to write. -- Bob Bishop +44 (0)118 977 4017 rb@gid.co.uk fax +44 (0)118 989 4254 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message