Unix's /usr split and standards (and practice)

February 14, 2020

In Rob Landley about the /usr split, Rob Landley doesn't have very good things to say about how the split between /bin and /usr/bin (and various other directories) has continued to exist, especially in various standards. One of my views on this is that the split continuing to exist was always inevitable, regardless of why the split existed and what reasons people might have for preserving it (such as diskless workstations benefiting from it).

As far as standards go, Unix standards have pretty much always been mostly documentation standards, codifying existing practice with relatively little invention of new things. The people trying to create Unix standards are not in a position to mandate that existing Unixes change their practices and setup, and existing Unixes have demonstrated that they will just ignore attempts to do so. Writing a Unix filesystem hierarchy standard that tried to do away with /bin and mandated that /usr was on the root filesystem would have been a great way to it to fail.

(POSIX attempted to mandate some changes in the 1990s, and Unix vendors promptly exiled commands implementing those changes off to obscure subdirectories in /usr. Part of this is because being backward compatible is the path of least resistance and fewest complaints from customers.)

For actual Unixes in practice, conforming to the historical weight of existing other Unixes (including their own past releases) has always been the easiest way. There are countless people and scripts and so on that expect to find some things in /bin and some things in /usr/bin and so on, and the less you disrupt all of that the easier your life is. Inventing new filesystem layouts and pushing for them takes work; any Unix has a finite amount of work it can do and must carefully budget where that work goes. Reforming the filesystem layout is rarely a good use of limited time and work, partly because the returns on it are so low (and people will argue with you, which is its own time sink).

(Totally reinventing Unix from the ground up has been tried, by the people arguably in the best position possible to do it, and the results did not take the world by storm. Plan 9 from Bell Labs still has its fans and some of its ideas have leaked out to mainstream Unix, but that's about it.)

The modern irony about the whole issue is that recent versions of Linux distributions are increasingly requiring /usr to be on the root filesystem and merging /bin, /lib, and so on into the /usr versions, but this has been accomplished by the 800 pound gorilla of systemd, which many people are not happy about in general. The monkey's paw hopes you're happy with sort of achieving the end of this split.

(A clean end to the split would be to remove one or the other of /bin and /usr/bin, and similarly for the other duplicated directories.)

Comments on this page:

By Ben Hutchings at 2020-02-19 22:42:01:

[…] recent versions of Linux distributions are increasingly requiring /usr to be on the root filesystem […]

I changed the Debian installer so that its multi-partition recipes don't include a separate /usr. But we still support a separate /usr, only requiring that it is mounted by an initramfs before the "real" init system starts.

I thought other distributions had taken a similar approach. And one of the motivations for making /bin etc. be symlinks into /usr was to allow for deployments where everything outside /usr is dynamically created. That effectively requires /usr to be separate from the root filesystem.

By cks at 2020-02-19 23:40:04:

I had the impression that systemd now didn't support systems with a split / and /usr, but if Debian supports that clearly I'm wrong.

For others that might be reading and are interested in a historical artifact that might shed some light on how systemd ended up addressing this, this could be a good read: http://0pointer.net/blog/revisiting-how-we-put-together-linux-systems.html

Written on 14 February 2020.
« The /bin versus /usr split and diskless workstations
With sudo, complex argument validation is best in cover scripts »

Page tools: View Source, View Normal, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Fri Feb 14 23:33:35 2020
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.