LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Do we need all the packeges from the LFS book (https://www.linuxquestions.org/questions/linux-from-scratch-13/do-we-need-all-the-packeges-from-the-lfs-book-870662/)

markotitel 03-24-2011 03:12 AM

Do we need all the packeges from the LFS book
 
Hello,

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.

Im trying to make it as small as possibile.

First LFS is built now I want it smaller and smaller :)

Snark1994 03-24-2011 11:31 AM

Quote:

Originally Posted by markotitel (Post 4301419)
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

ButterflyMelissa 03-24-2011 11:42 AM

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?

Just my two cents... ;)

Thor

druuna 03-24-2011 11:53 AM

Hi,

To start with you can:

- 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

----- Documentation
/usr/share/man
/usr/man
/usr/share/tex{info,mf}
/usr/share/groff
/usr/share/{doc,info}

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.
Guess perl isn't needed after-all :)

Anyway, hope this helps.

markotitel 03-25-2011 06:36 AM

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.

markotitel 03-29-2011 05:48 AM

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?

druuna 03-29-2011 06:35 AM

Hi,
Quote:

Originally Posted by markotitel (Post 4307325)
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).

Hope this helps.

markotitel 03-29-2011 06:41 AM

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.

druuna 03-29-2011 06:53 AM

Hi,
Quote:

Originally Posted by markotitel (Post 4307368)
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.

markotitel 03-29-2011 07:41 AM

Thanx, problem is I dont know how not to install certain binaries or packages :)

druuna 03-29-2011 07:58 AM

Quote:

Originally Posted by markotitel (Post 4307421)
Thanx, problem is I dont know how not to install certain binaries or packages :)

???? Don't install it, obvious result: package is not installed......

But as mentioned in post #4: Install all as mentioned in the book and remove parts afterwards. This seems to be the safe method.

markotitel 03-30-2011 01:37 AM

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

druuna 03-30-2011 01:49 AM

Hi,
Minor adjustment:
Quote:

Originally Posted by markotitel (Post 4308182)
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 :)

k84834 09-29-2012 05:56 AM

Quote:

----- Documentation
/usr/share/man
/usr/man
/usr/share/tex{info,mf}
/usr/share/groff
/usr/share/{doc,info}
Hi
can I remove below documentation that you didn't mention above?
/usr/info
/usr/doc

druuna 09-29-2012 06:30 AM

Quote:

Originally Posted by k84834 (Post 4792377)
Hi
can I remove below documentation that you didn't mention above?
/usr/info
/usr/doc

Those are symbolic links to /usr/share/{info,doc}

There's no use for them if you remove /usr/share/{info,doc}


All times are GMT -5. The time now is 04:41 AM.