On 23/07/2025 07:40, Andy Smith wrote:
On Tue, Jul 22, 2025 at 08:11:44PM -0400, Stefan Monnier wrote:
On one of my (Debian stable) machines, all the partitions that aren't
mentioned in /etc/fstab end up mounted in /media/root/<UUID>, and that's
apparently a "feature" of `udisks2`.

How can I tell udisks2 to refrain from doing that?

If you do not like automounting on connecting a drive then change settings of your desktop environment.

If you do not like that mounted partitions can not be accessed by users other than root then add udev hints for specific partitions, see udisks(8) and

<https://lists.debian.org/msgid-search/u9vmaf$123e$1...@ciao.gmane.io>
Re: [partly solved] Re: mounting media in plasma5. Fri, 28 Jul 2023 13:13:33 +0700

ENV{UDISKS_FILESYSTEM_SHARED}="1"

I'm not sure if it's the best/easiest way, but in the past I've used
udev rules with ENV{UDISKS_IGNORE}="1":

     https://wiki.archlinux.org/title/Udisks#Hide_selected_partitions

It is used by desktop environment automounters and file managers rather than udisks itself.

You could instead put the thing in fstab with a "noauto" as one of its
mount options. Then it wouldn't be mounted by the system at boot, nor by
udisks.

It is a viable approach as well since arbitrary mount point may be specified instead of /media/LABEL and /media/UUID hardcoded in udisks2. Users are still able to do "udisksctl mount -b ...".

Reply via email to