"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, tag@lists.linuxgazette.net
LinuxCare, http://www.linuxcare.com/


(?) Floppy Failure: mdir Works; mount Fails

From Tim Baverstock on Fri, 25 Jun 1999

Hi.

I came across this page where someone'd asked you a question, apparently identical to something a (non-techie) friend of mine is now experiencing, except that his Linux is a vanilla RedHat 5.1 install (although with Star Office, and RedHat 5.2 Ghostscript and ppp).

He has a PCI PnP soundcard in his machine, which he's not managed to get working with W95 or with Linux, but the rest of the machine worked fine for both OSs, including the floppy.

All of a sudden, about a month ago, the floppy stopped mounting on Linux (works fine on W95).

(!) Does writing to the floppy work under MS Windows?

(?) I can `less -f /dev/fd0', to see the data on the floppy, and mdir/mcopy work fine.

(!) Does 'mcopy' work in both directions (copying to the floppy as well as from it)?

(?) The machine mounts his W95 C: drive as /mnt/dosC, and that works perfectly as well.

(!) So we know that this kernel is compiled with FAT fs support (linked in directly or the loadable module support is working).

(?) When I try `mount -t msdos /dev/fd0 /tmp/floppy', the mount command goes into `D' wait in the `ps axf' output, as does the update demon. The floppy lights, spins, then stops, but no failure messages appear, and I can't kill the mount. Subsequent attepts to mount also block, and if I recall correctly, mcopy says it can't write to the device.

Nothing appears in /var/log/messages.

During shutdown, the umount -a line in /etc/rc.d/init.d/halt hangs too.

If you're interested in whether fiddling with the soundcard fixes the problem, I'll be happy to let you know, but since mcopy and mdir work, this seems unlikely.

Nothing's been added or removed within the machine's case, so I think the only thing that could have changed, which persists over powerdowns, is the CMOS, and hence (presumably) some aspect of PnP that W95 was fiddling around with.

I've only ever had isapnp work under RedHat 6.0, when Redhat did it all for me! :) For my earlier kernels, I used the cmgr patch.

Cheers,
Tim Baverstock.

(!) What happens if you try mounting it in read-only mode?
It sure sounds like a hardware failure. I'd buy an extra floppy drive (about $20 US in most computer parts stores). I've asked questions to see if the problem is limited to the write functionality (since a careful reading of your messages seems to correlate to read-only vs. read/write access). When you mount a filesystem in rw mode under Linux --- I think the atime on the root of that filesystem will be updated (involving a write to the media). If it works when you try the 'mount -o ro' variation on the command --- that suggests that it is related to the write functions.

(?) Found The Culprit!

From Tim Baverstock on Sun, 27 Jun 1999

Hi Jim.

Ach! Rats!

I forgot to email you the solution I discovered!

The drive wrote perfectly well under Windows, and worked without difficulty in both directions with mcopy. I should have made this clearer in my first email; my apologies for this.

The functionality of the drive, and the evident integrity of the msdos filing system module eliminated those subsystems from the problem, which was why I was so perplexed, and why I wrote to you. :)

The next day, I used strace on `mount' to try and find out where it hung. It hung on the actual mount() system call itself.

I noticed that the automounter was in `D' discwait on the process list during its own mount attempt, so I disabled it in the boot sequence while trying to find out what was going on (I wanted to strace the very first attempt to mount the floppydrive) but that cured the problem!

Further investigation (with strace) revealed that I'd earlier changed /etc/resolv.conf to include a domain search path while trying to set my friend up with an ISP account, and the DNS hang was causing automount to hang while trying to finagle those strange pseudo-NFS mounts of the local host it does (by the host's internet name, not as `localhost') for the floppy drive!

I fixed resolv.conf, and the problem went away, although I've left AMD disabled, because autofs does the same job, and was installed alongside it on RedHat; and because one day I'll get my friend's ISP working on Linux as well as Windows. I don't want this to repeat. :)

Many thanks for your response, and my apologies once more for not writing sooner,

Tim Baverstock.


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 43 July 1999
HTML transformation by Heather Stern of Starshine Techinical Services, http://www.starshine.org/


[ Answer Guy Index ] 1 2 3
4 5 6
7 8 9


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]