You are not logged in.
Pages: 1
I was wondering if th ere was a way I could make Arch automatically mount USB devices? It's quite annoying that everytime I plug in my flash drive I have to manually mount it.
Offline
if i'm correct - the easiest way would be:
- install hal (pacman -S hal)
- add it to daemons array in rc.conf
and basicaly thats all you must do...
http://wiki.archlinux.org/index.php/HAL
Offline
It's ok I actually looked deeper into the HAL wiki page and noticed the bit about AutoFS so I installed that.
Offline
Or you can put the desired device in the /etc/fstab or the desired command to /etc/rc.local too.
Offline
Well, it probably won't be in the same place the whole time, and I may have more than one. For example right now it would be sdb (I took out one hard drive), but if i put that back in it'd be sdc, and if I put another in it would either be sdc or sdd (depending if the hard drive is in). Would I be able to accommodate that?
Offline
which file manager are you using? If you use GNOME DE and nautilus as fm to take care of USB auto mounts. As Blayder said you need hal also. If you are using pcmanfm .fdi rules to be set correctly to read / write the USB drives and also ntfs-3g to take care of ntfs paritions.
Offline
I'm using Wmii.
Offline
You DON'T NEED TO USE HAL OR AUTOFS or any other of this crap. However some people like to have 1000 daemons running in their system in your case the solution is simple - you can use only UDEV. So please create the file /etc/udev/rules.d/10-my_mount.rules (can be other filename) that consist:
KERNEL=="sd[a-z]", NAME="%k", SYMLINK+="usbhd-%k", GROUP="users", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[a-z][0-9]", SYMLINK+="usbhd-%k", GROUP="users", NAME="%k"
ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mkdir -p /media/usbhd-%k"
ACTION=="add", KERNEL=="sd[a-z][0-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="vfat", RUN+="/bin/mount -t vfat -o rw,noauto,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 /dev/%k /media/usbhd-%k", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[a-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/%k /media/usbhd-%k", OPTIONS="last_rule"
ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/umount -l /media/usbhd-%k"
ACTION=="remove", KERNEL=="sd[a-z][0-9]", RUN+="/bin/rmdir /media/usbhd-%k", OPTIONS="last_rule"
All your usb stick will be auto mounted in /media
Last edited by nbvcxz (2009-07-11 15:51:17)
Lenovo G50 | LXQT-git | compton | conky
Offline
"-t vfat" might not be necessary, mount will try to guess the file system
F
do it good first, it will be faster than do it twice the saint
Offline
Pages: 1