UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
you should just install the autofs package "sudo apt-get install autofs" that will make all the /etc/auto.* and init scripts. You have to install the package for it to work
Like installing iptables, the kernel has support for it (module) but you still need the package to implement it.
Ummm. Yes. I understood that but what about kernel compatibility?
Like I said, I don't want to take the risk of breaking my system, (even if I do have a back up),i.e. is the repository autofs package up to the latest kernel? If I do as you suggest and it does break, what next?
Surely there is a way of manually constructing the files and links.
The package contains the binary needed to use autofs you wont be able to use it without that, no matter what config files and links you have. The package in the repository will be fine on with your kernel. The only thing in the kernel for autofs is support for it, it's not implemented unless you get the package. The only way it would have a (slim) possibility that it wouldn't work is if you make a custom kernel, and even then it wouldn't break your system if it wasn't the right version, automount just wouldn't work (well). The package doesn't install any kernel modules just uses the autofs4 one.
igorth : won't work because a floppy drive doesn't have any method of signalling that a disk has been inserted whereas most cdrom drives do.
Am still working on autofs though I cannot see yet how that will see a disk being inserted.
(eg floppy set op in autofs to mount to /mnt/floppy)
1) you try to access /mnt/floppy
2) autofs makes the directory
3) autofs mounts the floppy
4) when you've not accessed the device for longer than the timeout, autofs umounts the device
5) the directory dissappears
You will not find the floppy unless you navigate to where it should appear
With autofs you do not create the directory a device mounts into. You will only see the directories a device mounts to when you have already navigated there
You may need to remove the device from your fstab to avoid confusion.
Well it doesn't on my system! I removed the /dev/fd0 line from fstab and set up:
Code:
#
# $Id: auto.master,v 1.3 2003/09/29 08:22:35 raven Exp $
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
/misc /etc/auto.misc --timeout=30
#/misc /etc/auto.misc
#/net /etc/auto.net
Code:
#
# $Id: auto.misc,v 1.2 2003/09/29 08:22:35 raven Exp $
#
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage
cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
floppy -fstype=vfat,ext2,rw,sync,umask=002 :/dev/fd0
# the following entries are samples to pique your imagination
#linux -ro,soft,intr ftp.example.org:/pub/linux
#boot -fstype=ext2 :/dev/hda1
#floppy -fstype=ext2 :/dev/fd0
#e2floppy -fstype=ext2 :/dev/fd0
#jaz -fstype=ext2 :/dev/sdc1
#removable -fstype=ext2 :/dev/hdd
created a directory /misc with 755 permission.
Insert a floppy (with FAT files) and try to ls /misc/floppy. Nada.
So I go to Places->Computer->Floppy and click..whirr..whirr..eventually the files show up. Where are the files? Not in /misc/floppy but in /media/floppy!!
So
Code:
root@ubuntu:/etc# mount
/dev/hda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
tmpfs on /dev type tmpfs (rw,size=10M,mode=0755)
automount(pid7770) on /misc type autofs (rw,fd=4,pgrp=7770,minproto=2,maxproto=4)
/dev/fd0 on /media/floppy type vfat (rw,nosuid,nodev,quiet,shortname=winnt,uid=1000,gid=1000,umask=077,iocharset=utf8)
How does the system know to mount into /media/ ?? I removed the mount point from fstab!!
Not only that why isn't autofs taking over and creating /misc/floppy?
I tried deleting directory /media/floppy then accessing the floppy from Places->Computer but the directory is re-created and it does not disappear when I remove the floppy.
Also I note that
Code:
root@ubuntu:/etc# tail -n 10 /var/log/syslog
Jul 12 14:53:14 localhost automount[9796]: lookup(program): lookup for floppy failed
Jul 12 14:53:14 localhost automount[9796]: failed to mount /misc/floppy
Jul 12 14:53:29 localhost automount[9805]: lookup(program): lookup for floppy failed
Jul 12 14:53:29 localhost automount[9805]: failed to mount /misc/floppy
Jul 12 14:53:31 localhost automount[9808]: lookup(program): lookup for floppy failed
Jul 12 14:53:31 localhost automount[9808]: failed to mount /misc/floppy
so something is either wrong in my auto.* files or the system is blocking access to autofs (?)
On Sat, 14 May 2005 20:51:28 -0400
Michael B Allen <mba2000 ioplex com> wrote:
> /mnt/foo if accessed. However with FC3 this simply does not work. I get:
>
> May 14 20:44:00 quark automount[9844]: lookup(program): lookup for foo failed
I made an error. I accedentally created the auto.foo map file with
executable permissions. If you do this the autofs init script will
interpret it as a "program" and attempt to execute it rather then parse
it as a regular map file. Simply doing chmod -x on it and restarting
autofs fixes the problem.
Needless to say the autofs documentation is in need of some work.
Mike
Now floppy and cd get mounted and unmounted!
Great! Thanks for you kind help. Now all I need to do is to sort recognition of USB Stick and USB floppy.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.