*BSD News Article 95531


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!howland.erols.net!newsfeed.internetmci.com!news.kei.com!uhog.mit.edu!entertainment-tonight.ai.mit.edu!ai-lab!usenet
From: Joel Ray Holveck <joelh@gnu.ai.mit.edu>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: How to link /bin (and /sbin) dynamically?
Date: 16 May 1997 15:17:23 -0400
Organization: MIT Artificial Intelligence Lab
Lines: 37
Sender: joelh@ethanol.gnu.ai.mit.edu
Message-ID: <sejsozn4470.fsf@ethanol.gnu.ai.mit.edu>
References: <y7zyb9f26wi.fsf@hzsbc259.nl.lucent.com>
NNTP-Posting-Host: ethanol.gnu.ai.mit.edu
X-Newsreader: Gnus v5.3/Emacs 19.34
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:41057

Peter Mutsaers <plm@lucent.com> writes:

> Everything in /bin and /sbin is linked statically. Isn't this a waste
> of diskspace and also doesn't it slow down things a bit?
> OK, I know it is more reliable, but OTOH if I have a boot floppy and
> regular tape backups, I can always reinstall the system in case of a
> filesystem damage or in case of a stupid error (like rm /usr/lib/libc*)...

How are you supposed to restore from tape, without having the proper
libraries?  The point of /bin and /sbin is to be able to bootstrap the
mounting of /usr, and to allow you to restore /usr in the event of a
system crash.

> Even Solaris and SunOS have /bin and the most part of /sbin linked
> dynamically.

Of course, if SunOS does it, it *must* be right.

IIRC, Solaris symlinks /bin to /usr/bin, and has a /usr/bin that is
mounted over when /usr is mounted.  That means that under normal
operation, it will appear that /bin has the /usr/bin dynamically
linked files in it.

> Are there executables (such as /bin/sh) that really *need* to be
> statically linked?

Depends on your needs, and what all you need to mount /usr and to
recover your filesystem.  Most of /bin and /sbin is there for a
reason.

-- 
http://www.wp.com/piquan --- Joel Ray Holveck --- joelh@gnu.ai.mit.edu
All my opinions are my own, not the Free Software Foundation's.

Second law of programming:
Anything that can go wrong wi
sendmail: segmentation violation -- core dumped