[lfs-support] Reduce Size Of LFS Build

Thomas de Roo thomas at de-roo.org
Wed Apr 11 03:52:01 PDT 2012

On 04/11/12 12:26, Kshitij Jain wrote:
> On Tue, Apr 10, 2012 at 3:28 PM, DJ Lucas <dj at linuxfromscratch.org 
> <mailto:dj at linuxfromscratch.org>> wrote:
>     On 04/10/2012 02:10 AM, Kshitij Jain wrote:
>     > Hi....
>     > I am a student and working on building LFS as a project I have
>     already
>     > build the Linux but i want to reduce the size of the system to
>     minimum.
>     > Can u please suggest me ways to reduce the size of LFS.
>     >
>     Your question is a bit ambiguous. The solution really depends on the
>     goal of the system. Take an embedded system for example. You would
>     likely want to use uClibC as suggested by Firerat, but busybox is
>     certainly a matter of taste. It may actually be more responsible to
>     build the few utilities you need linked statically and forgo the
>     typical
>     environment completely. At an absolute minimum, you need only a kernel
>     and a statically linked binary to run as init (granted, it wouldn't be
>     very functional), but a kernel with no modules, a statically
>     linked ash
>     or dash, and a supported file system (with static device nodes) do
>     equate to a functional (read-only) system. In fact, we used to use
>     this
>     method many many moons ago for LFS itself. The first test reboot
>     of LFS
>     had only sysvinit and bash statically linked, and that could have
>     easily
>     been reduced to just bash if desired (either 'ln -s /bin/bash
>     /sbin/init' or init=/bin/bash in LILO). Yes, I had to review 1.0
>     (which
>     I never completed) to remember exactly how it was done.
>     http://archive.linuxfromscratch.org/lfs-museum/1.0/LFS-HOWTO-1.0-HTML/
>  Sir,
>          I've already prepared the lfs system and it is working perfectly.
> I just want reduce the size of the whole system (so that it is easy to 
> migrate) by deleting files and folders like /sources and /tools which 
> is not useful anymore.
> Suggest me some files that i can remove.It may include help files and 
> documentation files.
> Thank u
> Kshitij Jain.

If you don't care about having documentation of the installed software 
around on your LFS-system, you can remove it:
/usr/share/doc/* and /usr/share/man/*

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20120411/3282aa07/attachment.html>

More information about the lfs-support mailing list