From owner-freebsd-questions@FreeBSD.ORG Mon Apr 21 21:34:25 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE55D37B401 for ; Mon, 21 Apr 2003 21:34:25 -0700 (PDT) Received: from smtp0.adl1.internode.on.net (smtp0.adl1.internode.on.net [203.16.214.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8AAC43FBF for ; Mon, 21 Apr 2003 21:34:24 -0700 (PDT) (envelope-from Malcolm.Kay@internode.on.net) Received: from beta.home (ppp1831.sa.padsl.internode.on.net [150.101.26.38]) h3M4YHZe057943; Tue, 22 Apr 2003 14:04:18 +0930 (CST) Content-Type: text/plain; charset="iso-8859-1" From: Malcolm Kay Organization: At home To: William Palfreman , Chris Pockele Date: Tue, 22 Apr 2003 14:10:29 +0930 User-Agent: KMail/1.4.3 References: <20030421170801.GA23306@freedaemon.home.lan> <20030421191133.M41557@ndhn.yna.cnyserzna.pbz> In-Reply-To: <20030421191133.M41557@ndhn.yna.cnyserzna.pbz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200304221410.29115.Malcolm.Kay@internode.on.net> cc: freebsd-questions@freebsd.org Subject: Re: floppy drive problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2003 04:34:26 -0000 On Tue, 22 Apr 2003 04:41, William Palfreman wrote: > On Mon, 21 Apr 2003, Chris Pockele wrote: > > Hello, > > > > I've got a 486 laptop running a FreeBSD 4.7-STABLE snapshot from > > February 4th. Unfortunately its floppy drive is acting weird under > > FreeBSD: > > > > nomad# mount -t msdos /dev/fd0a /mnt > > fd0c: hard error reading fsbn 0 of 0-3 (ST0 40 ST1 > > 10 ST2 0 cyl 0 hd 0 sec 1) > > msdos: /dev/fd0a: Input/output error > > Given the apparent age of the drive, I'd say it was probably faulty. > If you are lucky you just have a faulty floppy disk, and the drive is > ok. Maybe. > > > nomad# dd if=3D/dev/fd0a /mnt > > dd: unknown operand /mnt > > Incorrect use of dd. > > > nomad# dd if=3D/dev/fd0a of=3D/dev/null > > fd0c: hard error reading fsbn 0 (ST0 40 ST1 10 = ST2 > > 0 cyl 0 hd 0 sec 1) > > dd: /dev/fd0a: Input/output error > > 0+0 records in > > 0+0 records out > > 0 bytes transferred in 7.328928 secs (0 bytes/sec) > > Correct use of dd, but the disk or drive still looks faulty. > > > When I boot with an OpenBSD boot disk and try the same, it shows > > similar error messages. > > Probably a very similar driver. > > > This is with various disks which are readable on other machine, and > > even on the same machine under dos/windows, so I presume the drive is > > not broken. > > In human years, a 486 is in its early 80s. Hardware failure for moving > parts is not just a possibility, its a assumption that has to be proved > wrong. Windows, especially DOS derived versions like 95 or 98, are mor= e > tolerant of faulty hardware than Unixes. Probably you would find in > use that "Windows seems to screw disks up now and then". A Unix would > test for more reading and writing faults, and coming across a problem > that windows would miss, would consider the drive to be faulty and > probably refuse to use it. > > > There must be some kind of incompatibility between the drive or > > controller and the FreeBSD driver. It works under Linux, although the > > Linux kernel prints some messages about timeouts and unexpected > > interrupts. > > Yup, because its faulty. Linux must just be slightly more failure > tolerant in that respect. It's noticed the same hardware failure, but > it is prepared to give it a go anyway, complaining. > > The main reason for this is only because it uses its own floppy driver > (not a BSD one) that behaves in a slightly different way in cases of > serious error. It does not imply incompatibility. > > > I attached a FreeBSD dmesg (custom kernel - same happens with the > > GENERIC one), and the dmesg from tomsrtbt (a one-floppy Linux > > distribution which loads a ramdisk image from floppy - you can see th= e > > messages when it starts reading that). > > > > Does anyone have an idea about how to start debugging or fixing this? > > Try with a known good floppy disk, then try cleaning the heads of the > drive unit, or better, stripping the drive down and pulling all the > fluff out too, then try replacing the drive itself, and if you can't > replace it (likely), most of the time move files over the network > (preferably PCMCIA 10Mbit Ethernet, but over parallel or serial TCP/IP > if Ethernet is impossible (broken slot perhaps) if you don't just chuck > it out - and attach the disk to another machine for OS installs, if you > can't go down the bootable CDROM route. I have seen people use a > converter to attach a laptop IDE disk to a full sized PC controller > cable. Notice all Chris's commands address a ufs partition, and the errors come = from=20 fd0c -- again a ufs concept. The disk is not set up with ufs but FAT12 so= =20 these do not exist. His drive works OK under windows; it is possible but very unlikely there = is a hardware problem. His problem will probably disappear if he uses a suitable device fd0 or=20 fd0.1440 rather than fd0a. This also applies in writing an image using dd, but here it might be advisable to use the sized device fd0.1440 or the traditional raw device rfd0.1440 Malcolm =20