Is this the new standard in Debian? Will /media be obsolete?
WHo has more information?
Yes, it's the new default from udisks2.
Quoteudisks2 (2.10.91-1) unstable; urgency=medium
* New upstream version 2.10.91
* Drop patches, merged upstream
* Use /run/media instead of /media as mountpoint for removable media.
This has several benefits like
- Better support for r/o root file systems
- Better alignment with other distros and upstream defaults
- Not requiring special cleanup routines as /run is hosted on a tmpfs
(Closes: #1074568)
* tests: Do not use "echo -e" in tests.
Patch cherry-picked from upstream Git.
-- Michael Biebl <biebl@debian.org> Wed, 03 Sep 2025 12:11:21 +0200
Thanks Towo!
Can we then make "/media" a SymLink to (/)run/media? [I mean on the live iso.]
I am asking, because I use some scripts with hardcoded paths. I could, of course, modify these, but then they would not work on older systems any longer - there is no "/run/media" on systems before the recent change.
Quote from: ro_sid on 2025/09/07, 19:00:04
Can we then make "/media" a SymLink to (/)run/media? [I mean on the live iso.]
I am asking, because I use some scripts with hardcoded paths. I could, of course, modify these, but then they would not work on older systems any longer - there is no "/run/media" on systems before the recent change.
True if you also run Debian Trixie and earlier.
Is there any way to restore the old behavior in a configuration file? I haven't been able to find anything about it.
...
Yes, you can put
[defaults]
mount_point = /media/%u
in /etc/udisks2/mount_options.conf
That doesn't work.
But I found something else that does work.
https://wiki.archlinux.org/title/Udisks#Mount_to_/media (https://wiki.archlinux.org/title/Udisks#Mount_to_/media)
...
Quote from: hsp on 2025/09/08, 17:58:34
That doesn't work.
But I found something else that does work.
https://wiki.archlinux.org/title/Udisks#Mount_to_/media (https://wiki.archlinux.org/title/Udisks#Mount_to_/media)
...
Nice find...thanks!
Edit: Created the files as described and it works. USB sticks and CD drives now mount under /media as it was before the change in udisks2. Nice tip for those who preferred the original behavior. It should be reversible by deleting the 2 files and rebooting to bring back the new default /run/media behavior.
Yes, the UDISKS_FILESYSTEM_SHARED trick is really nice, but it has the disadvantage that you have to cope with two different mountpoints (/media and /run/media). For terminal-/console-usage this is at least awkward.
Meanwhile I am able to build ISOs with a SymLink (/menu -> (/)run/menu).
As the "/media" directory (at least up to now) is created by the "base-file" package, I created a "base-filesystems.postinst" file to delete the /menu directory and replace it with the SymLink, base-filesystems being the closest available to base-files.
If there is interest in generally building ISOs with this SymLink, I am offering this solution - it is not sophisticated :) - to the repository.
Quote from: ro_sid on 2025/09/09, 19:24:41
Yes, the UDISKS_FILESYSTEM_SHARED trick is really nice, but it has the disadvantage that you have to cope with two different mountpoints (/media and /run/media). For terminal-/console-usage this is at least awkward.
Meanwhile I am able to build ISOs with a SymLink (/menu -> (/)run/menu).
As the "/media" directory (at least up to now) is created by the "base-file" package, I created a "base-filesystems.postinst" file to delete the /menu directory and replace it with the SymLink, base-filesystems being the closest available to base-files.
If there is interest in generally building ISOs with this SymLink, I am offering this solution - it is not sophisticated :) - to the repository.
After applying the trick in the ArchWiki all my mounts consistently appeared in /media rather than /run/media. The /run/media now doesn't exist in the /run directory. If I were to reverse this then /run/media would be created then /media would be empty.
@DeepDayze: ok, if you say so. Thanks.
I just find it strange, because of ENV{ID_FS_USAGE}=="filesystem|other|crypto", but may be, the "other" is a "catch-all".
I thought, the "rest" would still be mounted at "/run/media".
And it does not help with the "live-media-ISOs", since "your" file is missing there, too ;).
Quote from: ro_sid on 2025/09/10, 10:42:49
@DeepDayze: ok, if you say so. Thanks.
I just find it strange, because of ENV{ID_FS_USAGE}=="filesystem|other|crypto", but may be, the "other" is a "catch-all".
I thought, the "rest" would still be mounted at "/run/media".
And it does not help with the "live-media-ISOs", since "your" file is missing there, too ;).
Oh haven't tried mounting ISOs yet.
QuoteOh haven't tried mounting ISOs yet.
Yes, but I meant running(!) the Siduction-(Live-)ISO, where you have a "media"-dir and a "run/media"-dir, since ygour udev-file is not present.
The behaviour in mounting(!) an ISO might even work, I cannot say - you have to try this :).