View previous topic :: View next topic |
Author |
Message |
0x0065 n00b
Joined: 08 Apr 2007 Posts: 49
|
Posted: Sun Aug 10, 2014 10:10 pm Post subject: What happened to the definition of /usr/ |
|
|
So go with me on this: the last time I read the Linux Filesystem Hierarchy Standard, a long long time ago now, the definition of what usr was for was very clear and elegant:
- everything that is needed to boot belongs in /bin /sbin /lib /etc and /boot
- everything that is NOT needed for boot and that does NOT need to be changed by users or services goes in /usr BECAUSE it is DESIGNED to be a seperate filesystem mounted read only. This is a security feature fundamental to the entire reason for /usr to exist in the first place
- everything that is not required for boot and that needs to be changed by users or servies goes in /var, this being short for variable. The is fundamental to the entire reason for being of /var.
so how did we end up with the bootloader and the system init both needing /usr on the root filesystem in order for the system to boot and a decent swag of services that need write access to stuff they've either decided to stow on /usr or that we've stowed there and then symlinked to /var...
In a world where the above is the case, why do we even bother with a /usr and a /var directory, as their entire reason for existing is gone?
Has someone had a go at building grub2 and systemd with autoconf variables building them to put their bits in /lib and /etc where they belong? I understand that such a solution is not supported. I am asking if anyone has had a go, and where they went wrong. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sun Aug 10, 2014 11:23 pm Post subject: |
|
|
These aren't the first instance of crappy software that does this sort of thing - HAL used /media/ instead of /mnt/, daemontools is hardcoded to use /service/ instead of a subdirectory in /var/lib/, Debian breaks if /tmp/ is mounted noexec, GNU uses /usr/share/info/ instead of /usr/share/man/... |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Mon Aug 11, 2014 12:25 am Post subject: |
|
|
I believe the rational went something like, "It is a real pain to port software and scripts since several *nixs and distros don't follow that standard. Lets move everything to /usr/ so it is follows the standard set by Solaris!"
No one ever said it had to be a good reason.
As for grub2, I see much more wrong with it than the way it builds. It is just too complex. Anything that is unnecessarily hard to use and overly complex falls into my definition of 'bad software.'
As for systemd, your just asking to start a new flamewar with that question.
However, in my opinion it is broken in far more ways than how it installs and builds. The entire structure is monolithic and overly complex. (Before anyone complains that it isn't monolithic, I'll ask this question. Can you run one component, say logind, without installing the rest of systemd? If the answer is no then by definition it is monolithic software.) More over, the design process is just terrible. A good design would have a stable API. As they say, "do one thing and do it well." _________________ 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 |
|
|
Cyker Veteran
Joined: 15 Jun 2006 Posts: 1746
|
Posted: Mon Aug 11, 2014 8:03 am Post subject: |
|
|
Don't have much to add other than I totally agree with what you said.
What's particularly annoying is that when people complain that their system is broken because something needed to boot is in /usr, they are told it is considered that the bug is in the filesystem layout and not the package/program that was putting its stuff in the wrong place to begin with!
Also, the initramfs is now a symptom of this - It is an in-kernel image of everything the system needs to boot - which, again, is was what / is supposed to be for - but now lots of people are pushing for initramfs to be the default and proper way of booting a Linux system so they don't have to fix the problems that their ignoring of old established standards have caused. This was never what initramfs was made for.
(Plus I can imagine if we go down this route that the initramfs will become so huge and bloated that yet another workaround hack will be required in the future!) |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6780
|
Posted: Mon Aug 11, 2014 9:07 am Post subject: |
|
|
I do not understand the complain with respect to grub2:
AFAIK, nothing which is installed by grub2 into /usr is necessary for booting, and IIRC grub2 does not write to /usr, either.
grub2 writes into /boot/grub (and into the beginning of the partition/disk, of course), and only these are the data necessary for booting.
Concerning grub2's "complexity": One should consider grub2 as two separate projects. One which has the functionality of legacy grub (highly improved, but not unnecessarily complex), and the other as a bulk of scripts required by binary distributions and written for DAUs to autogenerate grub.cfg. The latter is complex but can just be ignored. |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6182 Location: Dallas area
|
Posted: Mon Aug 11, 2014 10:48 am Post subject: |
|
|
Cyker wrote: | (Plus I can imagine if we go down this route that the initramfs will become so huge and bloated that yet another workaround hack will be required in the future!) |
Indeed I can envision a two stage (or more) initramfs bootup...just to get to original (quick) boot. _________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6182 Location: Dallas area
|
Posted: Mon Aug 11, 2014 10:49 am Post subject: |
|
|
The Doctor wrote: | As for systemd, your just asking to start a new flamewar with that question. |
Indeed! _________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
|
0x0065 n00b
Joined: 08 Apr 2007 Posts: 49
|
Posted: Mon Aug 11, 2014 11:36 am Post subject: |
|
|
If there is no problem then great, there is no problem... ...so what was with the README note in portage a little while ago? the one about "we no longer support /usr on a separate filesystem" "don't report it as a bug" |
|
Back to top |
|
|
mrsteven Veteran
Joined: 04 Jul 2003 Posts: 1939
|
Posted: Mon Aug 11, 2014 1:02 pm Post subject: |
|
|
The problem was that it was broken for some setups.
The fix was to break it on all setups to gain a certain level of consistency. |
|
Back to top |
|
|
0x0065 n00b
Joined: 08 Apr 2007 Posts: 49
|
Posted: Mon Aug 11, 2014 3:05 pm Post subject: |
|
|
mrsteven
... $PATH ... If it is SOOOO compatible to give up and stuff it all in usr, then what are the symlinks for? nope I don't care. Clearly you don't agree with them either. I'm going back to my original question.
Is there an easy way to customise the ./configure script paths in gentoo on a per package basis? I mean the ones like the below. where would I sensibly put that? /etc/portage/package.env ? has anyone tried? How did it go? I'd rather not touch maintaining custom ebuilds if at all possible
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/grub]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR] |
|
Back to top |
|
|
saellaven l33t
Joined: 23 Jul 2006 Posts: 655
|
Posted: Mon Aug 11, 2014 3:41 pm Post subject: |
|
|
It comes down to two words...
arrogance and ignorance.
You'll notice that most of the problem packages, and there are really only a handful of them, come from the same group of people that insist that they know better than everyone else in the entire history of *nix. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54651 Location: 56N 3W
|
Posted: Mon Aug 11, 2014 3:59 pm Post subject: |
|
|
The initrd is the new root. Its / that has vanished.
Its another layer of complexity we can do without.
mrsteven,
I'm afraid I gave up reading your link when I got to www/ Software/ systemd/. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
mackal Tux's lil' helper
Joined: 04 Aug 2011 Posts: 92
|
Posted: Mon Aug 11, 2014 5:09 pm Post subject: Re: What happened to the definition of /usr/ |
|
|
0x0065 wrote: | [*]everything that is NOT needed for boot and that does NOT need to be changed by users or services goes in /usr BECAUSE it is DESIGNED to be a seperate filesystem mounted read only. This is a security feature fundamental to the entire reason for /usr to exist in the first place |
/usr was originally designed as /home. / got full so they started putting some stuff in /usr. /usr got full so they made /home. |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Mon Aug 11, 2014 6:44 pm Post subject: |
|
|
I find quiet funny the complain comes from someone that want systemd.
It looks like the guy we had here that goes to police station to complain someone stole his marijuana. |
|
Back to top |
|
|
Cyker Veteran
Joined: 15 Jun 2006 Posts: 1746
|
Posted: Mon Aug 11, 2014 6:47 pm Post subject: |
|
|
Yeah, I remember reading that
They only started putting stuff in the /usr disk because they ran out of HDD space for /, otherwise to this day everything in /home would still be in /usr and all the crap we put in /usr would be in /
http://www.osnews.com/story/25556/Understanding_the_bin_sbin_usr_bin_usr_sbin_Split
The thing is, if we're going to just arbitrarily ignore the established filesystem hierarchy, I bloody well want to have something that actually makes sense rather than this stupid half-arsed stick-everything-into-usr business anyway.
I've always found the unix filesystem layout nonsensical, from the case-sensitive filenames to the completely bonkers directory structure (every program and its bits all smushed together with everything else with no way of being able to tell what belongs to what; How is that a good idea?!) that is the standard to this day!
But damnit if I have to adhere with this nonsensical layout then I expect everyone else to bloody well do so too! |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54651 Location: 56N 3W
|
Posted: Mon Aug 11, 2014 8:07 pm Post subject: |
|
|
Cyker,
Red Hat have adopted the embrace, extend, extinguish approach from Microsoft.
Oh, the wonderful thing about standards is that there are so many to choose from and you can always start a new one if you can't find one you like.
Thats all part of embrace, extend, extinguish ... _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1848
|
Posted: Tue Aug 12, 2014 3:57 pm Post subject: |
|
|
NeddySeagoon wrote: | mrsteven,
I'm afraid I gave up reading your link when I got to www/ Software/ systemd/. |
Oh no....that means you missed the obligatory "debunking of the list of myths" that seems to accompany everything those folks do. I maen ffs...if you spend half your time doing that, maybe you're the myth .
Tom |
|
Back to top |
|
|
RazielFMX l33t
Joined: 23 Apr 2005 Posts: 835 Location: NY, USA
|
Posted: Wed Aug 13, 2014 2:21 pm Post subject: |
|
|
No one has mentioned /opt... which is designed for add on software packages. Not to be confused with /usr/local, which is designed for software built by the administrator that may or may not conflict with things in /opt and /usr... |
|
Back to top |
|
|
0x0065 n00b
Joined: 08 Apr 2007 Posts: 49
|
Posted: Thu Aug 14, 2014 7:55 am Post subject: |
|
|
So we seem to have pretty much covered the problem and its causes. Could we take a second to move on and discuss a practical general solution, ideally without fixating on any particular culprit...
Is there an easy way to customise the ./configure script paths in gentoo on a per package basis?
Where would I sensibly put that? /etc/portage/package.env ?
Has anyone tried? How did it go? |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sat Aug 16, 2014 4:14 pm Post subject: |
|
|
Practical general solution? That's easy: don't use garbage software designed around vendor lock-in, as people have been warning against for decades. Contrary to the propaganda flooding every channel, there are choices besides systemd et al. |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1848
|
Posted: Sat Aug 16, 2014 7:07 pm Post subject: |
|
|
Ant P. wrote: | Practical general solution? That's easy: don't use garbage software designed around vendor lock-in, as people have been warning against for decades. Contrary to the propaganda flooding every channel, there are choices besides systemd et al. | Amen to that. There absolutely are choices out there, and anyone who doesn't want to end up in a world where the only distros left are those made by Redhat needs to make those choices rather than just rolling over and saying "cool...it boots a quicker". For me this recent post pretty much sums it up:
https://lkml.org/lkml/2014/8/12/459
Tom |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54651 Location: 56N 3W
|
Posted: Sat Aug 16, 2014 8:34 pm Post subject: |
|
|
tld,
Thank you for that link. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
depontius Advocate
Joined: 05 May 2004 Posts: 3523
|
Posted: Sat Aug 16, 2014 8:40 pm Post subject: |
|
|
I saw that the other day while reading LKML, and figured there was really noplace here where I could post it, since the last thread shutdown. I did send it by pm to AnonEMoose, though. _________________ .sigs waste space and bandwidth |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54651 Location: 56N 3W
|
Posted: Sat Aug 16, 2014 10:36 pm Post subject: |
|
|
depontius,
Its just a rerun of the demise of the proprietary workstation vendors mentioned in the passing.
I can remember Apollo, so I've seen it all before. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
tld Veteran
Joined: 09 Dec 2003 Posts: 1848
|
Posted: Sun Aug 17, 2014 2:39 pm Post subject: |
|
|
NeddySeagoon wrote: | tld,
Thank you for that link. | You're welcome. Yea, more so than about anything I've read, that just about perfectly sums up how I feel about the whole mess and those behind it. |
|
Back to top |
|
|
|