Hi guys, I'm trying out XFCE, and one thing that doesn't happen automatically (as in KDE) is mounting of external discs. I'm following this howto: http://www.novell.com/coolsolutions/tip/17785.html I added this line to /etc/fstab: LABEL=EXT320 /media/EXT320 ext2 auto,hotplug,defaults 1 2 The disc was already labeled so that it would always mount in the same place (otherwise I have change amarok's settings each time :-) Then I made the udev rule 99-mount.rules #run mount -a everytime a block device is added/removed SUBSYSTEM=="block", run+="/bin/mount -a" Now the problem is, /bin/mount -a fails, because the mount point hadn't been created. KDE's automount system somehow checks the label of the disc ("EXT320" in this case) and mkdir the mountpoint ("/media/EXT320" in this case), and then mounts it. I'm missing the making the mountpoint part. How do I do this? Thanks Hans
* Hans du Plooy <koffiejunkielistlurker@koffiejunkie.za.net> [10-24-06 20:31]:
I added this line to /etc/fstab:
LABEL=EXT320 /media/EXT320 ext2 auto,hotplug,defaults 1 2
...
Now the problem is, /bin/mount -a fails, because the mount point hadn't been created. KDE's automount system somehow checks the label of the disc ("EXT320" in this case) and mkdir the mountpoint ("/media/EXT320" in this case), and then mounts it.
I'm missing the making the mountpoint part. How do I do this?
mkdir /media/EXT320 -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
On Tue, 2006-10-24 at 20:35 -0400, Patrick Shanahan wrote:
* Hans du Plooy <koffiejunkielistlurker@koffiejunkie.za.net> [10-24-06 20:31]:
I added this line to /etc/fstab:
LABEL=EXT320 /media/EXT320 ext2 auto,hotplug,defaults 1 2
...
Now the problem is, /bin/mount -a fails, because the mount point hadn't been created. KDE's automount system somehow checks the label of the disc ("EXT320" in this case) and mkdir the mountpoint ("/media/EXT320" in this case), and then mounts it.
I'm missing the making the mountpoint part. How do I do this?
mkdir /media/EXT320
Patrick, sorry, let me rephrase: How do I get udev to make the mountpoint, and delete it again when the device is unmounted? When I load KDE again, it will mount the drive, but when I remove it, it removes the mountpoint, meaning I have to make it manually each time after using KDE. Thanks Hans
* Hans du Plooy <koffiejunkielistlurker@koffiejunkie.za.net> [10-24-06 20:42]:
Patrick, sorry, let me rephrase:
How do I get udev to make the mountpoint, and delete it again when the device is unmounted?
When I load KDE again, it will mount the drive, but when I remove it, it removes the mountpoint, meaning I have to make it manually each time after using KDE.
look at: http://ivman.sourceforge.net/ -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
On Tue, 2006-10-24 at 20:56 -0400, Patrick Shanahan wrote:
* Hans du Plooy <koffiejunkielistlurker@koffiejunkie.za.net> [10-24-06 20:42]:
Patrick, sorry, let me rephrase:
How do I get udev to make the mountpoint, and delete it again when the device is unmounted?
When I load KDE again, it will mount the drive, but when I remove it, it removes the mountpoint, meaning I have to make it manually each time after using KDE.
look at: http://ivman.sourceforge.net/
Thanks Patrick. I know ivman from messing around with Gentoo, but I would have thought that SUSE already has something like it, since ivman is not included (or at least installed). What happens when stuff gets auto mounted in KDE? Is it internal KDE code at work, or does KDE call scripts that I can call too? I remember earlier versions of SUSE would make a /media/usb-id-xxxxx-whatever (id of the device) mountpoint, without KDE's help (I have a number of text-only servers). How does that work? It would be super if I can get any USB/FireWire device to mount to a mountpoint named after the volume name, without having to set up a separate rule and fstab entry for each one. Thanks Hans Thanks
* Hans du Plooy <koffiejunkielistlurker@koffiejunkie.za.net> [10-25-06 14:04]:
Thanks Patrick. I know ivman from messing around with Gentoo, but I would have thought that SUSE already has something like it, since ivman is not included (or at least installed).
19:30 wahoo:~ > rpm -qi ivman Name : ivman Relocations: (not relocatable) Version : 0.6.12 Vendor: (none) Release : 1.guru.suse101 Build Date: Fri 01 Sep 2006 06:35:26 PM EDT Install Date: Mon 04 Sep 2006 05:24:32 PM EDT Build Host: hera.lan Group : System/Filesystems Source RPM: ivman-0.6.12-1.guru.suse101.src.rpm Size : 136865 License: Dual License: GPL2 and QPL Signature : DSA/SHA1, Fri 01 Sep 2006 06:35:26 PM EDT, Key ID af734c5a58857177 Packager : Pascal Bleser <guru@unixtech.be> URL : http://ivman.sourceforge.net Summary : Flexible Userspace HAL Front-end for Linux Description : Ivman is a flexible userspace volume manager for Linux. Originally an automounter, it can also be used to run arbitrary commands when certain devices are added to or removed from the system, when properties on existing devices change, or when devices emit conditions. Unlike gnome-volume-manager, it runs from a console. It uses D-BUS and HAL to listen for new devices, and uses pmount for mounting. Distribution: SUSE LINUX 10.1 (X86-64)
What happens when stuff gets auto mounted in KDE? Is it internal KDE code at work, or does KDE call scripts that I can call too?
I remember earlier versions of SUSE would make a /media/usb-id-xxxxx-whatever (id of the device) mountpoint, without KDE's help (I have a number of text-only servers). How does that work?
I believe that is handled by udevd, 'man udev'.
It would be super if I can get any USB/FireWire device to mount to a mountpoint named after the volume name, without having to set up a separate rule and fstab entry for each one.
Do-able in 10.1, but you will have to research the archives. It has been discussed here but I do not have the pertinent posts at hand. I have found a post from Carl-Daniel Hailfinger, X-Authenticated: #31060655 Message-ID: <451D7CF9.7020100@gmx.net> Date: Fri, 29 Sep 2006 22:07:21 +0200 Subject: Re: [opensuse] eject a DVD without Gnome/KDE that describes a possible solution. You may want to read the entire thread. -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
On 25/10/06 17:52, Patrick Shanahan wrote:
* Hans du Plooy <koffiejunkielistlurker@koffiejunkie.za.net> [10-25-06 14:04]:
<snip>
What happens when stuff gets auto mounted in KDE? Is it internal KDE code at work, or does KDE call scripts that I can call too?
I remember earlier versions of SUSE would make a /media/usb-id-xxxxx-whatever (id of the device) mountpoint, without KDE's help (I have a number of text-only servers). How does that work?
I believe that is handled by udevd, 'man udev'.
There are also rather useful examples in the /usr/share/doc/packages/udev/ subtree.
participants (3)
-
Darryl Gregorash
-
Hans du Plooy
-
Patrick Shanahan