help with mounting

Hey guys,

I just installed freebsd 7.2 with gnome2-lite and I am trying to set this thing to auto mount CDs and USBkeys. I followed the instructions here but I still don't get the stuff auto mounted.
I tried adding the mount applet but when I right-cluck on the panel, select "Add to Panel" then select "Disk Mounter" then press "Add", nothing gets added to the panel.
What am I missing?
Thanks in advance,

Corneliu

Code:
# cat /etc/fstab
# Device		Mountpoint	FStype	Options		Dump	Pass#
/dev/ad0s1b		none		swap	sw		0	0
/dev/ad0s1a		/		ufs	rw		1	1
/dev/ad0s1e		/tmp		ufs	rw		2	2
/dev/ad0s1f		/usr		ufs	rw		2	2
/dev/ad0s1d		/var		ufs	rw		2	2
/dev/acd0		/cdrom		cd9660	ro,noauto	0	0
/dev/acd1		/cdrom1		cd9660	ro,noauto	0	0
proc           		/proc       	procfs  rw  		0   	0
 
Thank you for helping,

I removed
Code:
/dev/acd0		/cdrom		cd9660	ro,noauto	0	0
/dev/acd1		/cdrom1		cd9660	ro,noauto	0	0

and now it mounts CDs but it can't unmount them. When I try to unmount this is what I get:

Code:
Unable to eject 031217_0113 
DBus error org.gtk.Private.RemoteVolumeMonitor.Failed: An operation is already pending

and this:
Code:
Cannot unmount volume
Cannot unmount the volume '031217_0113'.
Details
umount: unmount of /media/031217_0113 failed: Device busy

Now the CD refuses to open when I press the eject button.

Also I can't play music CDs. I know they don't get mounted but I want to be able to play them.

The usbkey is still not mounted.

Now I can add the mount disks applet to the panel.

Thanks,

Corneliu
 
Please list you /etc/devfs.conf, and what you did with the groups to support this. Usb devices are always an issue (8 should fix this) but automounting of CDs and DVDs should work fine.
 
Device busy usually means there's a window open or you still have a shell in that directory.
 
Thanks DrJ,
DrJ said:
what you did with the groups to support this

Nothing. That tutorial says in the beginning of step 2 that if I am a Gnome user and I start Gnome through GDM no further actions are needed. Before this I added my user to wheel group, if that was what you wanted to know.

DrJ said:
Usb devices are always an issue (8 should fix this) but automounting of CDs and DVDs should work fine.
I think I heard of that. Can't wait to see it implemented in 8.0

Code:
$ /etc/devfs.conf
/etc/devfs.conf: Permission denied
$
 
Thanks SirDice,
SirDice said:
Device busy usually means there's a window open or you still have a shell in that directory.
This is one of the few things I know. I got the busy message with all windows and terminals closed.
 
corneliu said:
Code:
$ /etc/devfs.conf
/etc/devfs.conf: Permission denied
$
This is a text file, not a command. So use cat or more or less to list it. FWIW, here's the important part of mine:
Code:
perm    cd0     0666
perm    xpt0    0666
perm    pass1   0666
You must link the pass? to how your computer is configured.
 
Thanks DrJ,

OK, that was dumb. Here is the file
Code:
$ cat /etc/devfs.conf
#  Copyright (c) 2003 The FreeBSD Project
#  All rights reserved.
#
#  Redistribution and use in source and binary forms, with or without
#  modification, are permitted provided that the following conditions
#  are met:
#  1. Redistributions of source code must retain the above copyright
#     notice, this list of conditions and the following disclaimer.
#  2. Redistributions in binary form must reproduce the above copyright
#     notice, this list of conditions and the following disclaimer in the
#     documentation and/or other materials provided with the distribution.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
#  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
#  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
#  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
#  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
#  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
#  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
#  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
#  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
#  SUCH DAMAGE.
#
#  $FreeBSD: src/etc/devfs.conf,v 1.2.28.1 2009/04/15 03:14:26 kensmith Exp $

# These are examples of how to configure devices using /etc/rc.d/devfs.
# The first parameter is always the action to take, the second is always the
# existing device created by devfs, and the last is what you want to change.
# The name of the action is only significant to the first unique character.
#
# Examples:

# Historically X depended on this, but version 4.3.0 doesn't seem to anymore
#link	ttyv0	vga

# Commonly used by many ports
#link	acd0	cdrom

# Allow a user in the wheel group to query the smb0 device
#perm	smb0	0660

# Allow members of group operator to cat things to the speaker
#own	speaker	root:operator
#perm	speaker	0660
$
 
OK -- that is the stock file. See the HAL FAQ at freebsd.org/gnome to set up HAL for automounting. You will need to modify devfs.conf or set up local rules (which is what I do).
 
Thanks Drj,
DrJ said:
See the HAL FAQ at freebsd.org/gnome to set up HAL for automounting.

That's exactly what I linked in my first post. I followed that tutorial and still no auto-mounting.

DrJ said:
You will need to modify devfs.conf or set up local rules (which is what I do).

I'll try to find a tutorial that explains how to do that.
 
No need for a tutorial. Following the example in the stock file and reading the man page will do.

In summary, you have to change ownership and permissions, e.g. for an ATAPI CDROM drive:
Code:
own	acd0	root:operator
perm	acd0	0660

Of course, you'll have to add yourself to the operator group: # pw group mod operator -m <user_name>

If it still doesn't work, check /etc/sysctl.conf for vfs.usermount=1.
 
Thanks DrJ and Beastie,
This is getting better. I modified /etc/devfs.conf and I am able to mount automatically and unmount data CDs. Here is how it looks now:
Code:
own	acd1	corneliu:wheel
own	acd0	corneliu:wheel
own 	da0	corneliu:wheel
perm	acd0	0666
perm 	acd1 	0666
perm	da0	0666
Two unsolved issues:
1. can't play music CDs and video DVDs
2. the system still refuses to auto-mount the usbkey even after adding "own da0 corneliu:wheel" and "perm da0 0666" to /etc/devfs.conf.
Should I give up and mount the usbkey manually? Is there any solution for music CDs and video DVDs?

I checked /etc/sysctl.conf and vfs.usermount=1 is not there. Should I add it?
 
I'm not sure about USB drives. For me, unless I have "atapicam" kernel module loaded, I cannot get automounting of cd's to occur.
 
Back
Top