LWN.net Logo

Distribution quote of the week

Distribution quote of the week

Posted Dec 8, 2011 10:35 UTC (Thu) by mpr22 (subscriber, #60784)
In reply to: Distribution quote of the week by pr1268
Parent article: Distribution quote of the week

I believe that this document on freedesktop.org helps to understand the motivation. I find this paragraph particularly intriguing:

One thing in advance: systemd itself is actually completely fine with /usr on a separate file system that is not pre-mounted at boot time. However, the common basic set of OS components of modern Linux machines is not, and has not been in quite some time. And it is unlikely that this is going to be fixed any time soon, or even ever.


(Log in to post comments)

I'm still confused...

Posted Dec 10, 2011 3:54 UTC (Sat) by pr1268 (subscriber, #24648) [Link]

I'm still confused... If Red Hat Fedora is moving everything over to /usr, then wouldn't that make the hideous breakage as reported on Freedesktop.org even worse? Or, is Fedora trying to "convince" distros to move everything to /usr/{bin,sbin,WHATEVER} to influence the systemd folks to fix the bug?

FWIW My Slackware 13.37 system currently has 134 files in /usr/bin symlinked to their corresponding equivalents in /bin (although there is a many-to-one relationship of some files, e.g. bunzip2, bzcat, and bzip2 all symlink to ../../bin/bzip2).

Moving binaries to /usr/bin

Posted Dec 10, 2011 4:19 UTC (Sat) by jrn (subscriber, #64214) [Link]

I suspect the idea is that if all binaries are in /usr/bin, one doesn't have to fuss about where the binaries are. :) And if /usr is mounted early enough, why not? (There are some other benefits, like /usr being easier to set up than / as a read-only filesystem.)

I don't know of any systemd bugs in this area, other than a strange altruistic propensity to warn in its log about /usr not being mounted early enough for the sake of other packages like udev.

I'm still confused...

Posted Dec 10, 2011 22:39 UTC (Sat) by james (subscriber, #1325) [Link]

At the moment, the situation is:
  1. initrd mounts /
  2. initrd switches to /
  3. userspace in / looks in /usr before /usr is mounted
  4. BUG!

Under this proposal:

  1. initrd mounts /
  2. initrd mounts /usr
  3. initrd switches to /
  4. userspace in / looks in /usr
  5. the bug is hidden; /usr was mounted before "real" userspace ever got started.

So this means that you can have a separate /usr if you're prepared to have an initrd, or you can use your own kernels without initrds if you put /usr on the same filesystem as /.

I'm still confused...

Posted Dec 11, 2011 5:27 UTC (Sun) by raven667 (subscriber, #5198) [Link]

And I think this bears repeating, the first case where /usr is on a separate partition and stuff breaks during boot if it's not mounted is the _current_ case, not the case being introduced by the proposed change. There has been some effort over the previous years to audit the boot process and move binaries from /usr to / to fis this when the issue is detected but this has been scattershot and incomplete.

The proposal to just move everything to /usr and make sure it is always mounted directly after / _fixes_ this problem once and for all. The fact that this also fixes another set of thorny cases is just gravy, the fact that this has been successfully done on other big UNIX systems is a great endorsement. This doesnt have anything to do with systemd trying to eat your baby, It just exposed more pre-existing cases that were broken in the current setup.

I'm still confused...

Posted Dec 11, 2011 17:54 UTC (Sun) by jrn (subscriber, #64214) [Link]

> This doesnt have anything to do with systemd trying to eat your baby, It just exposed more pre-existing cases that were broken in the current setup

Did systemd actually provoke any worse behavior? I had assumed it was just warning about this class of bugs for kicks.

I'm still confused...

Posted Dec 12, 2011 4:08 UTC (Mon) by raven667 (subscriber, #5198) [Link]

Systemd starts services as needed which probably created several service start orders that, while perfectly valid, hadnt been tested in practice and broke.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds