Arch auto mount usb example - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120) +--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121) +---- Forum: Arch Linux on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=159) +---- Thread: Arch auto mount usb example (/showthread.php?tid=14185) |
Arch auto mount usb example - Lazy_one - 06-12-2021 After 2 days of head banging and following the wrong answers on google, I finally got my usb to auto mount as user on the Arch Phosh install. There is no guaranties this will work as everything in linux is dynamic and what worked one day doesn't the next. Here is what I did I create 3 file /etc/udev/rules.d/99-usb-mount.rules Quote:ACTION=="add",KERNEL=="sd[a-z][0-9]*",SUBSYSTEMS=="usb",RUN+="/bin/systemctl start usb-mount@%k.service" /etc/systemd/system/usb-mount@.service Quote:[Unit] /home/alarm/bin/mountusb.sh Quote:#!/bin/bash Don't forget to chmod -x mountusb.sh it can be called anything and put anywhere, obvious use your path in the usb-mount@.service file. I found rebooting the phone more reliable than Quote:udevadm control --reload-rules EDIT: Check the Second Post, I forgot the polkit edit. If it works without it great, but I am sure it was critical... (end EDIT) After just plug in a usb and it should auto mount. I did manage to get a sound to play, but that was a whole other story and twice as painful as getting the usb working. Hope it's useful to someone RE: Arch auto mount usb example - Lazy_one - 06-13-2021 Best laid plans!. I missed an edit. /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy in the first section <action id="org.freedesktop.udisks2.filesystem-mount"> Quote:<defaults> change to Quote:<defaults> I did so many tests I forgot about this. If it works without it please tell me. I'm sure it was critical but I'm human and obviously make mistakes RE: Arch auto mount usb example - luppivega - 10-06-2023 This can be easier with AUR (assuming you have yay or whatever other helper): Code: yay -S usbmount The project is stale, looks abandoned and hasn't received commits for a few years but it worked on everything that has systemd and relies on systemd handling the mounting. have been using it on headless raspberries for years and up to now no issues were observed |