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?
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
I'm not sure if it's the best/easiest way, but in the past I've usedIt is used by desktop environment automounters and file managers rather than udisks itself.
udev rules with ENV{UDISKS_IGNORE}="1":
https://wiki.archlinux.org/title/Udisks#Hide_selected_partitions
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 ...".
On 23/07/2025 07:11, Stefan Monnier wrote:
On one of my (Debian stable) machines, all the partitions that aren'tIs it another attempt to solve the earlier raised issue?
mentioned in /etc/fstab end up mounted in /media/root/<UUID>, and that's
apparently a "feature" of `udisks2`.
Are there any traces of mounting in "journalctl -b" output (as root)?
I would check if ext4 metadata contains timestamp when it was mounted. It
may be a hint helping to find what happened around that moment.
all I find are options to control *how*
it's mounted (and to give the right to some users, but `root` always
has the rights, anyway).
all I find are options to control *how*That last bit is not always true.
it's mounted (and to give the right to some users, but `root` always
has the rights, anyway).
May it happen that it is not really automounting, but some package script running on "apt upgrade" or some cron task or systemd timer specific to
the board?
Is this done by the desktop environment?
Does it still happen if booting without the graphical environment?
Aha! I did have the impression of a "d�j� vu", but I usually keep notesYou suspected vgchange. Have you managed to trigger mount in response to
about such things and there wasn't anything in my notes. Weird.
some command? If system logs are not verbose enough then monitoring D-Bus might help.
In any case, yes `udisksctl dump` shows clearly that it's under its control.
Do you mean "UserspaceMountOptions: uhelper=udisks2"? The tool reports (almost) all available drives and partitions even if they are mounted "directly" without udisks.
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?
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
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.
Although it is udisks2 and udev that are facilitating this, I thought it
only happened inside a desktop environment. Though your example of /media/root/UUID suggests not. Anyway, some ideas for desktop
environments:
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?
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
So far it seems to be the best option, thank you. Sadly the doc I found doesn't say what is the meaning/effect of `UDISKS_IGNORE/SYSTEM/AUTO`
nor what values those vars can take (e.g. I had tried "yes" instead of
"1" and that seem to have no effect).
true/false I would imagine. See:
https://storaged.org/doc/udisks2-api/latest/udisks.8.html
and:
https://storaged.org/doc/udisks2-api/latest/gdbus-org.freedesktop.UDisks2.Block.html
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (0 / 16) |
| Uptime: | 162:42:38 |
| Calls: | 12,095 |
| Calls today: | 3 |
| Files: | 15,000 |
| Messages: | 6,517,780 |