You are not logged in.
Hello!
I have an external USB-Harddisk on which my music is stored. Because i use Amarok's Collection i want to have it mounted always to the same folder (and not - as it's default with my KDE) to /media/disk1 or /media/disk2 or else, depending on how many USB-sticks i already have plugged in.
This is my fstab-line for the drive:
UUID=ae03327e-94b0-49d9-80fd-731c4c93e6a2 /home/hauke/musik ext3 rw,user,exec,noatime,auto 0 0
This works very well - as long as i mount the disk myself with "mount /dev/sdb1" (works even as a normal user) . But as soon as i want to use the KDE's service for automatic mounting it says "Permission denied" - even though i can mount the device manually with mount.
So - how can i make hal (or dbus, i am not sure which one is it) mount a certain drive to a certain mountpoint?
Every other external device (USB-sticks etc) works normally.
Thanks in advance, Hauke
Offline
Hi! Take a look at this article: http://wiki.archlinux.org/index.php/HAL. Procedure of enabling HAL is very simple, and I think you won't have any problems with understanding it.
Offline
Hi!
Thanks for the link, unfortunatelly it didn't fix it. What seemed to apply most to my problem was the "USB sticks and drives do not automount correctly" thing, I did what it said, still it doesn't work.
Maybe i didn't make the point clear: Every USB-stick or USB-drive or CD-ROM is mounted correctly by HAL (or dbus), They work. It's only this one that i want a fixed mountpoint for. But it gets varied mountpoints if i don't have it in my fstab depending on how many other usb-sticks i already have plugged in.
The first usb-medium gets /media/disk - the second /media/disk1 and so on.
That's perfect for all except this one where i have all my music on, and amarok has it's collection on - and amarok needs the collection to be in that folder, because if it - for example - scans the collection in /media/disk and two days later i happen to already have a usb-stick plugged in amarok wouldn't find my music because it was on /media/disk1.
All i need is to know how I can tell hal (or dbus) to mount a certain device to a certain mountpoint.
The error-message when i try to mount the usb-drive with a doubleclick in KDE is this:
In english it's:
Error - KIOExec
Access denied
and
Error - Konqueror
Access denied
The first message pops up when i try to mount the device with kde (a dialog pops up, guess you know that), the second one when i try to access it.
But, as i mentioned above, i can easily mount it (even as a user) with "mount /dev/sdb1" and then of course access it.
Hope i didn't confuse you too much
Last edited by haukew (2008-06-25 11:04:01)
Offline
have you added your user to the groups optical and storage?
gpasswd -a user optical
gpasswd -a user storage
Offline
yes. as i mentioned i can manually mount the device. And other usb-devices (that don't need a fixed mountpoint and so aren't in my fstab) can normally be mounted by hal (dbus). It's just HAL (or dbus) that can't mount this specific device that has a fstab-entry.
Offline
yes. as i mentioned i can manually mount the device. And other usb-devices (that don't need a fixed mountpoint and so aren't in my fstab) can normally be mounted by hal (dbus). It's just HAL (or dbus) that can't mount this specific device that has a fstab-entry.
HAL doesn't manage things that have a fstab entry
Offline
Thanks, but that's not the point: I don't insist on having a fstab entry - i just want hal or whatever daemon handles it to mount that specific device to that specific mountpoint. How can i do this?
I only gave it a fstab entry because - as mentioned above - hal gives varying mountpoints to devices, the first USB-device gets /media/disk decond one gets /media/disk-1 and so on. But this hard disk is supposed to get a fixed mountpoint which is /home/hauke/musik .
Last edited by haukew (2008-07-08 23:44:57)
Offline
my English is not so good , so I only add links
http://wiki.archlinux.org/index.php/Udev
http://wiki.archlinux.org/index.php/Usi … o_a_device
http://gentoo-wiki.com/UDEV
http://forums.gentoo.org/viewtopic-t-35 … ight-.html
http://www.atomicmpc.com.au/forums.asp?s=2&c=16&t=4775
I hope to be what you wanted
Offline
Yeah, that was it!
http://wiki.archlinux.org/index.php/Usi … o_a_device
helped me exactly. Thanks a lot!
[edit] ok, i was wrong, it didn't work - or at least it worked before i rebooted, i guess, it worked then because i had the device already mounted the "normal" way (mount /dev/sdb1) :-(
So ok, here is, following the howto, step by step what i did...
1st: Plug the USB-drive in
2nd:
# udevinfo -a -p `udevinfo -q path -n /dev/sdb` | grep ATTRS{serial}
ATTRS{serial}=="0000:00:02.1"
#
3rd:
BUS=="usb", ATTRS{serial}=="0000:00:02.1", KERNEL=="sd?1", NAME="%k", SYMLINK+="320GB_Platte", GROUP="storage"
into the file /etc/udev/rules.d/00.rules
4th
/dev/320GB_Platte /home/hauke/musik ext3 rw,noauto,group,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 0 0
into the fstab
then i rebooted, but the problem persists, but it really feels like it should work...what did i do wrong?
User hauke is in the storage-group
Thanks already a lot, hauke
Last edited by haukew (2008-07-15 23:39:26)
Offline
What i just relaized: The changes i made seem to have made everything worse - now every USB-stick i plug into my computer has to be manually mounted by root.
Offline
i think you wrong here :
rw,noauto,group,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111
noauto why ?
group , you need to be on group of device , storage i think
dmask , fmask i dont know , maybe its better umask ?
search on man mount for user,users
i can not help too much , because i nerver tried
Offline
I have created a similar entry for a usb device in my udev rules.
It works fine,
What I notice in your config is that the serial ATTRS{serial}=="0000:00:02.1" is probably not from your USB device; but from theEHCI Host Controller ?
This the output I get on my system
$ udevinfo -a -p `udevinfo -q path -n /dev/sdd` | grep ATTRS{serial}
ATTRS{serial}=="000000DCDC000"
ATTRS{serial}=="0000:00:02.2"
$ udevinfo -a -p `udevinfo -q path -n /dev/sdd` | grep ATTRS{product}
ATTRS{product}=="MiniPlayer"
ATTRS{product}=="EHCI Host Controller"
The udev rule should be created with "000000DCDC000" instead of "0000:00:02.2".
My udev rule looks like this :
BUS=="usb", ATTRS{serial}=="000000DCDC000", KERNEL=="sd?", NAME="%k", SYMLINK+="meizu", GROUP="storage"
My fstab entry is :
/dev/meizu /mnt/meizu vfat rw,user,noauto,flush 0 0
I don't know for sure if you picked the wrong serial, but you might want to check it again. I haven't come across an usb drive with ":" in the serial so far. (Then again I don't have many USB sticks )
Offline
Hi!
Thanks for your reply, it works now, the disk is mounted automatically to the given mountpoint - unfortunately only for the device i created the rule for (my external USD-Harddisk). All other USB-devices now have to be manually mounted by root(!) and are only accessible by root.
@starthis: Strange, because i only get this output:
root ~ # udevinfo -a -p `udevinfo -q path -n /dev/sdb` | grep ATTRS{product}
ATTRS{product}=="USB TO IDE"
ATTRS{product}=="EHCI Host Controller"
root ~ # udevinfo -a -p `udevinfo -q path -n /dev/sdb` | grep ATTRS{serial}
ATTRS{serial}=="0000:00:02.1"
root ~ #
(This is for my USB-HDD)
on the other hand when i plug in my mp3-player, it says:
root ~ # udevinfo -a -p `udevinfo -q path -n /dev/sdc` | grep ATTRS{product}
ATTRS{product}=="MP3 Player "
ATTRS{product}=="USB2.0 Hub"
ATTRS{product}=="EHCI Host Controller"
root ~ # udevinfo -a -p `udevinfo -q path -n /dev/sdc` | grep ATTRS{serial}
ATTRS{serial}=="F03A253B310ACA8A"
ATTRS{serial}=="0000:00:02.1"
root ~ #
(As you can see the mp3-player is plugged into an external USB-Hub, the HDD is plugged directly into the computer)
Do i now have to create udev-rules for every device i have?
Offline
By the way - that's the error i get when i try to open the device with Konqueror (as a user)
mount: Falscher Dateisystemtyp, ungültige Optionen, der
Superblock von /dev/sdb1 ist beschädigt, fehlende
Kodierungsseite oder ein anderer Fehler
Manchmal liefert das Syslog wertvolle Informationen - versuchen
Sie dmesg | tail oder so
roughly translated to
mount: wrong filesystemtype, invalid option,
the superblock of /dev/sdb1 is damaged, missing
codepage or another error.
Sometimes syslog gives valuable information - try
dmesg | tail or so
which gives me:
hauke ~ > dmesg | tail
sd 5:0:0:0: [sdb] 254720 2048-byte hardware sectors (522 MB)
sd 5:0:0:0: [sdb] Write Protect is off
sd 5:0:0:0: [sdb] Mode Sense: 3e 00 00 00
sd 5:0:0:0: [sdb] Assuming drive cache: write through
sdb: sdb1
sd 5:0:0:0: [sdb] Attached SCSI removable disk
sd 5:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete
VFS: Can't find ext3 filesystem on dev sdb1.
VFS: Can't find ext3 filesystem on dev sdb1.
hauke ~ >
Offline
label the filesystem
hal will mount it to /media/$LABEL (not 100% sure but at least thunar-volman does)
Last edited by robmaloy (2008-07-25 17:20:53)
☃ Snowman ☃
Offline
Hi!
I don't get why i have to do that - it really worked until i set up the rule to make my hard disk work...
Is there no rule like "act special for this device, handle all others normally"?
The big problem with that is that my mp3-player only seems to work when i format it with the software it came with - it doesn't work when i format it normally with fat32 and parted.
Offline
Thanks, but that's not the point
I just pointed it out
Offline
haukew wrote:Thanks, but that's not the point
I just pointed it out
Thanks though :)
Offline
idk if you are still having issues with this, but I was. in looking for a solution I came across this thread and just tried going through the wiki. For me the problem was with gnome-mount..
i had dbus and hal in my initscript array. The wiki said starting dbus this way could cause issues. So i stopped dbus manually and restarted hal, and it worked!
hope this helps someone else too...
Offline