View Full Version : help with mounting
corneliu
June 25th, 2009, 03:04
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 (http://www.freebsd.org/gnome/docs/halfaq.html) 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
# 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
DrJ
June 25th, 2009, 03:48
Take the cdroms out of fstab. Then the steps listed in theFAQ can be applied and work.
corneliu
June 26th, 2009, 05:00
Thank you for helping,
I removed
/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:
Unable to eject 031217_0113
DBus error org.gtk.Private.RemoteVolumeMonitor.Failed: An operation is already pending
and this:
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
DrJ
June 26th, 2009, 05:06
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.
SirDice
June 26th, 2009, 08:04
Device busy usually means there's a window open or you still have a shell in that directory.
corneliu
June 27th, 2009, 05:14
Thanks DrJ,
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.
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
$ /etc/devfs.conf
/etc/devfs.conf: Permission denied
$
corneliu
June 27th, 2009, 05:17
Thanks SirDice,
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.
DrJ
June 27th, 2009, 05:25
$ /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:
perm cd0 0666
perm xpt0 0666
perm pass1 0666
You must link the pass? to how your computer is configured.
corneliu
June 27th, 2009, 05:56
Thanks DrJ,
OK, that was dumb. Here is the file
$ 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
$
DrJ
June 27th, 2009, 06:16
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).
corneliu
June 27th, 2009, 23:25
Thanks Drj,
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.
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.
Beastie
June 28th, 2009, 08:08
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:
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.
corneliu
June 29th, 2009, 02:05
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: 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?
monty_hall
July 1st, 2009, 05:46
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.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.