Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
more destruction of usability
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1741

PostPosted: Wed Dec 25, 2013 2:51 am    Post subject: more destruction of usability Reply with quote

I never understood the reason behind the move (of removable media) from /media/foo/ to /run/media/user/foo/.

First question - can someone explain any purported benefits of this?

Second question - is there some way of undoing this change and going back to /media/foo/? Why do I want this, you might ask? Well, it turns out that I have some "removable" media devices (portable hard drive for example) that are more or less permanently attached. And the problem is that mlocate is not indexing any of the files on these devices due to /var/run/ (the same as /run/) appearing in the PRUNEPATHS variable in /etc/updatedb.conf (I certainly don't want the rest of /run/indexed, but I DO need the files on the removable drives indexed.

Thank you in advance for your help.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Wed Dec 25, 2013 5:48 am    Post subject: Reply with quote

Your are free to set the PRUNEPATHS variable to make updatedb index only the directories you want. You can make symbolic or hard links from the /run directory to the /media directory.
_________________
Paul
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Wed Dec 25, 2013 6:01 am    Post subject: Reply with quote

Quote:
First question - can someone explain any purported benefits of this?


Yes. For some multiuser systems, mounting media to /media caused problems due to collisions between users. Red hat style logic: move everyone to a new standard! Personally, I think this move is causing much more hassle than the 'problem' it is fixing.

The change is in udisks2. Using a search, I found this http://askubuntu.com/questions/214646/how-to-configure-the-default-automount-location which looks like it has the solution you are looking for.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Wed Dec 25, 2013 11:09 am    Post subject: Reply with quote

The Doctor wrote:
Quote:
First question - can someone explain any purported benefits of this?


Yes. For some multiuser systems, mounting media to /media caused problems due to collisions between users. Red hat style logic: move everyone to a new standard! Personally, I think this move is causing much more hassle than the 'problem' it is fixing.


For this very reason, I still wonder what the reason for the move from /mnt to /media is. That came first, and is equally absurd. But... :roll:
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Wed Dec 25, 2013 11:29 am    Post subject: Reply with quote

The Doctor wrote:
Quote:
First question - can someone explain any purported benefits of this?


Yes. For some multiuser systems, mounting media to /media caused problems due to collisions between users. Red hat style logic: move everyone to a new standard! Personally, I think this move is causing much more hassle than the 'problem' it is fixing.

The change is in udisks2. Using a search, I found this http://askubuntu.com/questions/214646/how-to-configure-the-default-automount-location which looks like it has the solution you are looking for.


Makes me glad that I don't run or even have udisks* installed.
The constant change simply because redhat wants to do it a form of insanity.

i92guboj wrote:
For this very reason, I still wonder what the reason for the move from /mnt to /media is. That came first, and is equally absurd


I keep /mnt as a hard mount point, though I do symbolic link /media to it.
Been that way for years.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Wed Dec 25, 2013 11:54 am    Post subject: Reply with quote

I understand the fstab vs. removable media stuff. But, taking into consideration that the new system is broken anyway, and that you need to tinker with files in /etc related to *kit* *dev* foobarmoocow, there's really no point in separating them.

Previously you needed to be root to mount drives. Now you need to be root to do all that, to kill whatever is locking a given drive at a given moment, and then to be able to format, remove it, etc etc etc. That is, unless you give your user full 777 permissions over /dev/*, which might not be advisable for many reasons.

More and more this is reminding me of a given OS where you sometimes need to reboot to be able to push off a cdrom. :lol:
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Wed Dec 25, 2013 1:33 pm    Post subject: Reply with quote

i92guboj wrote:
I still wonder what the reason for the move from /mnt to /media is.

The FHS explicitly requires /media for filesystems from removable media (suggesting floppy, cdrom, cdrecorder, zip as subdirectories) while /mnt is for "temporarily mounted filesystems" (being a bit vague what that means, but apparently not removable media).

Concerning the $user subdirectory, I suppose that the intention is that only the local desktop user should be able to see the local media so that he need not be afraid that somebody from the net makes a copy of his personal USB stick. By using cgroups features it is even possible that only the user sees the mounted device at all. However, this is only speculation, I do not know the official reasons.
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1741

PostPosted: Wed Dec 25, 2013 3:57 pm    Post subject: Reply with quote

Logicien wrote:
Your are free to set the PRUNEPATHS variable to make updatedb index only the directories you want. You can make symbolic or hard links from the /run directory to the /media directory.


How to do that is not clear at all. Looking at the directory structure (at least on my systems), /run/ is a real directory and /var/run/ (which appears in the PRUNEPATHS variable in /etc/updatedb.conf) is symlinked to it.

It seems to me that anything under /run/ (/var/run/) is going to get skipped, whether linked somewhere else or not.

It MIGHT work if there were an "exclude" option (like rsync has), since I want to skip everything in /run/ (which I can't even specify completely in advance) EXCEPT for /run/media/.


The Doctor wrote:
The change is in udisks2. Using a search, I found this http://askubuntu.com/questions/214646/how-to-configure-the-default-automount-location which looks like it has the solution you are looking for.


Very helpful (and especially noteworthy that Ubuntu "got it right" - in my opinion). Probably faster for me to search the tarball and patch it myself rather than running down their patch. Thanks.


mv wrote:
Concerning the $user subdirectory, I suppose that the intention is that only the local desktop user should be able to see the local media so that he need not be afraid that somebody from the net makes a copy of his personal USB stick. By using cgroups features it is even possible that only the user sees the mounted device at all. However, this is only speculation, I do not know the official reasons.


I can certainly live with /media/user/ (even though it is a bit more typing :) ), which is what Ubuntu went with according to the link posted by The Doctor above (and what I will probably end up going with). There is some point to keeping user separation, even though I would guess that well over ninety percent of mounting removable media is effectively in a single user environment). But putting removable media in /run/ just seems so wrong on so many levels.


The biggest reason I use gentoo is that it is (relatively) easy to fix idiocies like this (not just once, but to sort of automate a set of "permanent" patches).

Thanks, all.
Back to top
View user's profile Send private message
chaseguard
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jun 2004
Posts: 140

PostPosted: Thu Dec 26, 2013 3:58 am    Post subject: Reply with quote

I use uam, not udisk. My mountpoint has not changed and is easily configured in uam.conf. If your media is USB, then perhaps uam might work for you?
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Thu Dec 26, 2013 12:01 pm    Post subject: Reply with quote

curmudgeon wrote:
But putting removable media in /run/ just seems so wrong on so many levels.

Not necessarily: There are new subdirectories created at runtime which "typically" should not be permenant. So you either you clean up /media at every reboot (which would be a very questionable policy) or you put that data on a ramdisk (which /run is guaranteed to be). Maybe Redhat has a symlink /media -> /run/media in which case they would follow FHS and additionally have "solved" the cleanup problem.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Thu Dec 26, 2013 6:52 pm    Post subject: Reply with quote

i92guboj wrote:
The Doctor wrote:
Quote:
First question - can someone explain any purported benefits of this?


Yes. For some multiuser systems, mounting media to /media caused problems due to collisions between users. Red hat style logic: move everyone to a new standard! Personally, I think this move is causing much more hassle than the 'problem' it is fixing.


For this very reason, I still wonder what the reason for the move from /mnt to /media is. That came first, and is equally absurd. But... :roll:


I totally agree
Back to top
View user's profile Send private message
OldTango
l33t
l33t


Joined: 21 Feb 2004
Posts: 718

PostPosted: Mon Feb 03, 2014 6:15 pm    Post subject: Re: more destruction of usability Reply with quote

curmudgeon wrote:
I never understood the reason behind the move (of removable media) from /media/foo/ to /run/media/user/foo/.

First question - can someone explain any purported benefits of this?

Second question - is there some way of undoing this change and going back to /media/foo/? Why do I want this, you might ask? Well, it turns out that I have some "removable" media devices (portable hard drive for example) that are more or less permanently attached. And the problem is that mlocate is not indexing any of the files on these devices due to /var/run/ (the same as /run/) appearing in the PRUNEPATHS variable in /etc/updatedb.conf (I certainly don't want the rest of /run/indexed, but I DO need the files on the removable drives indexed.

Thank you in advance for your help.
I think this move sucks as well and won't get into all the problems it has caused me. To simply answer your question YES you can change it back. Create a file in "/etc/udev/rules.d/99-udisks2.rules" that reads
Code:
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{UDISKS_FILESYSTEM_SHARED}="1"
after which your removable media will be mounted @/media/foo
Back to top
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2377
Location: Netherlands

PostPosted: Mon Feb 03, 2014 6:53 pm    Post subject: Reply with quote

Thanks a lot OldTango!
Works like a charm.
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum