[lfs-dev] LFS 7.3 ISO discussion

Bruce Dubbs bruce.dubbs at gmail.com
Thu Mar 21 14:59:52 PDT 2013

William Tracy wrote:
> 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.

Yes, I knew that.

> 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.

I could try that.  The space used right now is:

5.0M    /bin
20M     /boot
0       /dev
6.9M    /etc
8.0K    /home
40M     /jhalfs
64M     /lib
16K     /lost+found
12K     /media
4.0K    /mnt
4.0K    /opt
160K    /root
168K    /run
5.4M    /sbin
1.4G    /sources
4.0K    /srv
0       /sys
2.1M    /tmp
553M    /tools
447M    /usr
1.3M    /var

I can certainly delete /tools and /sources could be cut down to just a 
few K (scripts, md5sums, wget-list).  Some tools are not yet present 
(e.g. wget).  Actually only

Tue Mar 19 19:24:39 GMT 2013 /usr/src/bc/bc-1.06.95.tar.bz2
Tue Mar 19 19:24:48 GMT 2013 /usr/src/lsb-release/lsb-release-1.4.tar.gz
Tue Mar 19 19:28:15 GMT 2013 /usr/src/openssl/openssl-1.0.1e.tar.gz
Tue Mar 19 19:29:50 GMT 2013 /usr/src/openssh/openssh-6.1p1.tar.gz
Wed Mar 20 00:21:00 GMT 2013 /usr/src/gptdisk/gptfdisk-0.8.6.tar.gz
Wed Mar 20 22:30:58 GMT 2013 /usr/src/lspci/pciutils-3.1.10.tar.xz

but /usr/src/ is only 8M.

> If that's not enough, here's some quick ideas, from memory: Find and
> delete the static library files.

About 30M

Trim down the documentation under
> /usr/share/doc.

/usr/share is about 220M

Delete terminfo/termcap files that you don't need.
> Consider removing unnecessary packages (autotools comes to mind) and
> rebuilding others with -Os.

That's getting a little too picky.

> 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.

It would be hard at this point because usage is low.  Mostly gcc.  :)
Besides, Xorg is not installed.

The idea would be to get the compressed size down to iso size or less.

   -- Bruce

More information about the lfs-dev mailing list