|
|
Subscribe / Log in / New account

Further history of Unix of /usr

Further history of Unix of /usr

Posted Jan 12, 2016 13:02 UTC (Tue) by smcv (subscriber, #53363)
In reply to: Further history of Unix of /usr by giraffedata
Parent article: Preparing for a merged /usr in Debian

> How are all the directories under /usr related to each other in a way they aren't related to the other directories in the root?

/usr/*, /bin, /sbin, /lib* are static under normal system operation: they only change when you add, remove or upgrade software (with a possible exception for /usr/local, but that can easily be a mount point or symlink if desired). That's one of the reasons for considering them to be "more similar than they are different", which makes unifying them into /usr make sense.

The rest of the directories in the root (in particular /etc, /home, /var, /srv) are normally mutable: they change under normal circumstances (either normal system operation, or sysadmin reconfiguration).

/etc needs to be on the rootfs because it contains the machine-specific configuration to know what additional filesystems need mounting (/etc/fstab, /etc/systemd/system/*.mount). It should be separated from the static part of the system (/usr) because it's inherently machine-specific, and because changes in /etc need to be preserved across upgrades.

In embedded scenarios, it's very appealing to be able to carry out upgrades by running with /usr from partition A, unpacking a new /usr into partition B, rebooting with /usr from partition B, rebooting into A to roll back the upgrade if B fails, and exchanging the roles of the two partitions for the next upgrade. OSTree is similar, although it uses a variable number of btrfs subvolumes instead of a fixed number of partitions.


to post comments


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