Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

freebsd-small Digest, Vol 201, Issue 2

0 views
Skip to first unread message

freebsd-sm...@freebsd.org

unread,
Jun 10, 2008, 8:00:20 AM6/10/08
to freebs...@freebsd.org
Send freebsd-small mailing list submissions to
freebs...@freebsd.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.freebsd.org/mailman/listinfo/freebsd-small
or, via email, send a message with subject or body 'help' to
freebsd-sm...@freebsd.org

You can reach the person managing the list at
freebsd-s...@freebsd.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of freebsd-small digest..."


Today's Topics:

1. Re: Trimming down FreeBSD (Eugene Grosbein)


----------------------------------------------------------------------

Message: 1
Date: Mon, 9 Jun 2008 23:03:48 +0800
From: Eugene Grosbein <eu...@kuzbass.ru>
Subject: Re: Trimming down FreeBSD
To: Rajkumar S <rajk...@gmail.com>
Cc: freebs...@freebsd.org
Message-ID: <2008060915...@svzserv.kemerovo.su>
Content-Type: text/plain; charset=us-ascii

On Mon, Jun 09, 2008 at 04:32:08PM +0530, Rajkumar S wrote:

> I am testing with NanoBSD with configuration appended at end of this
> mail. Currently the image is about 68M. When I checked there are about
> 11M in /usr/include, and another 11M in /usr/share/. in that 2.5M
> /usr/share/groff_font, 1.5M /usr/share/examples etc could be
> trimmed. Which options needs to be given to remove these directories
> from the build? Does't NO_TOOLCHAIN take care of /usr/include ?

Just make another custom script or function that removes
what you do not need. I use following commands to trim both
base system and files installed with packages by scripts called earlier.
Thus, NanoBSD plus 12 installed packages occupied 48Mb only.

cd "$NANO_WORLDDIR"

rm -rf usr/include/* usr/lib/*.a \
usr/share/examples/* \
usr/share/misc/pcvtfonts/* usr/share/syscons/fonts/* \
usr/share/syscons/keymaps/* usr/share/info/* \
usr/local/etc/joe/doc/* usr/local/etc/joe/*.dist \
usr/local/include/* usr/local/info/* usr/local/lib/*.a \
usr/local/man/* \
usr/local/share/aclocal/* usr/local/share/doc/* \
usr/local/share/examples/* usr/local/share/info/* \
usr/local/share/mc/syntax/* usr/local/share/mc/mc.hlp.*

# prevent Midnight Commander (installed via package) from complaining
touch usr/local/share/mc/syntax/Syntax

# Remove all locale data except of Russian that I use
find usr/local/share/locale -maxdepth 1 | fgrep -v ru | xargs rm -rf

# replace binary /usr/sbin/nologin with small shell script
# that runs under 'sh -p' and says 'This account is currently not available'
ln -f -s /usr/local/nologin usr/sbin/nologin

# remove largest binaries I never use
cd usr/bin
rm -f openssl vi ex view nvi nex nview make makeinfo info vacation
cd ../sbin
rm -f iasl acpidb hostapd amd wpa_supplicant
# EOF

Eugene Grosbein


------------------------------

End of freebsd-small Digest, Vol 201, Issue 2
*********************************************

0 new messages