LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 03-24-2011, 03:12 AM   #1
markotitel
Member
 
Registered: Feb 2009
Location: Titel - Serbia
Posts: 181

Rep: Reputation: 18
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
 
Old 03-24-2011, 11:31 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Quote:
Originally Posted by markotitel View Post
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
 
Old 03-24-2011, 11:42 AM   #3
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
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
 
Old 03-24-2011, 11:53 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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.
 
Old 03-25-2011, 06:36 AM   #5
markotitel
Member
 
Registered: Feb 2009
Location: Titel - Serbia
Posts: 181

Original Poster
Rep: Reputation: 18
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.
 
Old 03-29-2011, 05:48 AM   #6
markotitel
Member
 
Registered: Feb 2009
Location: Titel - Serbia
Posts: 181

Original Poster
Rep: Reputation: 18
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?
 
Old 03-29-2011, 06:35 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by markotitel View Post
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.
 
Old 03-29-2011, 06:41 AM   #8
markotitel
Member
 
Registered: Feb 2009
Location: Titel - Serbia
Posts: 181

Original Poster
Rep: Reputation: 18
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.
 
Old 03-29-2011, 06:53 AM   #9
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by markotitel View Post
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.
 
Old 03-29-2011, 07:41 AM   #10
markotitel
Member
 
Registered: Feb 2009
Location: Titel - Serbia
Posts: 181

Original Poster
Rep: Reputation: 18
Thanx, problem is I dont know how not to install certain binaries or packages
 
Old 03-29-2011, 07:58 AM   #11
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by markotitel View Post
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.
 
Old 03-30-2011, 01:37 AM   #12
markotitel
Member
 
Registered: Feb 2009
Location: Titel - Serbia
Posts: 181

Original Poster
Rep: Reputation: 18
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 .
 
Old 03-30-2011, 01:49 AM   #13
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Minor adjustment:
Quote:
Originally Posted by markotitel View Post
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
 
1 members found this post helpful.
Old 09-29-2012, 05:56 AM   #14
k84834
Member
 
Registered: Aug 2012
Posts: 142

Rep: Reputation: Disabled
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
 
Old 09-29-2012, 06:30 AM   #15
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by k84834 View Post
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}
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LFS newbie stuck in Linux API headers step 5.5 LFS book 6.3 Vxplus Linux From Scratch 2 11-10-2008 08:13 PM
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 12:31 AM
LFS 6.0 Book question. microsoft/linux Linux From Scratch 9 07-09-2005 05:35 PM
beyond lfs book not available??? or no such book?? tuxfood Linux From Scratch 2 04-17-2004 04:12 PM
LFS 3.2 book, but LFS packages 3.0 CragStar Linux From Scratch 2 04-07-2002 03:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 02:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration