Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Nov 2000 11:09:58 -0800 (PST)
From:      Matt Dillon <dillon@earth.backplane.com>
To:        Peter Wemm <peter@netplex.com.au>
Cc:        Warner Losh <imp@village.org>, arch@FreeBSD.ORG
Subject:   Re: The shared /bin and /sbin bikeshed 
Message-ID:  <200011091909.eA9J9wM10639@earth.backplane.com>
References:   <200011091223.eA9CNQW26294@mobile.wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help

:Warner Losh wrote:
:> : I have a patch that makes /bin and /sbin optionally non-static.  For
:> : small systems that have / and /usr on the same file system, you can
:> : save about 5M-6M of disk space by making /bin and /sbin shared.
:> 
:> It looks like I understated the savings.  It saves 6.5M for our cut
:> down tree (which tries to grab as few of the /bin and /sbin binaries
:> as it can).  For the full tree it saves 12-13M (2.1M vs 14.4M).  My
:> cut down minimal system went from 14.7M to 8.2M.
:
:I have often wondered exactly what it would take to make a truely shareable
:/ without /usr mounted and actually work properly..
:
:As I see it:
:- /usr/libexec/ld-elf.so.1 would have to move to / somewhere.
:- The ldscripts would need /lib:/usr/lib instead of just /usr/lib for their
:paths
:- ld-elf.so.1 would have to know that /lib comes before /usr/lib, etc.
:- we'd need a selection of .so's in /lib so that /bin and /sbin could be
:useable.
:- The gcc specs would need a couple of tweaks.
:
:*then* nsswitch becomes useful so that /bin/ls can dlopen() the .so's for
:true plugin name resolvers etc.  And /bin/sh can do a 'cd ~user' for something
:like nisplus which will never fit inside libc.so.x.
:
:I've tinkered with this before and got it almost to the point of working but
:got distracted and worked on something else instead.  Moving libc, libm, and
:some others (eg: libcurses) to /lib ate back some of the originally saved
:space, but overall it was still *way* in front for disk space.
:
:Cheers,
:-Peter
:--
:Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
:"All of this is for nothing if we don't go to the stars" - JMS/B5

    I'd recommend against the linux /lib + /usr/lib model, it's a big
    mess.  I don't see much of a point in cutting the size of /bin and
    /sbin down, they are already fairly small (3.8M and 10M) and it
    isn't as though we need the disk space!  The static nature of
    /bin and /sbin have saved me more times then I can remember.  I also
    have unfond memories of blowing /lib up under linux and not being
    able to do anything.

					-Matt


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011091909.eA9J9wM10639>