Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How can I determine if I need a particular program, from chapter 6 of the book?
For example I dont want MAN PAGES to be installed, also I dont need every localization file just english.
I dont need perl and so on.
From your later comments, surely this is just a matter of deciding which of the packages would actually be of any use to you? Only thing to check is that you're not removing anything that the other packages might depend on
I'd strip it down bit by bit, make note what "left the building" and rebuild. But the question is not "how to make it smaller?" (there are more than enough distros like that) but "what do you need for what task?", in a micro controller you do not need a gui, on a desktop you do, on a dedicated "black box" on the LAN (router, media server) you need certain this and not certain that...
Your challenge is quite interesting in that you want a "lean distro" - but to what end?
- Not install the /usr/share/doc/xyz parts of packages,
- Remove the debugging symbols from binaries and libraries (stripping).
I don't think the man-pages (and Man-DB) are needed. I'm not so sure about perl though, something tells me you need it, although I cannot tell you exactly why. The book mentions a minimal set of locale files needed for testing.
I just remembered I have some (old!) info lying around about a minimal LFS install (or rather: removing stuff after a normal build). Don't remember where I got the info from, but this is what I have:
Quote:
You can remove the following, depending on what you want to do:
---- TimeZone and Locales (if you only need english)
- (copy the one needed timezone to /etc instead of ln -s)
/usr/share/{zoneinfo,locale}
/usr/lib/locale
/usr/share/i18n
----- Compiling tools (if you will not be building any packages from source)
/usr/share/{automake*,aclocal*,autoconf,libtool}
/usr/bin/{make,automake*,aclocal*,autoconf,autom4te,autoheader}
/usr/bin/{autoreconf,autoscan,autoupdate,ifnamesi,libtool*}
/{,usr/}lib/*.la
/usr/lib/{crt*.o,?crt1.o,gcc-lib}
/lib/cpp
/usr/bin/{c++*,g++,cc,gcov,gcc*,cpp,i?86-pc-linux-{g++,c++,gcc*}}
/usr/include
/usr/lib/*.a
Those are the major ones, but there are hundreds of other files that
can be removed, especially in /{,usr/}{s}bin - use the man pages to
decide if you need it or not for your finished system. And if you
don't need Perl, thats another 35Mb or so that you can "save". Note of
caution - some of the bootscripts use commands in /bin, so
double-check them before you remove commands you don't need - the boot
scripts may need them too.
Thank you for help, Im just trying to better understand how linux works at least a little bit better.
I want to figure out how TinyCore folks managed to make it so tiny .
All is about that, but I need tinycore linux that i can install on hard disk, not to run form ram.
So tiny core backup scripts and some other things are way out LFS.
I built several LFS by the book just to practice a little .
Now I want to make little system just with minimal graphic environment and XMMS player, thats why I asked do we need all the packages .
I guess all this can be done under 10 megs. Or do I need to be advanced linux programmer to do this task?
This is a slightly (??) different question then the original one.
Xmms is not part of LFS and all the above answers were tailored to a minimal LFS install.
If you want xmms you also need GTK+-1.2.10, which in turn needs GLib-1.2.10, and X Window System which need ......
I would recommend looking at the BLFS book, the xmms chapter and see what all the required dependencies (and their dependencies) are. I am sure that 10 Mb will not be possible with all that xmms needs. 10 Mb won't even be possible with only a minimal LFS install (which would be about 30 Mb if I remember correctly).
Yes question is a little off, now Im building another LFS but at the begining I want before compiling glibc, to find out do I need all binaries from glibc or can compile just few of them that I will need (maybe ) Like tinycore for example.
Yes question is a little off, now Im building another LFS but at the begining I want before compiling glibc, to find out do I need all binaries from glibc or can compile just few of them that I will need (maybe ) Like tinycore for example.
Are you talking about the glibc locales? If so: To do all the test you need a minimal set (mentioned in the book). And as stated in post #4: you can remove what isn't needed after you finish the build.
BTW: I've heard about tinycore, but never installed/used it.
Ok so after MAKE INSTALL, and after all is finished, like after I can boot into the system, then I can just RM binaries that I dont need? Im on it .
And you can also remove the docs and possibly the building tools (as mentioned in post #4), the impact will probably be small, but every byte helps if you want your LFS lean and mean
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.