/bin And /sbin Now Dynamically Linked In FreeBSD 172
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."
Bad if not included with non-dyn executables (Score:2, Insightful)
Be aware that now with this syetm, you wont be able to mv the crunched static exec's to
Baaaad.
Re:Bad if not included with non-dyn executables (Score:3, Insightful)
etc.
Re:Bad if not included with non-dyn executables (Score:2)
But I don't understand this myself. /sbin means "static /bin" and it's that way for recovery purposes. Why make it
dynamic and add a new directory to be the new statically linked recovery directory? This seems on the surface to just push the original
problem back a step. Is the next new thing to be /srecover?
Re:Bad if not included with non-dyn executables (Score:5, Informative)
Re:Bad if not included with non-dyn executables (Score:1, Insightful)
Re:Bad if not included with non-dyn executables (Score:1)
Re:Bad if not included with non-dyn executables (Score:1, Interesting)
Re:Bad if not included with non-dyn executables (Score:2)
I believe RH packages sash and busybox. They don't have any problem, and once, long ago, after borking up ld.so (worse than just libc), I had to use 'em to recover.
How often do you have a libc upgrade fail, though, in this day of package managers and tested distributions?
Another poster asked what the point of this is -- its memory savings.
Re:Bad if not included with non-dyn executables (Score:3, Funny)
In FreeBSD, never. In Linuxland, everytime GNU bumps the minor version of glibc. To be fair, the upgrade works fine. It's just that everything else on the system breaks.
Cool (Score:5, Insightful)
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.
Re:Cool (Score:5, Informative)
Re:Cool (Score:2)
Re:Cool (Score:5, Informative)
Re:Cool (Score:1)
Re:Cool (Score:5, Informative)
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.
Re:Cool (Score:2)
Re:Cool (Score:1)
Sure, for the 1% of FreeBSD users that actually thought that at one time, this is great. But wouldn't it make more sence for those users to just recompile their specific binaries, instead of forcing nearly all sane FreeBSD users to recompile their ENTIRE
Re:Cool (Score:1)
Re:Cool (Score:5, Insightful)
Do I really want to set my default shell to
I want those users using PAM and whatnot to specify
This is sort of like an isp optomizing all connections for SNMP, because two users said it would be a good idea for what they do all day. And the isp tells all the other users, "well, we have an alternative dialup connection you can use, though its only at 9600, for better web browsing"
So sure, you can either 1) recompile FreeBSD, or 2) suffer the slings and arrows of
Or, FreeBSD could just NOT BE STUPID OUT OF THE BOX.
Speed (Score:3, Informative)
Re:Speed (Score:2)
The only hypothetical scenario where a system with all-dynamically linked apps would perform better than the former cases is one where lots of _different_ statically compiled apps run for a lo
Security advantage (Score:5, Insightful)
Re:Security advantage (Score:1)
Re:Security advantage (Score:3, Informative)
Doesn't work w/ 5.x, non-Intel (Score:1)
"FreeBSD update" doesn't work for those of us tracking 5.x-RELEASE, and it only provides binary updates for the IA32 (i386-family) port.
Re:Doesn't work w/ 5.x, non-Intel (Score:2)
In the near future (next week, maybe the week after) I'll start publishing updates for i386 5.x as well; non-i386 platforms... well, I haven't heard from anyone interested in using FreeBSD Update on those, so that will probably wait until FreeBSD Update becomes part of the base system (around 5.5-RELEASE, maybe?) and the Project takes on the task of buildi
Re:Doesn't work w/ 5.x, non-Intel (Score:1)
What does it take to create binary updates? I'd be more than willing to build binary updates for FreeBSD/alpha 5.1-RELEASE on a soon-to-be-mine AlphaServer 2100.
Re:Doesn't work w/ 5.x, non-Intel (Score:2)
When I get the code written -- which is probably going to be about a year from now -- that last requirement will be dropped, since it will be possible for several buildboxes to cross-verify and cross-sign. (This is the primary reason I'm keeping FreeBSD Update out of the base system for now.)
But feel free to downlo
Re:Security advantage (Score:2, Interesting)
Re:Security advantage (Score:2)
In my ever so humble opinion, what's in /bin and /sbin should be static, because it should be things required to boot, and those should have as few dependencies as possible. Everything a normal user should use should be in /usr, and that includes administrative tools and daemons.
There's no reason not to have dynamic versions of everything that's in /bin in /usr/bin, and restrict /bin only to root. If you can't mount /usr you probably can't go multiuser and other users can't log in anyway.
Purpose of / (Score:3, Interesting)
I thought *nix was designed as:
/ - minimum required to boot and repair system
If your system ever became damaged, you booted to / and fixed it. If / is too large, then audit what's in there and make sure it contains the bare minimum required.
Adding /rescue is unnecessarily cluttering up the system.
Re:Purpose of / (Score:5, Informative)
It still is.
While there may be stuff in
Amiga (Score:2)
If not, how does this differ?
Re:Amiga (Score:3, Informative)
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."
Re:Amiga (Score:1)
Re:Amiga (Score:2)
Well, I've always heard "Premature optimization is the root of all evil" attributed to Knuth, so it's not *that* anonymous !
Re:Amiga (Score:4, Informative)
Isn't /sbin for static binaries? (Score:3, Interesting)
Reasons being:
1) Size: Running in single-user mode or small kernels that don't use dynamically-linked libraries.
2) Security: No risk of library-path-based security exploits.
Am I missing something here? Why isn't
Kris
ummm... (Score:3, Interesting)
Since
Did you actually try it? (Score:4, Insightful)
It's pretty knee-jerk to scream about it if you don't actually know how it's been implemented.
J
Re:Ant this news is ... (Score:5, Insightful)
How the
The static nature of
Any FreeBSD admin who now doesn't understand the reasoning and potential problems of this new linking scheme will *definitely* need to learn it and understand it if they want to continue doing a good admin job in the future.
One good way to learn about this and use it is to read the comments from slashdot readers about this issue
Just because SCO/MICROSOFT/LINUX isn't in the article, doesn't mean its not important
Re:Ant this news is ... (Score:1)
Re:Ant this news is ... (Score:1)
It doesn't matter if 'dynamic linking' is old technology or not - the fact that this change has been made (and, it appears, generally accepted) is news.
Re:Ant this news is ... (Score:1)
It's always seemed to me like FreeBSD is the 'compromise for Performance' BSD version. They make no pretense of being widely cross-platform, and do things like this, which break basic 'rules' of the UNIX syst
Re:Ant this news is ... (Score:1)
To stop evolving is to die. They knew having a dynamically linked
Re:Ant this news is ... (Score:2)
Huh???
No, I would say that FreeBSD is the 'Stable over features'BSD version. The interface has not changed, your shell scripts, mounts, etc, etc will work just fine.
BTW, this was done for anything but performance. If anything, this will hurt performance of those binaries (but then again, how often do you really really use those binaries anyway???).
Re:Ant this news is ... (Score:1)
You're right. I never use
Re:Ant this news is ... (Score:1, Troll)
Very often you have to spend a lot of time to setup Linux correctly. And second thing is upgradability, which is a mess in a Linux world.
Re:Ant this news is ... (Score:2, Insightful)
Re:Ant this news is ... (Score:2)
Re:what a dumb idea (Score:2)
And yes, you do sound like a troll.
Re:what a dumb idea (Score:2)
I agree that patching will be easier, unless you patch a library bug that shows up in the new /recovery tools. I'm not so sure about making the overall disk space requirement smaller, if the /recover tools are even close to the full set of stuff
Re:what a dumb idea (Score:1)
If I were to say anything about 99% of users, it's that they'll never hose the system to the point where they'll need to care.
And incidentally, for those upgrading by CVSup from an earlier release, they'll be recompiling the system anyway.
Finally, would you mind justifying exactly why this is so bad, for us poor, unenlightened mass
Re:what a dumb idea (Score:1)
The FIRST thing that I do after installing from a release is to cvsup the latest sources.
This requires me to rebuild the world.
From my experience with freebsd, well over 75% of admins do this. And the other (less than) 25% probably don't even patch, so they won't care anyway.
SO, if you don't want it, put the option in right before you update.
Re:what a dumb idea (Score:2)
Why do you do it?
Just to have something new and shiny in your hands?
In case of production system one have to use RELEASE, as it was thorough tested. The need for upgrade arise i
Re:what a dumb idea (Score:1)
Anyway, as others have stated, in a production enviroment, its incredably stupid to run with the bleeding edge.
When you have several thousand customers accessing your servers, you can't exactly turn them off, recompile the OS, and reboot.
Sure, you could build extra redundant servers, grab new sources on off-peak hou
Re:The Editor war is over : Vim won! (Score:4, Funny)
M-x ispell-buffer
Re:Help me :) (Score:1, Insightful)
Just recompile all the system tools with dynamic linkage and you're done?
Anyway, my root partition is only 20 Mb, and that's including root's home(not that there is anything there now...). Do I really have to?
How do you get this into Linux? Why, do what they've been doing for years -- copy the BSD source, remove the copyright, and call it Linux [slashdot.org].
Re:This article is from 1998 (Score:2)