Results 1 to 8 of 8
hi, ive had this problem for a long time now and haven't been able to find a solution myself. basicaly, i dont use gnome or kde, i use xfce on ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-21-2010 #1
automounting cdroms and usb sticks
basicaly, i dont use gnome or kde, i use xfce on gentoo. im looking for a way to automount removable media without requiring some gui specific tool. id like to be able to just be in a basic terminal and still have the system automount removable media.
id like to try and have ot also create and deleta the mount point files they use for instance, i blug in a usb stick, it creates the file /media/usb-storage01 and mounts it there. when i unplug it it removes the file correctly.
same so for cdroms, creates /media/cdrom01 and when i press the cd drive button(assuming its not being used) it unmounts, removes the directory and then ejects it.
so far ive tried ivman(some small program that surfaced right after the big udev switch) but its ridiculous to configure and i couldn't even get it to run right. ive read you can make udev rules to do it too, that seems almost as difficult but proboboly doable.
anyone that seems to get this working doesn't seem to do it all the way, like they get one specific usb stick to mount at a pre-made location, or they get somehting like an ipod to mount. seeing as how you can have a wide range of usb sticks and memory cards mounted, id kinda like it to be expandable such that it doesnt leave a bunch of unused directories laying around when its done.nVidia G-Force 6600GT (bfg) pci-e: amd 64 2000+ (939): 1024 corsair ram: 2X 80gb seagate harddisk SATA: plextor cd/dvd-read/write cdrom SATA
- 01-21-2010 #2
Do you have HAL installed? I believe HAL and or DBUS is what automagically mounts things for you.
HAL - Gentoo Linux Wiki
- 01-21-2010 #3
im fairly certain its more than that. hal i think is just a big information center service that hives infromation about the hardware and how its connected to your system, udev doesnt give near the info hal does, udev is responsible for crating the correct file association of the devices connected to the system AND running appropriet scrypts for wne that device is add/removed. then theres d-bus, another important part. it connects programs together and allows them to send information to eachother.
i think right now the way automounting is done is (for some reason) there's a service provided by your desktop manager (gnome and kde have one) that listens for a dbus message from udev that a device has been connected, then looks up some info through hal, and then mounts it to the appropriate location (either what is says in fstab or crates a file in /media.
at least that's how i currently understand it, problem is, i dont want to use a desktop specific tool to manage a systemwide problem. it really doesnt seem like the appropriet way to handle it, removable media should work even in a terminal setup with no x11 running.nVidia G-Force 6600GT (bfg) pci-e: amd 64 2000+ (939): 1024 corsair ram: 2X 80gb seagate harddisk SATA: plextor cd/dvd-read/write cdrom SATA
- 01-21-2010 #4
ok, my system didnt have hal startup on boot. by activating that thunar(xfce file manager) now will automount the cdrom and usb stuff, however this isnt working in just a terminal with x11 shutdown, was kinda hoping to get that to work as well since it would be nice to have.nVidia G-Force 6600GT (bfg) pci-e: amd 64 2000+ (939): 1024 corsair ram: 2X 80gb seagate harddisk SATA: plextor cd/dvd-read/write cdrom SATA
- 01-21-2010 #5
XFCE's volume manager, Thunar-Volman, requires the Thunar daemon to be running, so I don't think you can do that without X.
AutoFS might work as a solution for you.
Autofs - Gentoo Linux Wiki
There is also a lightweight volume manager, skvm, from the suckless project, that might work for you. I haven't used it, but it doesn't look like it should require X to work.
skvm | tools suckless tools
- 01-21-2010 #6
skvm probably isnt the best solution (designed to require source code modification and recompile in order to configure....
autofs, i think might just be right, a lot of what i was reading about it seems to make it seem really old like automount and supermount, both kinda went unused after the udev change and both *mounts had a lot of weird problems with them.
id like to know if anyone knows how autofs actualy works. i keep seeing people say they have automounts setup with just using udev, but its like they have some dificult to understand udev rule that points to a automounting script that doesnt end up being all that flexible. i have 4 memory card reader slots, like 8 usb ports, and a cdrom drive, i wouldn't want to have to make 90 different mount points all over the place just to support that, it should be fairly dynamic and automatic.
also, it is sounding like autofs can actually mount a device at access rather than at connect, and then unmount it when not being accessed and then remount when it is again accessed. that sounds like the best solution for a memory stick, since they, like floppies, can and often are fulled form the system at random points without warning, it would be best for them to only be mounted when actually being accessed and have that occur when someone actually tries to access them.
- 01-22-2010 #7
everything relating to autofs seems to make it sound like it hasnt been used for a really long time, and it also has a problem where it where it wont necessarily create the directory where it mounts, just look to see if something tries to access that point, so either it expects a directory sitting there at all times or it will actually create it when someone tries to go to that directory, as if it did exist.(kinda weird and confusing)
other than that and ivman(really dont think manually editing a bunch of xml files is correct, also seems like it hasnt been developed for the past 3 years) i might be able to do some sort of scripting stuff, or just have to make up my own program(doesn't sound like the right option)
- 01-22-2010 #8
I would give skvm a chance. I'm not sure you'll need to do much configuring. It looks like it should, by default, dynamically create and destroy mountpoints in /media.
And if you need to change the default mount options or path to the mount/umount commands, that part of the source looks pretty straightforward.
/* ============================ * = Macros * ============================ */ /* feel free to alter these to your liking */ /* NOTE: you may want to use the sync mount option if you plan * to cold eject your usb drives. Even though the side-effects * are probably not worth it. */ #define MOUNT_CMD_PATH "/bin/mount" #define UMOUNT_CMD_PATH "/bin/umount" #define DEFAULT_MNT_OPTIONS "noexec,nosuid,nodev,users" #define BASE_MNT_DIR "/media/"