User: Password:
Subscribe / Log in / New account

The case for the /usr merge

The case for the /usr merge

Posted Jan 30, 2012 23:03 UTC (Mon) by ondrej (subscriber, #27872)
In reply to: The case for the /usr merge by rickmoen
Parent article: The case for the /usr merge

> 'Binaries in /bin are often not even statically linked, or at least depend on libs inside /usr/lib.'

JFTR On my Debian stable system:
$ ls -1 /bin | wc -l
$ ls -1 /bin | xargs -i ldd {} | grep /usr
/bin/ping6 => /usr/lib/ (0x00007f88fc791000) => /usr/lib/ (0x00007f88fc014000)

$ ls -1 /sbin| wc -l
$ ls -1 /sbin | xargs -i sh -c 'echo {}; ldd {}' | grep /usr -B10
fsck.cramfs => /usr/lib/ (0x00007f48dc0a2000)
mkfs.cramfs => /usr/lib/ (0x00007f478f0cb000)
mkfs.ntfs => /usr/lib/ (0x00007f4208125000)
mount.ntfs-fuse => /usr/lib/ (0x00007f02a6a86000) => /usr/lib/ (0x00007f02a6851000)
nfnl_osf => /usr/lib/ (0x00007f1af01b8000)
umount.udisks => /usr/lib/ (0x00007fc7b1575000) => /usr/lib/ (0x00007fc7b1111000) => /usr/lib/ (0x00007fc7b068f000)

Not that bad, isn't it?

(Log in to post comments)

The case for the /usr merge

Posted Feb 2, 2012 13:01 UTC (Thu) by Comet (subscriber, #11646) [Link]

FreeBSD and using *(.) in zsh to avoid the compatibility symlinks I've added for a couple of shells, not needed for booting:

% ls -1 /bin/*(.) | wc -l
% ls -1 /bin/*(.) | gxargs -i ldd {} | grep /usr

Use *(-.) to include the symlinks and there's output.

Myself, I use a separate / from /usr and /var because while / may need to be mounted read-write, it needs far fewer writes than the other areas. This means that in the event of a system crash it is less likely that there was I/O pending to / and increases the odds of my booting without having to sort out recovery options, just being able to repair and move on.

That applies no matter which OS. It has helped when some neighbours in a building with bad wiring were able to trip our fuses and rebooted my Linux box often enough before I bought a UPS. That helped me get up enough connectivity in those pre-bootable-USB-recoverydisk days to be able to make a CD backup of the stuff I could recover from a corrupted ReiserFS before reinstalling with ext3. Without a second CD drive or the money for a second computer, that would have been notably more awkward.

Some habits save your butt often enough that it is going to take a *lot* to convince folks like me that the latest shiny shiny is worth surrendering a practice which has proven its worth repeatedly.

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