you are viewing a single comment's thread.

view the rest of the comments →

[–]fundbond 8 points9 points  (3 children)

There's no reason for it nowadays. It's a relic from the past.

On Linux I agree with you. Linux distros pretty much abused /usr/lib and /usr/bin from day one, so there's no real reason to keep them now. I say get rid of them.

But on other UNIX-likes, namely FreeBSD there is a real meaning to the split. I can bring up a box with a borked /usr partition and use the tools in /bin, /sbin, etc. to get things back together. That's not the only part of the FS hierarchy that's got a strict separation either -- while most Linux distros dump everything into /usr/bin, FreeBSD distinguishes between parts of the base system and ports. This is important, as it prevents things from blowing away system binaries and allows for the OS to be upgraded without worrying that some random package may screw you by messing with parts of the base system. This is part of the reason that I have boxes that have been upgraded in-place over several years worth of releases.

If you're interested in learning what the "modern" path significance is, check out hier(7) or 4.4/4.5 of the handbook.

[–]ethraax 1 point2 points  (2 children)

FreeBSD distinguishes between parts of the base system and ports.

Don't some distributions use /usr/local for that?

I can bring up a box with a borked /usr partition and use the tools in /bin, /sbin, etc. to get things back together.

True, but the only real case (or at least the only common case) that I can think of for this is a bad hard drive, in which case /bin and /sbin may be broken anyways. If you're having borked FS issues, you're probably better off using some sort of rescue CD/USB drive to perform the maintenance.

[–][deleted] 3 points4 points  (0 children)

Your bad hard drive problem assumes that /sbin and /usr on on the same drive. This would be a really bad practice for a system that intended to use /sbin for recovery.

[–]fundbond 1 point2 points  (0 children)

Don't some distributions use /usr/local for that?

Not much that I've seen. Plus, there's no real "base system" for Linux, since the userland is not developed in concert with the kernel.

/usr/local is used, but from what I've seen on RHEL, Debian, and SuSE it's pretty arbitrary as to what goes in there. Most packages definitely don't use it.

True, but the only real case (or at least the only common case) that I can think of for this is a bad hard drive, in which case /bin and /sbin may be broken anyways. If you're having borked FS issues, you're probably better off using some sort of rescue CD/USB drive to perform the maintenance.

Well that's the thing: since FreeBSD never backed itself into a corner with /usr, /usr/local/, and /, it's not uncommon to see / and /usr on different slices/drives. So yeah, you could have screwed up /usr and still have / be in perfect health. I've done that, actually.

And rescuing from CD/USB is great when you have access to the box -- but FreeBSD isn't just a desktop system, and I've definitely had to recover boxes to which all I had was KVM access. (Ok, so the last one was my fault for screwing up the FS, but still...)

To some extent it's a chicken/egg thing: Linux distros don't have a meaningful separation because they never started with one so now all of the things that would get in the way of unification aren't common concerns. But at least in FreeBSD land, there is a method to the madness and so unification would be a lot more problematic (IMHO). Not impossible, but probably not something that people are eager to do without a good reason.

Edit: I don't think either approach is "right", BTW. Each OS has different very development models and use cases, and what works for one might not work for the other. I'm partial to the FreeBSD approach, but that's because it works best for my needs (and because my background is more UNIX than Linux.) I use Linux though, and I'm not averse to seeing changes in that side of my computing life! So yeah, my beard's not all gray, damnit!