PDA

View Full Version : Floppy issue - still looks mounted?



sternfan
27th April 2006, 02:04 PM
Hi all,

I just put in a FC5 lab for some kids where I work. For their classes, they save everything to a floppy.

The issue is that it gives the appearance of the floppy still being in the drive, even when it isn't - it still looks mounted. Is there some setting I missed? Is there some way to auto-mount <?> so that the kids can just remove their floppy when they are done with their work?

Thanks a bunch,
Rob

tashirosgt
27th April 2006, 02:24 PM
What do you mean by "it still looks mounted"? Do you mean that the mount point (such as /media/floppy) doesn't go away? Or are you talking about something that is happening in a gui?

sternfan
27th April 2006, 03:35 PM
If a student takes out the floppy after saving their work - (if you click on the desktop computer icon) - the floppy is still there, and if you click on it, the files still appear to be there, but obviously you can't open the files if the floppy has already been moved.

Also, on the desktop, you see a floppy icon as if there is still a floppy in the drive. Basically it looks the same whether there is a floppy in there or not.

Oh, and since the kids do not run as root, they cannot unmount the floppy. It just sits there.

Rob

tashirosgt
27th April 2006, 06:17 PM
Then the solution may be particular to which desktop is being used. Gnome or KDE or other?

sternfan
27th April 2006, 06:38 PM
Gnome. FC5, all updates.

tashirosgt
27th April 2006, 08:39 PM
I'm won't have a FC5 machine at hand till this evening and I'll look at the floppy icon then.

The behavior of the floppy is almost a Linux/Unix tradition. In that tradition you didn't take media out unless you went through the process of unmounting it. There is probably an instruction in the gui that does that. For cdroms, Linux is coming around to the Windows way of automounting (if not unmounting). I wonder if the eject button on the floppy sends any electrical signal that the operating system can detect. Or does Windows simply poll the floppy periodically to see if it can be read?

tashirosgt
28th April 2006, 04:14 AM
What I find on my FC5 Gnome desktop is that the floppy is not mounted until I select Places, Computer and double-click (how Windowsy!) on the floppy icon. Then the floppy icon appears on the desktop. Like you said, the floppy icon stays on the desktop even after the disk is removed.

According to this message:
http://lists.freedesktop.org/archives/hal/2004-June/000419.html
nothing detects the event of a disk being inserted in the floppy. It could be detected by "polling", which means doing an operation that tries to read the disk every now and then. The daemon "hald" which is used to detect things like usb sticks and cameras, can be configured to look for floppy disks, according to:
http://lists.freedesktop.org/archives/hal/2004-June/000470.html
However the price is that a (non-usb) floppy spins "continuously".

I wonder how Windows keeps track of the floppy disks - by polling too?

If one wanted a hack, I suppose one could write a program that would run every few seconds (under the chrond daemon). It would try to do an
readdir(...) of /media/floppy
and if it could find nothing (not even "./") in the directory entries then it would umount the floppy.
Perhaps it could use the dd command in some way to detect if an unmounted floppy was present and mount it.
But this seems like an inelegant way of doing things. Perhaps in a student lab where the computers weren't taxed to their limit, it would be ok.