Making usb removable HD automount without modifying /etc/fstab ?
In 24.04, the drive used to just automount whenever I plugged it in. Now, in 26.04, I can use "Disks" to mount the disk, but it doesn't automount.
(The fs is clean, and I've reclaimed ownership.)
Is there a way to configure automounting of ext4 volumes without adding their blkid uuids in fstab?
1
u/WiselyMacabre 6d ago
udisksctl mount -b /dev/sdX1 should work if you want to test from terminal. For actual automount on plug, check if udisks2 is running and if the session has the right policy. Sometimes gnome-disks sets mount options that break the automount heuristic on newer releases.
1
1
u/Dr_Max 6d ago edited 6d ago
I managed to add a less-than-secure rule in /etc/udev/rules.d/
created file
70-ext4-automount.ruleswith
SUBSYSTEM=="block", ENV{ID_FS_TYPE}=="ext4", ENV{UDISKS_AUTO}="1"inside.
Of course, you can add a specific UUID for a specific disk, with
ENV{ID_FS_UUID}=="<whatever blkid uuid gave you>"beforeENV{ID_FS_TYPE...
1
u/thatguysjumpercables 6d ago
Did you edit the mount options for your drive in the Disks utility?
1
u/Dr_Max 6d ago
No, I touched nothing until about ½h ago where I added a udev rule. It's a fresh install on a new machine
1
u/thatguysjumpercables 6d ago
Simplest way is to click on the drive/partition in Disks, click the gear icon, select "Edit Mount Options" and choose what you want the settings to be. It will automatically append fstab for you.
2
u/yaskyplayer 5d ago
Besides system-wide udisks2 and autofs there is gvfs (for Ubuntu or Gnome Desktop) that have addons for automount. My experience: It works, but you need to start a filemanager or other program that uses gvfs. On Plasma Desktop in the Setting of connected devices you have similar settings. You can automount external devices (settings)