LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 11-28-2012, 05:36 AM   #1
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,958

Rep: Reputation: 975Reputation: 975Reputation: 975Reputation: 975Reputation: 975Reputation: 975Reputation: 975Reputation: 975
How to explain the usefulness of /run to mere mortals?


Hi,

Until recently, I could explain Linux mount points more or less simply to students. /mnt being the traditional mount point, with a series of preconfigured mount point directories in Slackware that you are free to use when working in console mode on a server, for example. And then /media, useful after the introduction of kernel 2.6 and HAL, where mount points could be created on-the-fly.

Now I see that when using Xfce, everything gets mounted under /run. I just googled for /run and found this, erm, explanation:

https://lists.fedoraproject.org/pipe...ch/150031.html

And now I wonder.
  1. How can I explain the utility of /run to my Linux students, when I'm not quite sure what it's good for myself?
  2. It looks like /media is orphaned. Correct me if I'm wrong.
  3. Can we expect other improvements on mountpoints like /var/crap/lennart in the future?

Any suggestions?

Last edited by kikinovak; 11-28-2012 at 05:37 AM.
 
Old 11-28-2012, 05:49 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
well that link seems to explain what it's for extremely well, but as you're discussing it alongside /media I think you just need to read it again more closely. udev and other core services need a place to write data to, that is available extremely early in the boot process and persists into the long term booted state of the system. That's pretty much it. ?media is where dvd's get mounted, that's not related to this at all. Other changes? Sure, the system is evolving, and will never stop doing so.
 
Old 11-28-2012, 05:59 AM   #3
NonNonBa
Member
 
Registered: Aug 2010
Distribution: Slackware
Posts: 61

Rep: Reputation: 21
Hello,

According to the (future) FHS v3, it is a replacement for /var/run (FHS v2.3). /media seems still in use, so it is not intended to be a replacement for it.

Last edited by NonNonBa; 11-28-2012 at 06:01 AM. Reason: Unprecise link
 
Old 11-28-2012, 06:25 AM   #4
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,974

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
kikinovak, take it as an example for the ongoing development in the Linux/Opensource world. Tell your students that it's not yet clear which way the concept of udev will go in the future. Tell them that there isn't a company which defines the standards (like in the Windowsworld) (ok, we have Redhat instead ) but that there are different opinions about which direction to go.

Maybe they will at least understand how opensource and free software function.

Markus
 
1 members found this post helpful.
Old 11-28-2012, 06:30 AM   #5
GazL
Senior Member
 
Registered: May 2008
Posts: 3,503

Rep: Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026Reputation: 1026
/run makes some sense:

I'd rather see a /run than have udev, md etc. spray hidden directories all over /dev where they don't belong. Of course, I'd much prefer to have a sensible early boot that didn't require using this sort of nonsense in the first place, but sadly those days are gone.

As for putting mountpoints under "/run/media/$USER/", I can see how they might be ok when only ever using a point/click interface, but as soon as you end up having to type directory paths in, either in the command line, or in some sort of gui text entry dialog, they just make things ugly and inconvenient and I much prefer the old way of doing it.

Last edited by GazL; 11-28-2012 at 06:33 AM.
 
2 members found this post helpful.
Old 11-28-2012, 07:00 AM   #6
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,958

Original Poster
Rep: Reputation: 975Reputation: 975Reputation: 975Reputation: 975Reputation: 975Reputation: 975Reputation: 975Reputation: 975
Quote:
Originally Posted by acid_kewpie View Post
well that link seems to explain what it's for extremely well, but as you're discussing it alongside /media I think you just need to read it again more closely. udev and other core services need a place to write data to, that is available extremely early in the boot process and persists into the long term booted state of the system. That's pretty much it. /media is where dvd's get mounted, that's not related to this at all. Other changes? Sure, the system is evolving, and will never stop doing so.
Xfce 4.6 under Slackware 13.37 mounted everything (DVD, USB stick, external disk, camera) under /media.

Xfce 4.10 under Slackware 4.10 mounts everything (DVD, USB stick, external disk, camera) under /run/media/something.

Hence my question.
 
1 members found this post helpful.
Old 11-28-2012, 07:08 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
Quote:
Originally Posted by kikinovak View Post
Xfce 4.6 under Slackware 13.37 mounted everything (DVD, USB stick, external disk, camera) under /media.

Xfce 4.10 under Slackware 4.10 mounts everything (DVD, USB stick, external disk, camera) under /run/media/something.

Hence my question.
Ahh, fair do's (despite this slackware time travel there!) my mistake.
 
Old 11-28-2012, 12:49 PM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
"/var/crap/lennart" -I love it!
 
1 members found this post helpful.
Old 11-28-2012, 01:13 PM   #9
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,504

Rep: Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912
http://www.linuxquestions.org/questi...7/#post4803572
 
Old 11-28-2012, 03:03 PM   #10
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
Quote:
Originally Posted by GazL View Post
/run makes some sense:

I'd rather see a /run than have udev, md etc. spray hidden directories all over /dev where they don't belong. Of course, I'd much prefer to have a sensible early boot that didn't require using this sort of nonsense in the first place, but sadly those days are gone.

As for putting mountpoints under "/run/media/$USER/", I can see how they might be ok when only ever using a point/click interface, but as soon as you end up having to type directory paths in, either in the command line, or in some sort of gui text entry dialog, they just make things ugly and inconvenient and I much prefer the old way of doing it.
+1

The lwn discussion on the matter is also nice http://lwn.net/Articles/436012/
 
Old 11-28-2012, 03:11 PM   #11
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
Quote:
Originally Posted by kikinovak View Post
Xfce 4.6 under Slackware 13.37 mounted everything (DVD, USB stick, external disk, camera) under /media.

Xfce 4.10 under Slackware 4.10 mounts everything (DVD, USB stick, external disk, camera) under /run/media/something.

Hence my question.
Thats udisks2 at work. KDE 4.8 which still uses udisks mounts under /media.
PS. Thats gonna change in KDE 4.10.
 
Old 11-29-2012, 08:09 AM   #12
jtsn
Member
 
Registered: Sep 2011
Location: Europe
Distribution: Slackware
Posts: 908

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Quote:
Originally Posted by kikinovak View Post
How can I explain the utility of /run to my Linux students, when I'm not quite sure what it's good for myself?
Use BSD for teaching and explaining well-thought OS design. The chaos you find in /etc, /lib (and now /run) of a typical Linux distribution is not that different from the \WINDOWS directory of an other well-known PC operating system.

It's just mindless namespace pollution, no big picture behind it.
 
Old 12-02-2012, 10:23 AM   #13
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 2,344

Rep: Reputation: 595Reputation: 595Reputation: 595Reputation: 595Reputation: 595Reputation: 595
/run is mounted as a tmpfs filesystem. It is intended to hold data that is not relevant after a reboot. The use of tmpfs allows it to be recreated on every boot.

That said, the use of /run is to hold files containing things like service daemon pid values. These have no use after a reboot. The advantage is that they are automatically disposed of, and easily recreated.

The problem comes up in that some projects overuse it. GDM (and formerly KDM) would put user Xauthority files in there. That requires that the /run directory be user readable, and specific directories (and files) be accessible, and writable.

This introduces a security problem in that it gives the user the ability to use up the storage space (and inodes) associated with the filesystem used for /run. This becomes a denial-of-service weakness as it allows any user with such access to fill the /run filesystem (either storage, inodes or both), and prevent other users (and daemon restarts) from succeeding.

I first saw this in Fedora, and is only now being cleaned up (KDM and Gnome now use /tmp). The only Xauthority files there now are for the hand off of initial X authority keys between GDM/KDM, the X server, and the login greeter process, so this isn't a problem.
 
1 members found this post helpful.
Old 12-04-2012, 02:46 AM   #14
kingbeowulf
Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.1, Slackware 14.1
Posts: 527

Rep: Reputation: 140Reputation: 140
shifting automountng from /media/* to /run/[user]/* was just plain idiocy. According to the links provided earlier in this thread (fedora and FHS), removable media goes into /media and /run is for run time variable data. Placing mount points into /run violates its defined purpose.

Just my 2 cents.

But what do I know? Its not like I ever rolled my own distro.
 
Old 12-04-2012, 10:27 AM   #15
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 2,344

Rep: Reputation: 595Reputation: 595Reputation: 595Reputation: 595Reputation: 595Reputation: 595
That is another of those "overuse" things. I believe fedora is now moving to /media being a tmpfs mount as well. At least, that is what it is on my F16, and F17 (in a VM).

There are a number of such mounts:
Code:
tmpfs             510044      80    509964   1% /dev/shm
tmpfs             510044    6868    503176   2% /run
tmpfs             510044       0    510044   0% /sys/fs/cgroup
tmpfs             510044       0    510044   0% /media
In none of these cases does it matter what the contents are after a reboot - they are all reinitialized with dynamic data.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Chakra Linux Review: Arch For Mortals LXer Syndicated Linux News 0 01-03-2012 05:10 PM
LXer: SQL Queries for Mere Mortals LXer Syndicated Linux News 0 11-16-2007 04:30 AM
Debian unstable for mortals reverse Debian 22 08-12-2007 03:01 AM
can lower run levels boost usefulness of older computers? dr_zayus69 Linux - Software 4 08-29-2005 07:25 PM
How do you configure machine seucurely that mortals can log into? maxque Linux - Security 4 05-04-2005 10:47 PM


All times are GMT -5. The time now is 08:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration