LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-08-2006, 11:21 AM   #1
fopetesl
Member
 
Registered: Jan 2005
Location: Yorkshire Dales, UK
Distribution: Ubuntu 5.10; Mandriva 2007; Debian Lenny
Posts: 147

Rep: Reputation: 15
Talking [SOLVED]: Automagically Automount Floppy Drive


Ubuntu 5.10 need help with this nightmare:

Floppy will NOT 'auto'mount whatever.
Code:
# pmount /dev/fdo
_or_
# mount /dev/fdo /media/floppy
works fine IF and only IF there is a disk in the drive, otherwise it fails with 'not a valid block device'.

I have installed ivman which, according to the logs, raises no errors bit still the floppy file system is not there.

In MDK10 there was no problem since automount is/was a standard kernel module. What to do with Ubuntu?

I need to have the floppy drive seen without user intervention since I am running a GUI with PHP interface.

Last edited by fopetesl; 07-12-2006 at 08:19 AM. Reason: Problem resolved
 
Old 07-08-2006, 10:21 PM   #2
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
If I understud you right, you can't auto mount the floppy drive if there is no disk in the drive, It's like saying "I cant mount my cd drive when there's no cd in it". There is no filesystem to mount.
 
Old 07-09-2006, 02:47 AM   #3
fopetesl
Member
 
Registered: Jan 2005
Location: Yorkshire Dales, UK
Distribution: Ubuntu 5.10; Mandriva 2007; Debian Lenny
Posts: 147

Original Poster
Rep: Reputation: 15
Quote:
saying "I cant mount my cd drive when there's no cd in it". There is no filesystem to mount.
No. What I mean is that it's like a Library that has a shelf marked "Autobiographies" but the shelf is clear because the books are away for cleaning. The label "Autobiographies" and the shelf remain.

If what you say is true, how come Mandrake have the filesystems for both CD and Floppy when no media is present?
 
Old 07-09-2006, 03:16 AM   #4
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
It may have a link to mount and open the drive on the desktop, but if there is no media in the drive it can't be mounted.
 
Old 07-09-2006, 04:44 AM   #5
fopetesl
Member
 
Registered: Jan 2005
Location: Yorkshire Dales, UK
Distribution: Ubuntu 5.10; Mandriva 2007; Debian Lenny
Posts: 147

