You are not logged in.

#1 2012-07-27 16:27:58

frony0
Member
From: London, United Kingdom
Registered: 2011-05-01
Posts: 43
Website

Symlink /usr to /

Just out of curiosity, how much would it break a system if one was to go ahead and link /usr to the root directory? It seems /usr contains all the important files nowadays anyway, and is more vital than root, yet root stays centric... I would google for testimonies but the nature of Linux directory and user naming makes that all the more impossible.


Make it idiot-proof, and someone will breed a better idiot.
-- Oliver Elphick

Offline

#2 2012-07-27 17:43:49

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: Symlink /usr to /

Not sure if I understand your question correctly, but I'll give it a go.

There's more to your basic system than just /usr (otherwise why would there be a distinction in the first place). And symlinking /usr to / just doesn't make any sense.


Burninate!

Offline

#3 2012-07-27 18:00:49

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 3,411
Website

Re: Symlink /usr to /

Gcool wrote:

Not sure if I understand your question correctly, but I'll give it a go.

There's more to your basic system than just /usr (otherwise why would there be a distinction in the first place). And symlinking /usr to / just doesn't make any sense.

Good point. My first response to the original question was the thought, yeah, it should work just fine, since I don't think there is anything in /bin that is also in /usr/bin.

But upon further thought, I'd like to ask: Why are you interested in doing this? Is it really just out of curiousity? big_smile

Also, I'm not quite sure how you would do it... Would you move everything from /bin to /usr/bin, delete /bin, and then create the symlink?

Offline

#4 2012-07-27 19:31:21

Terminator
Member
From: Belgium
Registered: 2012-05-07
Posts: 265

Re: Symlink /usr to /

Gcool wrote:

And symlinking /usr to / just doesn't make any sense.

I wouldn't try it with /usr and /, but linux handles symlinking to a parent directory rather well smile.

[dean@PsyMadness ~]$ mkdir test1
[dean@PsyMadness ~]$ cd test1
[dean@PsyMadness test1]$ ln -s ~/test1 test2
[dean@PsyMadness test1]$ ls test2/test2/test2
test2
[dean@PsyMadness test1]$

lol smile

Last edited by Terminator (2012-07-27 19:31:52)

Offline

#5 2012-07-27 22:25:22

nomorewindows
Member
Registered: 2010-04-03
Posts: 2,948

Re: Symlink /usr to /

Only makes sense to have /usr on separate partition from /, but not required.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#6 2012-07-27 23:33:47

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,390
Website

Re: Symlink /usr to /

Terminator, have you ever dug into the /sys/class/ directory structure?  You can keep digging deeper and deeper until you suddenly realize you are just going in circles.  The pathname gets longer and longer, yet you remain in the same place.  Perhaps they should rename /sys/class/ to /red/queen/.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#7 2012-07-28 09:51:00

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: Symlink /usr to /

That's what the Hurd does, and it seems to work pretty well (at the small cost of cluttering / a bit). The reasoning being that /usr was created because root volumes were small but computers would have a large external storage volume which could be mounted after boot (/usr), but that's not an issue any more. Rather than just move everything in /usr to /, the symlink is kept for compatibility with things that expect a /usr.

Last edited by Barrucadu (2012-07-28 09:52:18)

Offline

#8 2012-07-28 13:14:36

frony0
Member
From: London, United Kingdom
Registered: 2011-05-01
Posts: 43
Website

Re: Symlink /usr to /

Barrucadu wrote:

That's what the Hurd does, and it seems to work pretty well (at the small cost of cluttering / a bit). The reasoning being that /usr was created because root volumes were small but computers would have a large external storage volume which could be mounted after boot (/usr), but that's not an issue any more. Rather than just move everything in /usr to /, the symlink is kept for compatibility with things that expect a /usr.

My thoughts exactly! I knew I'd seen it somewhere already...

drcouzelis wrote:

Why are you interested in doing this? Is it really just out of curiousity? big_smile

Of course tongue I just recently set up another arch box and had to use a seperate /usr on lvm, which was quite a pain to set up. Given the high dependency on /usr nowadays, I just thought it should be merged with / instead. I don't see why it doesn't make sense not to, especially since Hurd has already done it and it works quite well there


Make it idiot-proof, and someone will breed a better idiot.
-- Oliver Elphick

Offline

#9 2012-07-28 14:50:50

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Symlink /usr to /

Trilby wrote:

Terminator, have you ever dug into the /sys/class/ directory structure?  You can keep digging deeper and deeper until you suddenly realize you are just going in circles.  The pathname gets longer and longer, yet you remain in the same place.  Perhaps they should rename /sys/class/ to /red/queen/.

Science geek humor, or English major humor?  Either way: awesome. tongue  Anyway, that's exactly what I though of when it comes to linking a child directory to its parent: won't you end up with a series of potential regressios?  And what are you doing with all the files previously in that child directory--are they just loose in '/' ?  Maybe I'm not picturing this correctly, which might be why I don't see the point.

@frony0: Hurd is not Linux, but I'm not sure how much that really matters.  I'm kinda curious to see what the results might be.

Last edited by ANOKNUSA (2012-07-28 14:52:57)

Offline

#10 2012-07-28 15:11:41

progandy
Member
Registered: 2012-05-17
Posts: 2,143

Re: Symlink /usr to /

@frony0: Hurd is not Linux, but I'm not sure how much that really matters.  I'm kinda curious to see what the results might be.

Instead of merging everything into /usr, they chose to merge /usr in the root, that's all. The result would be these directories in /:

bin, boot, dev, doc, etc, home, i486-mingw32, include, lib, lib32, lib64, libexec, local, lost+found, media, mnt, opt, proc, root, run, sbin, share, src, srv, sys, tmp, usr, var

Offline

#11 2012-07-28 18:17:02

nomorewindows
Member
Registered: 2010-04-03
Posts: 2,948

Re: Symlink /usr to /

In FreeBSD, they put /home as a symlink to /usr/home, I'm not sure why, it's just FreeBSD.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#12 2012-07-30 16:07:33

Ultraman
Member
Registered: 2009-12-24
Posts: 242

Re: Symlink /usr to /

nomorewindows wrote:

In FreeBSD, they put /home as a symlink to /usr/home, I'm not sure why, it's just FreeBSD.

I made that the other way around on my FreeBSD server, just because I can and like it better that way tongue

I do know why FreeBSD does this:
FreeBSD has a very clear separation of what is the "base system" and what is installed on top of that.
Every package/port you install that's not part of the "base system", goes into /usr/local and it's subdirectories. For example binaries go into /usr/local/(s)bin and configuration files go into /usr/local/etc

So the majority of utilities and applications is nicely tucked away in /usr(/local) and only the fundamentals of the system can be found below it.
I quite like it that way, feels very tidy.

Last edited by Ultraman (2012-07-30 16:21:37)

Offline

#13 2012-07-30 16:32:20

nomorewindows
Member
Registered: 2010-04-03
Posts: 2,948

Re: Symlink /usr to /

Ultraman wrote:
nomorewindows wrote:

In FreeBSD, they put /home as a symlink to /usr/home, I'm not sure why, it's just FreeBSD.

I made that the other way around on my FreeBSD server, just because I can and like it better that way tongue

I do know why FreeBSD does this:
FreeBSD has a very clear separation of what is the "base system" and what is installed on top of that.
Every package/port you install that's not part of the "base system", goes into /usr/local and it's subdirectories. For example binaries go into /usr/local/(s)bin and configuration files go into /usr/local/etc

So the majority of utilities and applications is nicely tucked away in /usr(/local) and only the fundamentals of the system can be found below it.
I quite like it that way, feels very tidy.

It has a tight little kernel too.  Memory management is even tight.
The /lib directory doesn't even have that many files in it.
It's a perfect fit for a server and performs well. 

Anyhow, I'm not sure why you'd try to symlink /usr to /, because then it would cause endless recursion.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#14 2012-07-30 16:34:43

kaszak696
Member
Registered: 2009-05-26
Posts: 543

Re: Symlink /usr to /

You would have to deal with /lib being a symlink to /usr/lib as well, since it would create an infinite loop of symlinks.


'What can be asserted without evidence can also be dismissed without evidence.' - Christopher Hitchens
'There's no such thing as addiction, there's only things that you enjoy doing more than life.' - Doug Stanhope
GitHub Junkyard

Offline

#15 2012-07-30 19:23:18

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: Symlink /usr to /

nomorewindows wrote:

In FreeBSD, they put /home as a symlink to /usr/home, I'm not sure why, it's just FreeBSD.

Because then you can have a separate (minimal) root partition and combine your /usr and /home partitions. Works really great, especially if you've got a limited amount of disk space and don't want to play guessing games about how much you're going to need to split between user data and application data.

Unfortunately when it comes to the directory structure the Linux Powers That Be immediately lose about 20 IQ points. Figuring out what software is necessary to get Linux up and running is apparently prohibitively difficult.

Offline

#16 2012-07-30 19:30:18

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Symlink /usr to /

Bellum wrote:

Unfortunately when it comes to the directory structure the Linux Powers That Be immediately lose about 20 IQ points. Figuring out what software is necessary to get Linux up and running is apparently prohibitively difficult.

I suspect this has to do with the different development styles between the two: Linux, unlike *BSD, isn't intended to be a tightly integrated operating system.  Each distribution is run by people with different ideas about how things should operate.  Seems there might be a little more consensus pushing toward the *BSD-style, simplified filesystem hierarchy, but I don't know how far that'll go (since I honestly don't pay close attention).

Offline

#17 2012-07-30 19:52:16

frony0
Member
From: London, United Kingdom
Registered: 2011-05-01
Posts: 43
Website

Re: Symlink /usr to /

kaszak696 wrote:

You would have to deal with /lib being a symlink to /usr/lib as well, since it would create an infinite loop of symlinks.

True. The /lib folder can just be made a folder again. Otherwise I don't see how the possible recursion in any way affects how the system would function, what program would look for usr in /usr?

NB: I also learned today that Solaris and Fedora have done something along these lines; see http://fedoraproject.org/wiki/Features/UsrMove or (god forbid) http://www.freedesktop.org/wiki/Softwar … heUsrMerge (although they did the reverse, instead of my lazy solution)


Make it idiot-proof, and someone will breed a better idiot.
-- Oliver Elphick

Offline

#18 2012-08-02 23:44:01

sas
Member
Registered: 2009-11-24
Posts: 153

Re: Symlink /usr to /

Ultraman wrote:

FreeBSD has a very clear separation of what is the "base system" and what is installed on top of that.

I wish this could be taken further, to do the filesystem hierarchy completely from scratch in a user-friendly way that leaves historical idiosyncrasies behind.
For example:

/system/kernel/     <-- what is now in /boot
/system/drivers/    <-- kernel modules, etc.
/system/devices/    <-- what is now in /dev
/system/processes/  <-- what is now in /proc
/system/media/      <-- what is now in /mnt or /media
/system/bin/        <-- base system binaries
/system/lib/        <-- base system libraries

/apps/bin/          <-- binaries that don't belong to the base system
/apps/lib/          <-- libraries that don't belong to the base system
/apps/data/         <-- what is now in /usr/share or /opt
/apps/config/       <-- what is now in /etc
/apps/headers/      <-- what is now in /usr/include
/apps/state/        <-- what is now in /var or /run

/users/<username>/              <-- home dir
/users/<username>/.apps/        <-- what is now in ~/.local or ~/.config
/users/<username>/.apps/.../    <-- same subdirs as the global /apps

my AUR packages ~~ my community contributions ~~ my referral link for Copy.com (an Arch Linux compatible free cloud storage service - if you sign up via this link both of us get 5GB bonus storage!)

Offline

#19 2012-08-04 00:13:59

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 904

Re: Symlink /usr to /

sas wrote:
Ultraman wrote:

FreeBSD has a very clear separation of what is the "base system" and what is installed on top of that.

I wish this could be taken further, to do the filesystem hierarchy completely from scratch in a user-friendly way that leaves historical idiosyncrasies behind.
For example:

/system/kernel/     <-- what is now in /boot
/system/drivers/    <-- kernel modules, etc.
/system/devices/    <-- what is now in /dev
/system/processes/  <-- what is now in /proc
/system/media/      <-- what is now in /mnt or /media
/system/bin/        <-- base system binaries
/system/lib/        <-- base system libraries

/apps/bin/          <-- binaries that don't belong to the base system
/apps/lib/          <-- libraries that don't belong to the base system
/apps/data/         <-- what is now in /usr/share or /opt
/apps/config/       <-- what is now in /etc
/apps/headers/      <-- what is now in /usr/include
/apps/state/        <-- what is now in /var or /run

/users/<username>/              <-- home dir
/users/<username>/.apps/        <-- what is now in ~/.local or ~/.config
/users/<username>/.apps/.../    <-- same subdirs as the global /apps

Not sure why the fisrt think that come to my mind when I see this hierrarchi is the OSX hierarchy....

but maybe a LFS or in a Gentoo box this can be more plausible for make comparing to the actual state of arch, you need rebuild gcc and glibc and initscript and systemd-tools and (many others thinks) all apps that spect a /lib -> /usr/lib an soo

but This can be funy

PD: Actually move bin to usr/bin and make the simlink break boot (initscript) tested in april 2012 by me


Well, I suppose that this is somekind of signature, no?

Offline

#20 2012-08-06 03:54:14

yellowantphil
Member
From: Oklahoma
Registered: 2012-07-07
Posts: 8

Re: Symlink /usr to /

sas wrote:

I wish this could be taken further, to do the filesystem hierarchy completely from scratch in a user-friendly way that leaves historical idiosyncrasies behind.

GoboLinux did something like that. Wikipedia says the project is dormant.

Offline

#21 2012-08-06 11:28:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,423

Re: Symlink /usr to /

yellowantphil wrote:
sas wrote:

I wish this could be taken further, to do the filesystem hierarchy completely from scratch in a user-friendly way that leaves historical idiosyncrasies behind.

GoboLinux did something like that. Wikipedia says the project is dormant.

Not really. They organized things in Windows-like fashion:

Wikipedia wrote:

each program in a GoboLinux system had its own subdirectory tree, where all of its files (including settings specific for that program) could be found. Thus, a program "Foo" had all of its specific files and libraries in "/Programs/Foo".

Offline

#22 2012-08-08 00:54:48

dimigon
Member
Registered: 2009-03-07
Posts: 139
Website

Re: Symlink /usr to /

sas wrote:
Ultraman wrote:

FreeBSD has a very clear separation of what is the "base system" and what is installed on top of that.

I wish this could be taken further, to do the filesystem hierarchy completely from scratch in a user-friendly way that leaves historical idiosyncrasies behind.

Oh, God no!

Offline

Board footer

Powered by FluxBB