/usr move

The /usr move is a concept of moving various applications installed into the filesystem root to prefix in order to unify the filesystem layout.

Current filesystem layout
Right now, the filesystem layout involves arbitrarily splitting the installed applications and libraries between and  prefixes. The FHS specifies that the prefix should be used by 'essential' executables and libraries.

This definition is quite blurry. In Gentoo, we usually interpret 'essential' as necessary for the system to boot and mount filesystems (esp. ). This also involves rescue from common problems like filesystem damage.

The current filesystem layout looks like the following:

/ ├── bin ├── boot ├── dev ├── etc ├── home ├── lib ├── lib32 ├── lib64 ├── media ├── mnt ├── opt ├── proc ├── root ├── run ├── sbin ├── sys ├── tmp ├── usr │   ├── bin │   ├── games │   ├── include │   ├── lib │   ├── lib32 │   ├── lib64 │   ├── libexec │   ├── local │   ├── portage │   ├── sbin │   ├── share │   ├── src │   └── └── var

You can notice two things:


 * 1)  contains both 'global' directories (, ...) and 'prefix' directories (, ...),
 * 2)  does not contain all 'prefix' directories  has (there is no  and no ).

New filesystem layout
The /usr move involves not using the prefix for installed packages and installing everything to  instead.

After the complete /usr move, the layout would look like the following:

/ ├── boot ├── dev ├── etc ├── home ├── media ├── mnt ├── opt ├── proc ├── root ├── run ├── sys ├── tmp ├── usr │   ├── bin │   ├── games │   ├── include │   ├── lib │   ├── lib32 │   ├── lib64 │   ├── libexec │   ├── local │   ├── portage │   ├── sbin │   ├── share │   ├── src │   └── └── var

Now 'prefix' directories start appearing in prefix and  contains just 'global' paths.

Intermediate layout
Sadly, as many applications and libraries expect various files to exist in a fixed locations, we would have to keep them available there. For that reason, the old 'prefix' directories will exist with a number of compatibility symlinks including:

/ ├── bin │   ├── sh │   └── (...) ├── lib │   └── ld-linux.so.2 └── lib64 └── ld-linux-x86-64.so.2

A common location for all shared data
Currently, the read-only shared data for various programs are split between subdirectories and. This means, that the rootfs usually contains both read-only and writable data which separating requires using a number of additional, small mountpoints.

The concept is that after the split, all shared, read-only data would be stored in, while other locations in rootfs will be used to perform their respective (mostly read/write) tasks.

Possible uses include:


 * 1) sharing the whole system over NFS. Right now this requires sharing, ,  and . After the move, only  would be necessary;
 * 2) mounting  read-only while keeping  read/write. Right now, this keeps the most important system executables and libraries writable. Of course, a preferable alternative is to mount whole  read-only but it usually involves moving some files from  to other locations (like  when using DHCP).

Avoiding excessive use of rootfs
The requirements for system boot are raising, and along with that, more files are moved onto rootfs to satisfy the dependencies. This slowly introduces the following problems:


 * 1) Increasing space consumption on rootfs. The more dependencies are moved there, the more space is consumed. At some point, users may be required to resize their rootfs in order to fit the new dependencies being introduced;
 * 2) Increasing number of statically linked executables. As an alternative to moving libraries into rootfs, some packages are using static linkage for their executables. Disadvantages of static linkage are not the topic of this article but their include inability to handle library upgrades through the package manager and thus make it harder to fix security issues;
 * 3) Necessity of introducing additional directories on rootfs or moving files elsewhere. Right now, rootfs does not specify any location for shared, read-only data  so those files are either placed in,  or.

Simplification of ebuilds
Right now, an ebuild wishing to install a library to rootfs needs to:


 * 1) Adjust the package install prefix from the default one  to ,
 * 2) If a package uses static libraries, manually move them from  to ,
 * 3) If a package uses static libraries, create shared library wrappers in  to avoid linker preferring the shared ones,
 * 4) If some non-core executables depend on libraries in, manually move them to.

The ebuild maintainer basically has to ensure that the program will work without mounted. This means that he needs to ensure that all the dependencies, possibly with all flag combinations, end up in rootfs.

Moving the application to simply makes the maintenance easier.

initramfs or other pre-mount (for system packages)
In order to perform the move on packages required to boot the system, it is necessary that all users having separate  partition have an enabled and working initramfs. Such an initramfs would need to mount the filesystem in order to execute the system init.

A possible alternative for an initramfs (which many people oppose just because they can) is creating a single, statically linked pre-init executable on rootfs and using it to mount before executing the actual init.

/usr remount in system RC
Considering that initramfs would mount read-only (alike  is mounted now), OpenRC or any other RC used in Gentoo would need to be able to perform fsck on mounted ... \n

Why You Should Always Trust Yourself
Trust yourself. You know more than you think you do. Benjamin SpockAs time passes by and the more work you will do on discovering and improving yourself, the more you will realize that the ancient Latin quotation: Ne te quaesiveris extra - Do not look outside of yourself for the truth, is true.

[Why You Should Always Trust Yourself]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

The Second Glance
Have you ever cringed at the sight of a human being who is physically disfigured? David Roche, who was born with a facial disfigurement, spent years trying to hide from himself. At middle age, he discovered his inner beauty, his spirit and his strength, and he has dedicated his life to helping all people find the inner beauty within themselves and in others.

[The Second Glance]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

The Power of Words and Emotional Bonding!
If you become steadfast in your abstentions of thoughts of harm directed toward others, all living creatures will cease to feel enmity in your presence. PatanjaliWords have power, incredible power, and this power lies in each and every one of us. Of course, its up to us to use this power for the greater good of all or not.

[The Power of Words and Emotional Bonding!]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

9 Reasons Why You Should No Longer Care About Peoples Approval
A truly strong person does not need the approval of others any more than a lion needs the approval of sheep. Vernon HowardApproval Seeking Behavior If you ask me, this is where many of our challenges start. When you are too concerned with what other people think of you, you start sabotaging your life, and you start moving forward but with the breaks on.

[9 Reasons Why You Should No Longer Care About Peoples Approval]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]

Rats Walking Again After Spinal Cord Injury
Scientists in Switzerland have restored full movement to rats paralyzed by spinal cord injuries in a study that spurs hope that the techniques may hold promise for someday treating people with similar injuries.

[Rats Walking Again After Spinal Cord Injury]

[GoodvilleNews.com - good, positive news, inspirational stories, articles]