Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Nov 2000 15:10:07 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Warner Losh <imp@village.org>
Cc:        Steve Price <sprice@hiwaay.net>, arch@FreeBSD.ORG
Subject:   Re: The shared /bin and /sbin bikeshed 
Message-ID:  <Pine.BSF.4.21.0011091453410.7588-100000@besplex.bde.org>
In-Reply-To: <200011090219.TAA35291@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 8 Nov 2000, Warner Losh wrote:

> In message <20001108201129.C62344@bonsai.knology.net> Steve Price writes:
> : On Wed, Nov 08, 2000 at 06:55:29PM -0700, 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.
> : 
> : This might be a bit off-topic but I wonder how much this would
> : help the PicoBSD distribution if it isn't done this way already?
> 
> None.  PicoBSD uses cruncgen to compile all its binaries into one
> super binary.  There are no shared libraries.

I once used it (not Warner's version) to put a useful number of gzipped
binaries on a 1.2MB floppy:

---
total 5
drwxr-xr-x  2 bin   bin     512 May 11  1996 bin/
drwxr-xr-x  2 root  bin    1536 May 11  1996 dev/
drwxr-xr-x  2 root  wheel   512 May 10  1996 etc/
drwxr-xr-x  2 bin   bin     512 May 10  1996 lib/
drwxr-xr-x  2 bin   bin     512 May 10  1996 sbin/
drwxrwxrwt  2 root  wheel   512 May 11  1996 tmp/
drwxr-xr-x  6 bde   wheel   512 May 10  1996 usr/
drwxr-xr-x  3 root  wheel   512 May 11  1996 var/

./bin:
total 218
-r-xr-xr-x  2 bin   bin        4208 Mar 27  1996 [*
-r-xr-xr-x  1 bin   bin        3288 Mar 27  1996 cat*
-r-xr-xr-x  1 bin   bin        2672 Feb 12  1996 chmod*
-r-xr-xr-x  1 bin   bin        5012 Mar  9  1996 cp*
-r-xr-xr-x  1 bin   bin        4333 Apr  6  1996 date*
-r-xr-xr-x  1 bin   bin        7194 Mar 27  1996 dd*
-r-xr-sr-x  1 bin   operator   4278 Feb 12  1996 df*
-r-xr-xr-x  1 bin   bin        1844 Feb 12  1996 domainname*
-r-xr-xr-x  1 bin   bin        1848 Feb 12  1996 echo*
-r-xr-xr-x  2 bin   bin       17744 Mar 27  1996 ed*
-r-xr-xr-x  1 bin   bin        5110 May  5  1996 expr*
-r-xr-xr-x  1 bin   bin        2028 Feb 12  1996 hostname*
-r-xr-xr-x  1 bin   bin        2434 Mar 27  1996 kill*
-r-xr-xr-x  1 bin   bin        2464 Feb 12  1996 ln*
-r-xr-xr-x  1 bin   bin        7230 Apr  5  1996 ls*
-r-xr-xr-x  2 bin   bin        2353 Feb 12  1996 md*
-r-xr-xr-x  2 bin   bin        2353 Feb 12  1996 mkdir*
-r-xr-xr-x  1 bin   bin        3663 Mar  2  1996 mv*
-r-xr-xr-x  1 bin   bin       34971 Feb 12  1996 pax*
-r-xr-xr-x  1 bin   bin        1881 Feb 12  1996 pwd*
-r-sr-xr-x  1 root  bin        7805 Mar 27  1996 rcp*
-r-xr-xr-x  2 bin   bin        1879 Feb 12  1996 rd*
-r-xr-xr-x  2 bin   bin       17744 Mar 27  1996 red*
-r-xr-xr-x  1 bin   bin        4820 Mar  8  1996 rm*
-r-xr-xr-x  1 bin   bin        3998 Mar 27  1996 rmail*
-r-xr-xr-x  2 bin   bin        1879 Feb 12  1996 rmdir*
-r-xr-xr-x  1 bin   bin       44971 May  9  1996 sh*
-r-xr-xr-x  1 bin   bin        1857 Feb 12  1996 sleep*
-r-xr-xr-x  1 bin   bin        7933 Feb 12  1996 stty*
-r-xr-xr-x  1 bin   bin        1623 Feb 12  1996 sync*
-r-xr-xr-x  2 bin   bin        4208 Mar 27  1996 test*

./dev:
total 30
-rw-r--r--  1 root  wheel        30379 May  4  1996 MAKEDEV
...

./etc:
total 17
-rw-r--r--  1 root  wheel  7117 Jan 16  1996 disktab
-rw-r--r--  1 bin   bin      25 May 11  1996 fstab
-rw-r--r--  1 root  wheel   785 Mar 23  1996 localtime
-rw-r--r--  1 bde   wheel  2301 Dec  7  1995 profile
-rw-r--r--  1 bde   bin    5853 Feb  1  1996 termcap

./lib:
total 566
lrwxrwxrwx  1 bin  bin      11 May 10  1996 libc.so.2.2@ -> libc.so.3.0
-r--r--r--  1 bin  bin  388291 May  9  1996 libc.so.3.0
lrwxrwxrwx  1 bin  bin      16 May 10  1996 libcrypt.so.2.0@ -> libscrypt.so.2.0
-r--r--r--  1 bin  bin   70195 Apr 20  1996 libedit.so.2.0
-r--r--r--  1 bin  bin   26376 Feb  5  1995 libgcc.so.261.0
-r--r--r--  1 bin  bin    8352 Apr 20  1996 libipx.so.2.0
-r--r--r--  1 bin  bin   17022 Apr 20  1996 libkvm.so.2.0
-r--r--r--  1 bin  bin   12489 Apr 20  1996 libscrypt.so.2.0
-r--r--r--  1 bin  bin   17059 Apr 20  1996 libscsi.so.2.0
-r--r--r--  1 bin  bin   16736 May  8  1996 libtermcap.so.2.1
-r--r--r--  1 bin  bin    8459 Apr 20  1996 libutil.so.2.1

./sbin:
total 176
-r-xr-xr-x  1 bin   bin   9835 May  5  1996 disklabel*
-r-xr-xr-x  1 bin   bin   6244 Feb 12  1996 fdisk*
-r-xr-xr-x  1 bin   bin  27879 May  5  1996 fsck*
-r-xr-xr-x  1 bin   bin   6242 May  9  1996 ifconfig*
-r-x------  1 bin   bin   7466 May  9  1996 init*
-r-xr-xr-x  1 bin   bin  61440 May  9  1996 ld.so*
-r-xr-xr-x  1 bin   bin   5019 Apr 21  1996 ldconfig*
-r-xr-xr-x  1 bin   bin   1908 Feb 12  1996 mknod*
-r-xr-xr-x  1 bin   bin   5994 Mar 15  1996 mount*
-r-xr-xr-x  1 bin   bin  15515 Feb 12  1996 newfs*
-r-sr-xr-x  1 root  bin   7482 May  5  1996 ping*
-r-xr-xr-x  1 bin   bin   2713 Feb 12  1996 reboot*
-r-xr-xr-x  1 bin   bin   7205 Apr  7  1996 scsi*
-r-xr-xr-x  1 bin   bin   2117 Feb 12  1996 swapon*
-r-xr-xr-x  1 bin   bin   4214 Feb 12  1996 umount*

./tmp:

./usr:
total 2
drwxr-xr-x  3 bde  wheel  512 May 10  1996 bde/
drwxr-xr-x  2 bin  bin    512 May 10  1996 bin/
drwxr-xr-x  2 bin  bin    512 May 10  1996 mdec/
drwxr-xr-x  2 bin  bin    512 May 11  1996 sbin/

./usr/bde:
total 1
drwxr-xr-x  2 bde  wheel  512 May 10  1996 bin/

./usr/bde/bin:
total 122
-rwxr-xr-x  1 bde  wheel   2238 Jan 10  1995 hd*
-rwxr-xr-x  1 bde  wheel  21756 Feb 23  1995 less*
-rwxr-xr-x  1 bde  wheel  13807 Jan 10  1995 rz*
-rwxr-xr-x  1 bde  wheel  16937 Jan 10  1995 sz*
-rwxr-xr-x  1 bde  wheel   1946 Jan 10  1995 tach*
-rwxr-xr-x  1 bde  wheel   2673 Jan 10  1995 term*
-rwxr-xr-x  1 bde  wheel  51176 Jul  1  1995 vi*
-rwxr-xr-x  1 bde  wheel   6434 Jan 10  1995 zap*

./usr/bin:
total 11
-r-xr-xr-x  1 bin  bin  3447 Feb 12  1996 cmp*
-r-xr-xr-x  1 bin  bin  2772 Feb 12  1996 du*
-r-xr-xr-x  1 bin  bin  4217 Feb 22  1996 mt*

./usr/mdec:
total 8
-r--r--r--  1 bin  bin   512 Mar  1  1996 boot1
-r--r--r--  1 bin  bin  6912 Apr 28  1996 boot2
lrwxrwxrwx  1 bin  bin     5 May 10  1996 bootfd@ -> boot2
lrwxrwxrwx  1 bin  bin     5 May 10  1996 bootod@ -> boot2
lrwxrwxrwx  1 bin  bin     5 May 10  1996 bootsd@ -> boot2
lrwxrwxrwx  1 bin  bin     5 May 10  1996 bootvn@ -> boot2
lrwxrwxrwx  1 bin  bin     5 May 10  1996 bootwd@ -> boot2
lrwxrwxrwx  1 bin  bin     5 May 10  1996 fdboot@ -> boot1
lrwxrwxrwx  1 bin  bin     5 May 10  1996 odboot@ -> boot1
lrwxrwxrwx  1 bin  bin     5 May 10  1996 sdboot@ -> boot1
lrwxrwxrwx  1 bin  bin     5 May 10  1996 vnboot@ -> boot1
lrwxrwxrwx  1 bin  bin     5 May 10  1996 wdboot@ -> boot1

./usr/sbin:
total 13
-r-xr-xr-x  1 bin  bin  6133 Feb 12  1996 bad144*
-r-xr-xr-x  2 bin  bin  3119 Feb 12  1996 chgrp*
-r-xr-xr-x  2 bin  bin  3119 Feb 12  1996 chown*

./var:
total 1
drwxrwxrwt  2 root  wheel  512 May 11  1996 tmp/

./var/tmp:
---

Linux was less bloated and could fit a much larger set of useful binaries.
Everything is more bloated now, and I gave up attempting to fit things on
floppies.

> I'm not using the PicoBSD model for two reasons.  One, we need the
> flexibility to update one file on the part in the field.  This isn't
> easy to do with the compressed image of the file system in place.

I avoided crunchgen for the same reason.  gzipped binaries weren't very
convenient either.

Bruce



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?Pine.BSF.4.21.0011091453410.7588-100000>