Original Poster
Rep: Reputation: 15
Sorry bin, on the MDK10 system if I type mount I get, amongst other things:
...
none on mnt/floppy type supermount (rw,sync,dev=/dev/fd0,fs=ext2:vfat . . . .
...
without any disk in the drive.

I get the same result when I do put a disk in the drive and ls it.
 
Old 07-09-2006, 05:11 AM   #6
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
Well, that's just weard to me. On ubuntu, as with all the other dists i've used that I can think of (mostly debian based), you can only mount the floppy drive when there is a media in the drive (a filesystem to mount).
 
Old 07-09-2006, 05:49 AM   #7
fopetesl
Member
 
Registered: Jan 2005
Location: Yorkshire Dales, UK
Distribution: Ubuntu 5.10; Mandriva 2007; Debian Lenny
Posts: 147

Original Poster
Rep: Reputation: 15
Yeah, wierd maybe but it works on MDK10.
Seems the only option I have is to downgrade to 2.6.16 kernel (I have 2.6.17) and apply a supermount patch
 
Old 07-09-2006, 06:09 AM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
It doesn't make sense to mount nonexistant media. Don't bother downgrading the kernel.
 
Old 07-09-2006, 07:38 AM   #9
fopetesl
Member
 
Registered: Jan 2005
Location: Yorkshire Dales, UK
Distribution: Ubuntu 5.10; Mandriva 2007; Debian Lenny
Posts: 147

Original Poster
Rep: Reputation: 15
Quote:
I need to have the floppy drive seen without user intervention since I am running a GUI with PHP interface.
The user does not have any facility to (re)mount the floppy. Using MDK10 he (the user) doesn't have to mount.

OK so why don't I stick with MDK? Have you used Mandrake?? If they ever get the USB interface working solidly ....
 
Old 07-09-2006, 11:58 PM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I think that you forgot to umount the floppy or use the sync command to write the cache to the floppy disk, when you looked at the mount command. The entire floppy may have been cached to disk. Or Mandrake had no way of knowing that the floppy was ejected. Maybe both. Floppy drives aren't as smart as CDROM drives. There may not be a signal to say that the floppy was ejected, unless the device periodically tests it. If you ever had an Amiga computer, it was a different story. The drive would periodically click, because it would test that there was a device present.

It may depend on the floppy drive and the device. Maybe newer ones will signal when a disk is inserted. You could probably test this by monitoring (tail -f) /var/log/messages while inserting a disk. Also check if Ubuntu uses udev or not.
 
Old 07-10-2006, 01:54 AM   #11
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
ubuntu uses udev, can you not try using autofs to mount the floppy drive?
 
Old 07-10-2006, 04:26 AM   #12
fopetesl
Member
 
Registered: Jan 2005
Location: Yorkshire Dales, UK
Distribution: Ubuntu 5.10; Mandriva 2007; Debian Lenny
Posts: 147

Original Poster
Rep: Reputation: 15
Quote:
I think that you forgot to umount the floppy or use the sync command to write the cache to the floppy disk, when you looked at the mount command.
Nope. I can insert a disk, read it and list files, then remove the disk and list shows no file. Reinsert, (new) files can be listed, remove and no list of files, ad infinitum. Always the floppy stays mounted.. on MDK10 of course.
mount/pmount/umount/pumount not required.
Quote:
ubuntu uses udev, can you not try using autofs to mount the floppy drive?
Umm, from reading up on autofs, this daemon seems to mount OK(?) but unmounts automatically after a preset period, does it then re-mount when access is required? If there is no medium in the floppy drive how does it respond? I haven't found a good doc on it yet (no man entry).
Also it may be I have autofs compiled into the kernel since I have two kernel object files:
(1) /lib/modules/uname -r/kernel/fs/autofs/autofs.ko
(2) /lib/modules/uname -r/kernel/fs/autofs4/autofs4.ko
How can I tell if they are running? Neither shows with:
Code:
# ps -A | grep autofs
What's the difference between autofs.ko and autofs4.ko?

Neither autofs or autofs4 are listed in any of the rc?.d or init.d directories.

Last edited by fopetesl; 07-10-2006 at 04:29 AM.
 
Old 07-10-2006, 04:56 AM   #13
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
I was talking about the autofs package (which uses autofs4.ko), I'm not sure what autofs.ko is for (maybe an older version?). There is an official howto here
I don't need to use autofs myself, the hal daemon and hotplug do that for me (this PC didn't even come with a FDD).
 
Old 07-10-2006, 05:18 AM   #14
fopetesl
Member
 
Registered: Jan 2005
Location: Yorkshire Dales, UK
Distribution: Ubuntu 5.10; Mandriva 2007; Debian Lenny
Posts: 147

Original Poster
Rep: Reputation: 15
TY for that.
I'll come back later when I've studied it.
 
Old 07-11-2006, 04:18 AM   #15
fopetesl
Member
 
Registered: Jan 2005
Location: Yorkshire Dales, UK
Distribution: Ubuntu 5.10; Mandriva 2007; Debian Lenny
Posts: 147

Original Poster
Rep: Reputation: 15
More on autofs

I have been through the following checks:
(a) Can I load and see a kernel autofs module?
Code:
# modprobe autofs
# lsmod | grep auto
autofs   18436  0
#
so I have a current autofs kernel module, (same result for autofs4).

However, I am at a loss, having searched for a day, as to how to get autofs loaded at boot time. I know that there should be a script in /etc/init.d/ which tells the loader how to use autofs and there should be several /etc/auto.* configuration files and I should have symbolic links in /etc/rc?.d/ directories.

I could attempt to install another version of autofs using Synaptic which may generate these missing components but am concerned that in doing so I install an incomaptible version and break my system.

Can someone help as to how to manually set up these missing files/links since none of the HOWTOs I have seen tell me?
 
  


Reply

Tags
autofs, automount



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I automount my zip drive? dr_who Linux - Newbie 4 04-26-2006 04:24 AM
Automount Floppy Not Working mfeat Linux - Software 4 08-09-2004 09:25 AM
automagically mount Magneto-Optical Drive? wytiger Fedora 0 07-27-2004 10:56 PM
automount floppy, suse 9.0 Horny Toad Linux - Newbie 3 04-22-2004 03:00 PM
re: automount and cdrom and floppy ergo_sum Linux - Newbie 2 08-12-2003 03:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration