LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 06-17-2013, 10:32 AM   #1
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
New root structure being employed?


I have recently moved to an Arch-form of distro and noticed both it and Arch itself have
moved to a new root structure.

The common one I am used to looks like:
Code:
drwxr-xr-x   1 root root  4096 03.06.2013 15:51 bin/
drwxr-xr-x   7 root root  4096 16.06.2013 19:26 boot/
drwxr-xr-x  19 root root  3420 15.06.2013 14:49 dev/
drwxr-xr-x  87 root root  4096 16.06.2013 22:52 etc/
drwxr-xr-x   4 root root  4096 10.06.2013 19:36 home/
drwxr-xr-x   1 root root  4096 03.06.2013 15:51 lib/
drwx------   2 root root 16384 10.06.2013 19:29 lost+found/
drwxr-xr-x   2 root root  4096 17.05.2013 10:32 media/
drwxr-xr-x   2 root root  4096 15.03.2013 10:33 mnt/
drwxr-xr-x   5 root root  4096 12.06.2013 16:27 opt/
dr-xr-xr-x 266 root root     0 15.06.2013 14:48 proc/
drwxr-xr-x   6 root root  4096 13.06.2013 12:37 root/
drwxr-xr-x  21 root root   640 16.06.2013 19:27 run/
drwxr-xr-x   1 root root  4096 03.06.2013 15:51 sbin/
drwxr-xr-x   4 root root  4096 15.03.2013 10:33 srv/
dr-xr-xr-x  13 root root     0 15.06.2013 14:48 sys/
drwxrwxrwt  13 root root   340 17.06.2013 22:55 tmp/
drwxr-xr-x   9 root root  4096 13.06.2013 09:00 usr/
drwxr-xr-x  12 root root  4096 13.06.2013 09:00 var/
Where the new structure appears to have made some symlinks:
Code:
drwxr-xr-x   7 root root  4096 16.06.2013 19:26 boot/
drwxr-xr-x  19 root root  3420 15.06.2013 14:49 dev/
drwxr-xr-x  87 root root  4096 16.06.2013 22:52 etc/
drwxr-xr-x   4 root root  4096 10.06.2013 19:36 home/
drwx------   2 root root 16384 10.06.2013 19:29 lost+found/
drwxr-xr-x   2 root root  4096 17.05.2013 10:32 media/
drwxr-xr-x   2 root root  4096 15.03.2013 10:33 mnt/
drwxr-xr-x   5 root root  4096 12.06.2013 16:27 opt/
dr-xr-xr-x 266 root root     0 15.06.2013 14:48 proc/
drwxr-xr-x   6 root root  4096 13.06.2013 12:37 root/
drwxr-xr-x  21 root root   640 16.06.2013 19:27 run/
drwxr-xr-x   4 root root  4096 15.03.2013 10:33 srv/
dr-xr-xr-x  13 root root     0 15.06.2013 14:48 sys/
drwxrwxrwt  13 root root   340 17.06.2013 22:55 tmp/
drwxr-xr-x   9 root root  4096 13.06.2013 09:00 usr/
drwxr-xr-x  12 root root  4096 13.06.2013 09:00 var/
lrwxrwxrwx   1 root root     7 03.06.2013 15:51 bin -> usr/bin/
lrwxrwxrwx   1 root root     7 03.06.2013 15:51 lib -> usr/lib/
lrwxrwxrwx   1 root root     7 03.06.2013 15:51 sbin -> usr/bin/
So I was wondering if anyone can direct me to documentation on why this sort of change has been implemented?
Specifically I would like to know what issues there are surrounding once /sbin files now being in /usr/bin which is in everyone's PATH?
 
Old 06-17-2013, 11:08 AM   #2
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,142

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
The starting point would be this
https://wiki.archlinux.org/index.php...stem_hierarchy
It has a few links about possible problems. The discussion on why it was done is probably buried somewhere in the developers' mailing list.
 
1 members found this post helpful.
Old 06-17-2013, 11:56 AM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Original Poster
Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Thanks for the link David. You are correct that it explains what has been done, but not the why or the impacts

I will leave this open a little longer to see if any other information is forthcoming.
 
Old 06-17-2013, 05:23 PM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Moderator Response

Moved: This thread is more suitable in <Arch> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 06-18-2013, 11:08 AM   #5
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,142

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
I was interested in this, even though I'm never going to be an Arch user, and I've found some of the discussion:
https://mailman.archlinux.org/piperm...ead.html#22625
 
2 members found this post helpful.
Old 06-18-2013, 02:26 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
This has been a hot topic ,some like it some do not .

the remerging of the " /" and "/usr" split

i have no opinion on this
both are good

but a "crystalball " guess ...

with the move to more and more "cloud" services
having /usr might stay around as the local hdd and / as the cloud , or not .
-- like it was with a server and a thin client with /usr/local and /usr .
 
Old 06-18-2013, 11:11 PM   #7
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Original Poster
Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Well I am starting to see some light in the forest Thanks again David for the link.

I guess my concerns would be around now requiring intramfs bringing up the network as well so a nfs mounted /usr can be used prior to init??

I do agree that the endless symlinking that has previously occurred to allow for /bin, /sbin, /lib, /usr/bin, /usr/sbin and /usr/lib to all work has been painful.

What I am struggling with is the lack of separation between bin and sbin from a security point of view in that all users will now have /usr/bin in their path and so can now execute
anything not restricted by chmod.

My other issue, which is a little old fashioned, is the call to 'which' to tell me that a command is in and sbin directory and hence a root-esque command, now all simply return /usr/bin/...
 
Old 06-18-2013, 11:27 PM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

this has significant implications for systems with with separate / and /usr partitions. Traditionally, early in the boot process the init system should not assume that /usr is mounted and scripts/tools would restrict themselves to things installed in /bin, /sbin and /lib and forgo things that would be in /usr/bin, /usr/sbin and /usr/lib.

Evo2.

PS. Sorry not an Arch user, but have always set up my servers with separate / and /usr, so have been watching this / to /usr migration with some interest.
 
Old 06-19-2013, 01:58 AM   #9
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Original Poster
Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Thanks for the feedback evo2

So are you saying that if /usr is on a separate partition then there would be no option to have it mounted in initramfs to have the major commands available?

If I read correctly this seems to be the solution or at least the objective. I also saw that they have inferred several issue can be overcome by having /usr available early:

Quote:
Most of the failures you will experience with /usr split off and not pre-mounted in the initramfs are graceful failures: they won't become directly visible, however certain features become unavailable due to these failures. Quite a number of programs these days hook themselves into the early boot process at various stages. A popular way to do this is for example via udev rules. The binaries called from these rules are sometimes located on /usr/bin, or link against libraries in /usr/lib, or use data files from /usr/share. If these rules fail udev will proceed with the next one, however later on applications will then not properly detect these udev devices or features of these devices. Here's a short, very in-comprehensive list of software we are aware of that currently are not able to provide the full set of functionality when /usr is split off and not pre-mounted at boot: udev-pci-db/udev-usb-db and all rules depending on this (using the PCI/USB database in /usr/share), PulseAudio, NetworkManager, ModemManager, udisks, libatasmart, usb_modeswitch, gnome-color-manager, usbmuxd, ALSA, D-Bus, CUPS, Plymouth, LVM, hplip, multipath, Argyll, VMWare, the locale logic of most programs and a lot of other stuff.

You don't believe us? Well, here's a command line that reveals a few obvious cases of udev rules that will silently fail to work if /usr is split off and not pre-mounted: egrep 'usb-db|pci-db|FROM_DATABASE|/usr' /*/udev/rules.d/* -- and you find a lot more if you actually look for it. On my fresh Fedora 15 install that's 23 obvious cases.
I would be interested on your feedback on the above
 
Old 06-19-2013, 06:22 AM   #10
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Original Poster
Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Just in case anyone is following this thread, the following are the resources I have found / linked in above, with a small description:

[1]Arch developer's mailing list on the initial discussion to investigate the change with some reasoning

[2]Arch developer wiki on how transformation to new format is to be done

[3]Fedora's coverage on the process and reasoning to be undertaken

[4]Freedesktop's coverage of the systemd error that a separate /usr is broken and suggested alternative

[5]Freedesktop's reasoning behind why the move could / would be beneficial and some coverage on myths / facts around the move
 
1 members found this post helpful.
Old 06-19-2013, 10:48 AM   #11
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,142

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
Thanks for the Fedora link. I hadn't noticed that the change was in Fedora: I suppose that means I'll be getting it in CentOS 7 next year.
 
Old 06-19-2013, 11:00 AM   #12
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Original Poster
Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
From what I can follow, I believe that Fedora may very well be a front runner for this exercise.
 
Old 06-27-2013, 07:06 PM   #13
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Original Poster
Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Not sure if any Fedora or Arch people have been looking at this, but if so, I would like to know if there is any documentation or detailed instructions on how to perform this type of move?

I ask as I also have a side development distro and was curious if I did an alternate fork to see what benefits this may have from a packaging point of view.
 
Old 06-27-2013, 09:26 PM   #14
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,
Quote:
Originally Posted by grail View Post
So are you saying that if /usr is on a separate partition then there would be no option to have it mounted in initramfs to have the major commands available?
I'm thinking of cases where /usr can't be mounted for some reason. So perhaps something fancy can be done with initramfs for example have a busybox shell so the the system isn't completely fubared, but surely implementing this would be a serious PITA result in reduced functionality. So the whole thing looks like a lot of work without significant gain. If people really do want to spend their time implementing this then good for them - I'll sit back and watch.

Cheers,

Evo2.
 
Old 06-28-2013, 12:43 AM   #15
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Original Poster
Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Thanks for the feedback

Well so far I see Arch (and any forks) plus Fedora (and I assume its forks too) have gone this way. On some the investigation I have done it does seem that initramfs is doing exactly what you have said
and providing a minimal environment should things go wrong (which funnily enough has just happened to a family member's computer after an upgrade which I am stuck now trying to solve ... so I guess i will
see what level of access it has).
 
  


Reply



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
Map the directory structure beginning with root Domskis Linux - Newbie 11 09-22-2011 03:33 PM
LXer: Linux for the self-employed LXer Syndicated Linux News 0 05-09-2008 12:50 PM
advice needed re self-employed IT support esteeven General 12 03-14-2008 07:54 AM
Using Webmin's directory structure as a Gobolinux-like root filesystem. Shingoshi Linux - General 7 02-22-2008 05:26 PM
suse employed former employee,s of this distro ronss Linux - Distributions 2 09-10-2003 04:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

All times are GMT -5. The time now is 04:50 AM.

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
Open Source Consulting | Domain Registration