Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] mounts are appearing now in /run/media ?  (Read 32012 times)

Offline Lanzi

  • User
  • Posts: 1.838
[EN] mounts are appearing now in /run/media ?
« on: 2025/09/07, 16:33:12 »
Is this the new standard in Debian? Will /media be obsolete?
WHo has more information?

Offline towo

  • Administrator
  • User
  • *****
  • Posts: 3.144
Re: mounts are appearing now in /run/media ?
« Reply #1 on: 2025/09/07, 16:39:47 »
Yes, it's the new default from udisks2.

Quote
udisks2 (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
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.

Offline Lanzi

  • User
  • Posts: 1.838
Re: mounts are appearing now in /run/media ?
« Reply #2 on: 2025/09/07, 16:48:30 »
Thanks Towo!

Offline ro_sid

  • User
  • Posts: 470
Re: mounts are appearing now in /run/media ?
« Reply #3 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.

Offline DeepDayze

  • User
  • Posts: 506
Re: mounts are appearing now in /run/media ?
« Reply #4 on: 2025/09/08, 05:15:46 »
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.

Offline hsp

  • User
  • Posts: 656
Re: mounts are appearing now in /run/media ?
« Reply #5 on: 2025/09/08, 16:50:59 »
Is there any way to restore the old behavior in a configuration file? I haven't been able to find anything about it.

...

Offline towo

  • Administrator
  • User
  • *****
  • Posts: 3.144
Re: mounts are appearing now in /run/media ?
« Reply #6 on: 2025/09/08, 17:28:17 »
Yes, you can put

Code: [Select]
[defaults]
mount_point = /media/%u

in /etc/udisks2/mount_options.conf
Ich gehe nicht zum Karneval, ich verleihe nur manchmal mein Gesicht.

Offline hsp

  • User
  • Posts: 656
Re: mounts are appearing now in /run/media ?
« Reply #7 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

...

Offline DeepDayze

  • User
  • Posts: 506
Re: mounts are appearing now in /run/media ?
« Reply #8 on: 2025/09/09, 05:02:59 »
That doesn't work.
But I found something else that does work.

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.
« Last Edit: 2025/09/09, 05:13:10 by DeepDayze »

Offline ro_sid

  • User
  • Posts: 470
Re: mounts are appearing now in /run/media ?
« Reply #9 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.

Offline DeepDayze

  • User
  • Posts: 506
Re: mounts are appearing now in /run/media ?
« Reply #10 on: 2025/09/09, 19:39:53 »
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.

Offline ro_sid

  • User
  • Posts: 470
Re: mounts are appearing now in /run/media ?
« Reply #11 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 ;).

Offline DeepDayze

  • User
  • Posts: 506
Re: mounts are appearing now in /run/media ?
« Reply #12 on: 2025/09/10, 14:56:29 »
@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.

Offline ro_sid

  • User
  • Posts: 470
Re: mounts are appearing now in /run/media ?
« Reply #13 on: 2025/09/10, 17:40:38 »
Quote
Oh 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 :).