You are not logged in.
Pages: 1
I'm trying to install Arch/LXDE on a number of systems, and I'm suffering an inability to automatically mount USB devices.
I know it used to work fine when I first tried Arch, then there was a change and you had to copy paste a PolicyKit file to make it work, then I ran an update on one of my systems and thanks to that I had to fstab all my SATA partitions and USB drives were weird, sometimes working by label and sometimes not. (That was a GNOME installation.) Searching the forums brings up the old PolicyKit fix and someone mentioned a "hal-easy" that does not appear via pacman -Ss so I can't get it while doing the big package installation when setting a system up, and there was some other Console Kit thing that apparently does something in .xinitrc; I don't think that I am missing a step, but it is possible. I found that PolicyKit is no longer installed when I install Arch (from the same old media I used to use, via FTP installation) so if there is a new step to replace the tiresome filling out PolicyKit.conf, I am unaware, but installing PolicyKit later didn't seem to fix anything.
I'd really appreciate knowing what the current correct path to USB drive auto-mounting is. I have three computers waiting to become useful, and I really can't tell people that Arch is worth trying if I can't even get myself through to a working installation as I could before.
Offline
If you're starting your window manager through ~/.xinitrc, just prepend ck-launch-session before it. For instance, for launching xmonad I have:
exec ck-launch-session xmonad
Offline
Just FYI; "hal-easy" is in the AUR:
Offline
skottish: I found that via forum search and tried it, but it did not work.
anon_u: Do I need to enable something for that to appear, then? Unless I typo-ed, -Ss did not find hal-easy.
Offline
skottish: I found that via forum search and tried it, but it did not work.
anon_u: Do I need to enable something for that to appear, then? Unless I typo-ed, -Ss did not find hal-easy.
pacman doesn't see the AUR. There are some helper tools for grabbing build files from there. I personally like Xyne's pbget*, also available in the AUR:
http://aur.archlinux.org/packages.php?ID=23848
ck-launch-session should work fine with the defaults assuming that you have hal running. Maybe posting your .xinitrc file here to see if we can spot anything would help.
* Xyne, why isn't pbget in community?
Offline
I'll do a full clean install after work tomorrow and report back if that ck-thing works or fails.
Whatever the AUR thing is, it would be really nice to be able to get at it in pacman if it contains packages necessary to make Arch work. Until the HAL/PolicyKit fiasco, I thought I had everything worked out into a pretty simple setup process distilled from the nightmare beginners guide.
Offline
the comments on the hal-easy AUR page say that hal-easy is obsolete, because regular hal doen's require policykit any more.
Offline
I was able to get at a USB drive on my little computer. The reason why I didn't think ck-launch-session was working is because it does not automatically mount the media. I was watching /media for the mounted filesystem to appear, and it never did. In LXDE, the file browser has those silly left-hand frames (didn't we evolve beyond browser frames around 2003?) and the USB device appears there but does not mount until I click on it. Am I safe to ask for the filename of a config that will allow me to specifiy immediate mounting, since I have no intent on leaving that frame enabled and know of no other way to mount the media I plug in? When I used GNOME there was a bar widget for managing storage devices that I really liked, but GNOME is dead to me now after that update a month ago that added 20% more annoyance FREE!
As a side note, I tried installing from media using the 2009-8 installer, and it apparently hung while getting packages on both tries. The whole installer seems a lot more complicated than my old install media. The first question should be an option to play on Easy, Advanced, or Expert. I see the usefulness of passing parameters to the partitioning tool per-partition, but it's not useful to me. Also, I traveled six continents to find my nearby mirror. I suppose I'll make backup copies of my old installation disks.
Offline
Is your purpose to have usb-disks mounted at boot, or when hotplugged? For the first case you do need fstab, and add 'usb' to the 'hooks' line in mkinitcpio and recreate the initramfs image . In the second case you can either use an udev rule as described in the wiki, or Thunar combined with the thunar-volman plugin from AUR. A non-root user also needs to be member of the 'storage' group to access removable drives. Do the system logs show any errors dealing with mounting?
Last edited by rwd (2009-12-08 23:11:31)
Offline
I finally got a change to play with my toys. The UDEV route looks like a mess, so I will cope with manually clicking the little box, but everything works now, even my Sansa, which was useless under GNOME after the update mangled everything. Thank you all for your responses.
Offline
Automounting via udev rules works great. However, it doesn't seem to remove the directory (as advertised) after unmounting. Is there a specific way its expecting the device to be unmounted in order for that to take place? Invoking 'umount /dev/sdxy' leaves the directory behind.
edit: ew. just pulling out the drive without unmounting appears to do the trick. I'll have to look into other options.
Last edited by falconindy (2009-12-11 19:38:56)
Offline
I finally got a change to play with my toys. The UDEV route looks like a mess, so I will cope with manually clicking the little box, but everything works now, even my Sansa, which was useless under GNOME after the update mangled everything. Thank you all for your responses.
The wiki page is a bit messy, but this is all I had to do to make udev do automounting (and auto-unmounting) usb - sticks/ drives:
- create the file /etc/udev/rules.d/01.usbdrive_automount.rules
(The low number at the beginning is important because it causes it to be evaluated first.)
- put this in it:
KERNEL=="sd[b-z]", NAME:="%k", SYMLINK+="usbhd-%k", GROUP:="users"
ACTION=="add", KERNEL=="sd[b-z][0-9]", SYMLINK+="usbhd-%k", GROUP:="users", NAME:="%k"
ACTION=="add", KERNEL=="sd[b-z][0-9]", RUN+="/bin/mkdir -p /media/usbhd-%k"
ACTION=="add", KERNEL=="sd[b-z][0-9]", PROGRAM=="/sbin/blkid -t %N", RESULT=="vfat", RUN+="/bin/mount -t vfat -o rw,noauto,flush,dirsync,noexec,nodev,noatime,dmask=000,fmask=111 /dev/%k /media/usbhd-%k"
ACTION=="add", KERNEL=="sd[b-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,async,dirsync,noexec,nodev,noatime /dev/%k /media/usbhd-%k"
ACTION=="remove", KERNEL=="sd[b-z][0-9]", RUN+="/bin/umount -l /media/usbhd-%k"
ACTION=="remove", KERNEL=="sd[b-z][0-9]", RUN+="/bin/rmdir /media/usbhd-%k"
Be sure that if you have more than one internal harddisk you change "sd[b-z]" to "sd[c-z]" or "sd[d-z]" etc. depending on the amount of internal harddisks. This way these rules apply only to sdc1, sdc2, sdd1 etc , ie. the external ones.
- reboot, or restart the hal daemon:
sudo /etc/rc.d/hal restart
Now you can just plug and unplug safely without mounting or unmounting manually.
The reason that this works is that drives get mounted with the 'flush,dirsync' options, which causes everything written to it to be committed instantly. This means slower transfers but when copying a file is done you know the data is actually on it, unlike with a drive mounted the regular way. When you unplug the drive the last two lines cause a 'lazy' unmount (umount -l) and the deletion of the mountpoint.
Last edited by rwd (2010-04-25 19:32:56)
Offline
I use skvm for automount and it works great.
Offline
Hi,
These post where very helpful to me for solving the problem. Your are greatly appreciated for sending this posts. Thanks a lot.
Offline
Pages: 1