Aw, man, I built a "shrink LFS" script at one point but I think I
don't have it any more.

The big thing to know is that deleting files will not decrease the
size of a Qemu image file. To get rid of the cruft created by building
an LFS system, you might have to create a new Qemu disk image and "cp
-r" the files over.

If that's not enough, here's some quick ideas, from memory: Find and
delete the static library files. Trim down the documentation under
/usr/share/doc. Delete terminfo/termcap files that you don't need.
Consider removing unnecessary packages (autotools comes to mind) and
rebuilding others with -Os.

If you actually get serious about deleting unnecessary files, Gnome
has a tool called "baobab" (or "Disk Usage Analyzer" under the menu)
that makes pretty graphs that show you which parts of a directory tree
are chewing up the most space.

William Tracy
afishion...@gmail.com
(408) 685-4819


On Wed, Mar 20, 2013 at 9:58 PM, Bruce Dubbs <bruce.du...@gmail.com> wrote:
> Bruce Dubbs wrote:
>
>> I'm not sure about specific drivers, but I did get it working.  I did
>> 'make defconfig' and that seems to have done it.   I've looked at the
>> difference between configs for the one that sets up hda and the one that
>> uses sda, but nothing jumps out at me.
>
>> I'm going to play around with it and try to minimize .config.  That's
>> the nice thing about qemu.  You can reboot quickly without changing
>> other things.  I'll post anything I find out.
>
> I'm getting there.  I've got a fairly well minimized kernel that works.
>
> -rw-r--r-- 1 root root 4.5M Mar 19 21:21 vmlinuz-3.8.3-lfs-SVN-20130316
> -rw-r--r-- 1 root root 5.1M Mar 21 00:46 vmlinuz-test
> -rw-r--r-- 1 root root 3.1M Mar 21 02:22 vmlinuz-test2
>
> What's really encouraging is the boot time in qemu.
>
> The kernel finishes at 1.383953 seconds and the boot scripts take 2
> seconds.  The network up line from the kernel is the last dmesg entry at
> 5.072569 seconds.
>
> The configuration is really minimal.  I eliminated ipv6, netfilter, as
> many drivers as I thought were unneeded, multiprocessor support, raid,
> etc.  I even reduced the number of loop devices.  If I could only reduce
> the number of ttys, /dev would be quite compact.  Searching the net, it
> seems that would require a change to a header in the kernel.
>
> I was thinking about distributing a qemu .img file, but that doesn't
> seem realistic.  The file is now 5.6G (1.5G compressed, but it took
> almost an hour to do the compression).  Adding things like Xorg would
> just make it bigger.
>
>    -- Bruce
>
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-dev
> FAQ: http://www.linuxfromscratch.org/faq/
> Unsubscribe: See the above information page
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to