/bin And /sbin Now Dynamically Linked In FreeBSD
Dan writes "Gordon Tetlow just committed a patch in FreeBSD current to change /bin and /sbin from statically to dynamically linked. The reason to do this is two-fold. This feature brings support for loadable PAM and NSS modules to base system utilities located in those directories. It also reduces the storage requirements for the root filesystem due to the use of shared libraries. This feature can be disabled in a buildworld by defining the Makefile (make.conf) variable WITHOUT_DYNAMICROOT. Note that statically-linked, crunched executables are available in the /rescue directory for use during system repair and recovery operations."
Programming can be fun again. Film at 11.
Indeed.. According to the schedule the tree is to be frozen today.
Rod Taylor
Because size is not the only reason for the dynamic /bin. One big reason was better support for dynamically loadable PAM/nsswitch modules in the base utilities - so there is a good reason to have multiple versions of some binaries, one that always works and one that can do more fancy stuff.
Programming can be fun again. Film at 11.
I'm still somewhat surprised that this got committed now, shouldn't 5.2 be released Really Soon Now? This looks like something that ought to be tested in -CURRENT for a good while.
/rescue, moving libraries to /lib and /libexec). It also had been extensively tested by many developers, and was already an optional switch when building world.
This is of course a very valid concern. It should be noted, however, that this was the last phase in the overall change. The 'heavy lifting' parts were done months ago (creating
In the end, we decided that a dynamic root filesystem was the future of 5.x, and that the 5.3 cycle was already overbooked with significant changes. We still have nearly a month before the release date of 5.2 to iron out any bugs. So after some final testing for a few days last week, I asked Gordon to Throw The Switch.
Cat, the other, tastier white meat.
If not, how does this differ?
The difference is that the Amiga is dead, while FreeBSD is alive, well and kicking. FreeBSD could have done this way back in 1.0, but there was no pressing need to. In the immortal words of some anonymous software designer: "don't prematurely optimize."
Don't blame me, I didn't vote for either of them!
/ - minimum required to boot and repair system
/rescue is for repairing the system. /bin and /sbin are a comfortable but minimal set needed for booting.
/bin and /sbin you might never use, all of it is used by someone or another at boot, single or rescue time.
It still is.
While there may be stuff in
Don't blame me, I didn't vote for either of them!
You don't understand the post. The point is not that FreeBSD is going boldly into the 80s with dynamic linking, it's that the default world now has binaries living in /bin and /sbin as dynamic instead of static. For a long time they were all static linked because of recovery issues. Now they are dynamically linked (with an option to be static if you're paranoid). They probably link against only stuff in /lib which will be on the root partition. Anything in /usr/lib would be dangerous if /usr was toasted - your shell would go bye bye.
This isn't really a big deal -- if you don't want to rebuild things yourself, you can just use FreeBSD Update.
Tarsnap: Online backups for the truly paranoid
Actually, no. Dynamically linked binaries are slower than statically linked ones.
(8-DCS)