(Plausible?) alternatives to usbmount e.g. pi-usb-automount or devmon included with udevil
[ This is Background Research, just in case such might later be needed? ]
Just FWIW a decade later there are now (plausible?) alternatives to usbmount (e.g. pi-usb-automount below, not just devmon included with udevil) that we could hypothetically consider in future? e.g. if worst case usbmount proves insufficient for community needs &/or inadequately maintained:
-
pi-usb-automountis "USB flash drive automounting for a headless/console-only Raspberry Pi." https://github.com/fasteddy516/pi-usb-automount -
Description: "This is a modified version of udev-media-automount created specifically for use with Raspberry Pis and USB flash drives when a full desktop environment is not installed. (i.e. Raspberry Pi OS Lite, headless installations, kiosk and other purpose-built applications, etc.)
Once pi-usb-automount is installed, a USB drive will be automatically mounted and accessible in /media/usb0 when it is connected, and will be automatically unmounted when it is removed. If multiple USB drives are connected, they will appear as usb1, usb2, etc."
Originally posted by @holta in https://github.com/iiab/iiab/issues/4100#issuecomment-3353349047
A few related issues & associated progress:
- #3907
- #3924
- PR #3944
- #4066
- PR #4086
- PR #4088
- PR #4097
https://wiki.archlinux.org/title/Udisks#udevadm_monitor
Instead of pmount, it may also be possible to just use udisksctl as an alternative. It seems to be more common (in graphical environments at least--as it requires dbus)
Also, regarding stale mounts
https://wiki.archlinux.org/title/Udisks#Mount_to_/media
Since /media, unlike /run, is not mounted by default as a tmpfs, you may also wish to create a tmpfiles.d snippet to clean stale mountpoints at every boot:
/etc/tmpfiles.d/media.conf
D /media 0755 root root 0 -
just thought that was interesting
As you might of noticed usbmount uses /media and any replacement would need to be able to run external scrips like the ones in etc/usbmount/mount.d. The script(and can be expanded with other files/functions if wanted) in mount.d is used to bring the usb device within the webserver's working tree of directories.
The replacements listed above look like a knockoff of usbmount which by the way was first written in 2004. Don't call usbmount unmaintained with #3944 closed because I'm the one who maintained it but getting anything done in this project is just a PITA considering I'm the one who forked the original XS-Scoolserver for the Australian OLPC deployment which grew to become XSCE. Related: #3964 #3969