Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help: autofs 4.1.3-r2 won't automount local cdroms!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Jimmy Jazz
Apprentice
Apprentice


Joined: 04 Oct 2004
Posts: 290
Location: Strasbourg

PostPosted: Mon Jan 10, 2005 10:55 pm    Post subject: Help: autofs 4.1.3-r2 won't automount local cdroms! Reply with quote

Hello,

I'm using autofs in the same way as submount. You don't need to mount or unmount manually your cdrom. At least, that was true until the last stable release 3.1.7-r5.

The configuration is rather simple.

Here are my config files

# cat /etc/conf.d/autofs
Code:

# Config file for /etc/init.d/autofs
localoptions=''
# additional options for automount, ie. timeout
daemonoptions='--timeout 1'


expressions are separated by tabulation ^I (you can see them under vi "^ESC :set list", followed by a "^ESC :se nolist" to restore the initial view.

# cat /etc/autofs/auto.master
Code:

/media  /etc/autofs/auto.media


# cat /etc/autofs/auto.media
Code:

cdrw            -fstype=auto,ro,user    :/dev/cdroms/cdrom1
dvd             -fstype=auto,ro,user    :/dev/cdroms/cdrom0
floppy          -fstype=auto,user       :/dev/fd0


Modify udev accordingly to your configuration and give the users access to the devices (hdb, hdd in my case are cdroms)

# cat /etc/udev/permissions.d/10-udev.permissions
Code:

hdb:root:cdrom:660
hdd:root:cdrom:660
floppy/*:root:floppy:660


modprobe autofs4
/etc/init.d/autofs start

So, you only need to access/leave the directory to mount/unmount your cdrom.

Of course, the directories have not to be create except /media.

But after merging autofs 4.1.3-r2, i cannot make it work anymore.
/etc/conf.d/autofs is a more complex file and really badly documented, like auto.xxx files
They are a lot of new options that i don't understand :(

Has someone tried or perhaps succeed to automount dynamically cdrom devices in the same way i have with the new version ?

Any clues are welcome...

Thanks

Jj
Back to top
View user's profile Send private message
DrWoland
l33t
l33t


Joined: 13 Nov 2004
Posts: 603

PostPosted: Tue Jan 11, 2005 9:29 pm    Post subject: Reply with quote

I don't have any users set up yet (still using root for everything since im on a relatively fresh install), but my stuff works fine.

Try this how-to

https://forums.gentoo.org/viewtopic.php?t=277721
Back to top
View user's profile Send private message
Jimmy Jazz
Apprentice
Apprentice


Joined: 04 Oct 2004
Posts: 290
Location: Strasbourg

PostPosted: Wed Jan 12, 2005 9:57 am    Post subject: Reply with quote

@DrWoland,

thx above all for the link :)

Perhaps, my problem stays in the fact i didn't use the nodev option. But after all, why were my configuration working fine until i emerged the last one ?

Another question without answer ;)

ps: are you using the 4.1.3-r2 version ?

Jj
Back to top
View user's profile Send private message
Jimmy Jazz
Apprentice
Apprentice


Joined: 04 Oct 2004
Posts: 290
Location: Strasbourg

PostPosted: Wed Jan 12, 2005 2:19 pm    Post subject: Reply with quote

Hello,

after following the howto given above, i always cannot make it work.

I have changed the auto.master and auto.media config with:
Code:

cat /etc/autofs/auto.master
/media  /etc/autofs/auto.media  --timeout=1


Code:

cat /etc/autofs/auto.media
cdrw            -fstype=auto,ro,nosuid,nodev    :/dev/cdroms/cdrom1
dvd             -fstype=auto,ro,nosuid,nodev    :/dev/cdroms/cdrom0
floppy          -fstype=auto,nosuid,nodev       :/dev/fd0


but without luck. It works with the old release but not with the last one.
Same problem if i use -fstype=iso9660.

I get the following message after upgrading to 4.1.3-r2
Code:

$ cd /media/cdrw
-bash: cd: /media/cdrw: Aucun fichier ou répertoire de ce type


and the automount returns:
Code:

Jan 12 15:05:08 [automount] mount(generic): failed to mount dev/cdroms/cdrom1  (type iso9660) on /media/cdrw
Jan 12 15:05:08 [automount] failed to mount /media/cdrw
Jan 12 15:05:08 [automount] >> mount: périphérique spécial  /dev/cdroms/cdrom1  n'existe pas


There really is an issue i didn't understand :(, mount returns that /dev/cdroms/cdrom1 doesn't exist.

Has someone encountered the same problem ?

Jj
Back to top
View user's profile Send private message
Taladar
Guru
Guru


Joined: 09 Oct 2004
Posts: 458
Location: Bielefeld, Germany

PostPosted: Wed Jan 12, 2005 2:48 pm    Post subject: Reply with quote

Quote:
(still using root for everything since im on a relatively fresh install

You should add a normal user and only configure X and the other programs with user-specific config (except perhaps a text-editor and ssh) for this user. That way you are not tempted to use root for things it should not be used.
Back to top
View user's profile Send private message
andyknownasabu
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 281
Location: Zurich, Switzerland

PostPosted: Wed Jan 12, 2005 6:59 pm    Post subject: Re: Help: autofs 4.1.3-r2 won't automount local cdroms! Reply with quote

Jimmy Jazz wrote:
Hello,

I'm using autofs in the same way as submount. You don't need to mount or unmount manually your cdrom. At least, that was true until the last stable release 3.1.7-r5.

Did you ever think of using hal/dbus/ivman|gvm|kvm to deal with this (if you have a 2.6.xx kernel)?
Perhaps you will find it easier than aufofs... and AFAIK autofs is kind of deprecated/the combination of the three the future ;)
_________________
Please, also have a look at:
Global Marshall Plan Initiative
http://www.globalmarshallplan.org/
Back to top
View user's profile Send private message
Jimmy Jazz
Apprentice
Apprentice


Joined: 04 Oct 2004
Posts: 290
Location: Strasbourg

PostPosted: Thu Jan 13, 2005 2:07 pm    Post subject: Reply with quote

Hello andyknownasabu,

yes , i'm playing with the kernel version 2.6.10

I have read posts about hal/dbus/ivman but that seems to be a bit more difficult to configure than autofs, but after all if you have some hints they are welcome ;)

About, gvm and kvm they need respectively gnome and kde. But i'm under xfce.

Thx,

Jj
Back to top
View user's profile Send private message
andyknownasabu
Apprentice
Apprentice


Joined: 06 Feb 2003
Posts: 281
Location: Zurich, Switzerland

PostPosted: Thu Jan 13, 2005 5:02 pm    Post subject: Reply with quote

Jimmy Jazz wrote:
I have read posts about hal/dbus/ivman but that seems to be a bit more difficult to configure than autofs, but after all if you have some hints they are welcome ;)

About, gvm and kvm they need respectively gnome and kde. But i'm under xfce.

Well, hal and dbus only have to be installed. No special configuration has to be done here. The only thing you have to configure is ivman (which you can use if you're using xfce - you don't need kvm/gvm, I don't use them either): Two or three lines in the corresponding config file AFAIK and as far as I read ;)
_________________
Please, also have a look at:
Global Marshall Plan Initiative
http://www.globalmarshallplan.org/
Back to top
View user's profile Send private message
Jimmy Jazz
Apprentice
Apprentice


Joined: 04 Oct 2004
Posts: 290
Location: Strasbourg

PostPosted: Thu Jan 13, 2005 7:09 pm    Post subject: Reply with quote

andyknownasabu wrote:

Well, hal and dbus only have to be installed. No special configuration has to be done here. The only thing you have to configure is ivman (which you can use if you're using xfce - you don't need kvm/gvm, I don't use them either): Two or three lines in the corresponding config file AFAIK and as far as I read ;)


i will have a try...

@+

Jj
Back to top
View user's profile Send private message
jsosic
Guru
Guru


Joined: 02 Aug 2004
Posts: 510
Location: Split (Croatia)

PostPosted: Wed Jan 19, 2005 7:15 pm    Post subject: Reply with quote

https://bugs.gentoo.org/show_bug.cgi?id=77077

autofs-4.1.3-r2 (and r1 as I understood) had the same umount bug. I've noticed it today cause I was using 3.x till now, and this update gave me much of a haidache :(

Try emerging autofs-4.1.3, it is said to be working, so...
You've got to umask it first in /etc/portage/package.keywords.

Also I will have to update my howto with this bug report...
Back to top
View user's profile Send private message
el_compa
n00b
n00b


Joined: 28 Jan 2004
Posts: 65
Location: France

PostPosted: Thu Feb 10, 2005 10:51 pm    Post subject: Way to fix it Reply with quote

Hi,

I had the same problem, I fixed it by modifying /etc/conf.d/autofs. Here's my file:
Code:

# Config file for /etc/init.d/autofs

# e.g. localoptions='rsize=8192,wsize=8192'
localoptions=''

# additional options for automount, ie. timeout
daemonoptions=''

# NIS
nis_mapname='auto.master'

# LDAP
# By default autofs-ldap-auto-master will check the old style structure defined
# here, and if that fails, it will check the new style structure before
# failing. If this generates too much traffic for you, just change to use the
# new style here.


FWIW, here's my /etc/autofs/auto.master:
Code:

# $Id: auto.master,v 1.1 2000/08/08 17:53:33 achim Exp $
# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(8).

/var/autofs-usb /etc/autofs/auto.usbdrive       --timeout=2 --ghost
/var/autofs     /etc/autofs/auto.cdrom          --timeout=5 --ghost


and /etc/autofs/auto.cdrom
Code:

madd@xyu /etc/autofs $ cat /etc/autofs/auto.cdrom
cdrom    -fstype=iso9660,ro,sync,nodev,nosuid   :/dev/cdroms/cdrom0


I think the problem was in auto.master, with the LDAP entries. When I removed them everything was working again. :D


BTW, I'm running autofs-4.1.3-r3.
Good luck!
Back to top
View user's profile Send private message
Jimmy Jazz
Apprentice
Apprentice


Joined: 04 Oct 2004
Posts: 290
Location: Strasbourg

PostPosted: Thu Feb 10, 2005 11:25 pm    Post subject: Re: Way to fix it Reply with quote

el_compa wrote:
Hi,

I had the same problem, I fixed it by modifying /etc/conf.d/autofs. Here's my file:
Code:

# Config file for /etc/init.d/autofs

# e.g. localoptions='rsize=8192,wsize=8192'
localoptions=''

# additional options for automount, ie. timeout
daemonoptions=''

# NIS
nis_mapname='auto.master'

# LDAP
# By default autofs-ldap-auto-master will check the old style structure defined
# here, and if that fails, it will check the new style structure before
# failing. If this generates too much traffic for you, just change to use the
# new style here.


FWIW, here's my /etc/autofs/auto.master:
Code:

# $Id: auto.master,v 1.1 2000/08/08 17:53:33 achim Exp $
# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(8).

/var/autofs-usb /etc/autofs/auto.usbdrive       --timeout=2 --ghost
/var/autofs     /etc/autofs/auto.cdrom          --timeout=5 --ghost


and /etc/autofs/auto.cdrom
Code:

madd@xyu /etc/autofs $ cat /etc/autofs/auto.cdrom
cdrom    -fstype=iso9660,ro,sync,nodev,nosuid   :/dev/cdroms/cdrom0


I think the problem was in auto.master, with the LDAP entries. When I removed them everything was working again. :D


BTW, I'm running autofs-4.1.3-r3.
Good luck!


thx el_compa,

i will follow your advice too. I had left autofs, ivman and co for rox because i get some trouble when i try to burn some cdroms :(.

Peraphs i will continue using it but only for the floppy device ;)

@+

Jj
_________________
« La seule condition au triomphe du mal, c'est l'inaction des gens de bien » E.Burke
Code:

+----+----+----+
|    |::::|    |
|    |::::|    |
+----+----+----+

motto: WeLCRO
WritE Less Code, Repeat Often
Back to top
View user's profile Send private message
Revellion
Tux's lil' helper
Tux's lil' helper


Joined: 14 Sep 2004
Posts: 87
Location: Sweden

PostPosted: Sat Feb 19, 2005 9:51 pm    Post subject: Reply with quote

i gotta thank one of the posters here for just fixing my issue a bit, i searched and found this topic when i noticed my autofs did'nt umount my cdrom properly after the timeout, probably f*ed up after a emerge -u world someway back, but i used the ~x86'ed autofs (added it to /etc/portage/package.keywords) so i got the r3 version and i must say.... Thanks! ;), it works splendid now :D
_________________
Gentoo 2006.0 + NPTL + 2.6.15-r1-sources + gcc 3.4.4 100% built. glibc 2.3.5.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum