LinuxQuestions.org
Review your favorite Linux distribution.
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 05-13-2008, 11:58 AM   #1
vadkutya
Member
 
Registered: Apr 2008
Distribution: slackware 10.2
Posts: 117

Rep: Reputation: 17
LFS book: Is there a more detailed explanation (like: --verbose)


hey all,

i was wondering if there might be a more detailed explanation on how to built linux from scratch? you might think that lfs is pretty clear. it is. havn't had any problems so far...so why more detailed? i started lfs--as many others i assume--to learn more about linux, about how things work and to have a tailormade os. i am aware that writing a book on how to build an lfs system is no easy task but i found myself copy-pasting the commands stated in the book without really understanding why this has to be done. example (chap 5.6 glibc-2.5.1):
Code:
../glibc-2.5.1/configure --prefix=/tools \
    --disable-profile --enable-add-ons \
    --enable-kernel=2.6.0 --with-binutils=/tools/bin \
    --without-gd --with-headers=/tools/include \
    --without-selinux
if i had to repeat it out of memory i would surely skip the option "--disable-profile" as well as "--without-gd". why? because i don't know what it does. now you say there's an explanation right beneath the command itself with every option explained...let's see
Quote:
--disable-profile
This builds the libraries without profiling information. Omit this option if profiling on the temporary tools is necessary.
a good explanation however is:
Quote:
--without-gd
This prevents the build of the memusagestat program, which insists on linking against the host's libraries (libgd, libpng, libz, etc.).
ok, so i should use --disbale-profile if i want to build the libraries without profiling...??? see what i mean? what the hell does profiling in this context mean? i am not an expert but i'm not stupid either. i do have basic understanding of linux/unix but surely woundn't have used this option if i had to do it myself.

my point is: even if i succeed in building a lfs will i be any smarter in the end or is it just a careful reading/copy-paste task? besides, are these options important and to what extend? would i end up with a broken system at the end? when would i realize it? etc.

btw: i found this a common problem. it's not just with the lfs book. even if one follows the rtfm approach. i am currently stuck in chapter 5.6 because my host system has an 2.4 kernel. couldn't finish compilation of glibc. so i set out to compile one. i hate to do this because of the thousands of configuration possibilities. even worse is that the "help" is almost always of no help. mostly it goes like this:
Quote:
blah
this will turn on/off blah. say m here if you want to compile it as module...
i know how to turn this on and off even how to compile it as module what i don NOT know and what is important to me is WHAT is it and WHAT does it and HOW do find out if i need it? well read the documentation...so i did in some cases and wasn't a little bit more enlighted.

don't get me wrong. i know i have to work it out somehow. reading more books about the basics. still i would know if anyone knows of a bit more tutoring version of the lfs book.

vadkutya

p.s.: the guys of LFS and the kernel developers still did a great job! it is not my intention to minimize their efforts. it's just imo it's not a good thing to use the term you are trying to explain in the explanation itself...
 
Old 05-13-2008, 12:25 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
I don't know of anyone that has made a "--verbose" version of any of the LFS books. But, then LFS isn't intended for the beginner. One would be expected to be able to use Google to research the options they didn't understand.
 
Old 05-13-2008, 12:42 PM   #3
vadkutya
Member
 
Registered: Apr 2008
Distribution: slackware 10.2
Posts: 117

Original Poster
Rep: Reputation: 17
i don't think you got the point. if lfs is a copy/paste thing than everybody can do it without gaining any knowledge. but what's the point of it then?

besides, what's the purpose of a forum if one could be expected to use google? if all is clear by just googling there woudn't be any need for the whole forum?

vadkutya

Last edited by vadkutya; 05-13-2008 at 12:44 PM.
 
Old 05-13-2008, 01:30 PM   #4
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
No, I got the point. You don't think the explanation of the configure options in the LFS book is detailed enough for the options you don't understand. If you don't understand the --disable-profile option from the descriptoin in the book, use Google to find out what software profiling is. Then you'll understand why the --disable-profile option is passed when building the temporary system.

Someone could copy/paste the commands in the LFS books and end up with a working system. If you want to learn, then it is incumbent upon you to research those things that you don't understand. The purpose of the forums, mailing lists, and IRC is not the first stop when you have a problem/question. They should be utilized after you have spent some time searching for the answer yourself and can't find the answer or are seeking clarification of what you've learned.
 
Old 05-13-2008, 01:31 PM   #5
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
In my point of view it's fairly impossible to write a book that explains everything. First you would have to have the basic lfs book; then you would need to extend it by explaining several terms used, like what "profiling" means. That explanation alone probably holds more information that is not known to you, so the book writer would still have to take more details into it, to explain in further detail what the things are that were talked about when explaining "profiling". And again and again..so to make the book readable (and short enough so you don't spend two years just flapping trough it) a line needs to be drawn somewhere. And yes, you can find out about things yourself.

The book helps you, you must understand that - or if it doesn't, you're pretty good already (and wouldn't probably ask..) It's hard to build a Linux operating system from source code packages if you have nothing, so the process is explained. And it's not just commands (though automated lfs, alfs, does just that - copy-paste commands) - there are explanations, though they're brief, probably to save space and your nerves so you actually bother to read them (if there was three pages of explanations per one command, you probably would not read, and even less remember them). So you have something to begin with, and if you don't get it (I doubt if anybody gets everything all the time), you can search for more information. Talking about "profiling" is not the aim of LFS, getting the system installed is - what components you need, how you build them, in what order and so on.

I understand what you're after, because I too would have loved to learn more by just reading the book. It's just that the writer doesn't need to do everything for you

The book doesn't either cover how the packages you build were invented, what the inner logics of them are, why they were written exactly in C or C++ and so on. It doesn't teach you programming which would be good to know to further customize the system; it doesn't teach you about package managers either, because they're outside of the scope of the book.

This forum is a little different thing - or maybe it's better to say "the scope is bigger". It's just not about installing something, but about an operating system in general, and about specific things in it. And other operating systems. And general. And most of the information here can be found elsewhere too by doing a web search (Google search if you like), but there's one difference too - that other information might not be there tomorrow, the link could change, or the search hit could sink in the list so you didn't find it the same way you found it yesterday. On a forum like this the answers stay, at least for now, and you know where they are. And you can't have conversations with people over Google search, not very effectively at least
 
Old 05-13-2008, 01:47 PM   #6
vadkutya
Member
 
Registered: Apr 2008
Distribution: slackware 10.2
Posts: 117

Original Poster
Rep: Reputation: 17
@weibullguy
Quote:
If you want to learn, then it is incumbent upon you to research those things that you don't understand
mostly right. but read LFS book ii. Audience
Quote:
The purpose of the forums, mailing lists, and IRC is not the first stop when you have a problem/question. They should be utilized after you have spent some time searching for the answer yourself and can't find the answer or are seeking clarification of what you've learned.
seeking clarification of what you learned? you either learned it or didn't. if you learned it you understand it. everything else is copy/paste. i read your 5th link, especially the "before you ask" section. you know:
1. Try to find an answer by searching the archives of the forum you plan to post to.
2. Try to find an answer by searching the Web.
3. Try to find an answer by reading the manual.
4. Try to find an answer by reading a FAQ.
5. Try to find an answer by inspection or experimentation.
6. Try to find an answer by asking a skilled friend.
7. If you're a programmer, try to find an answer by reading the source code.

there's only one question for me which remains to be asked. is p = np? please, i did a lot of research but couldn't find any answer...halp! tell me one question which could not be answered regarding linux after following these steps. besides, ever took a look in the forum?

@b0uncer
as i wrote before. i understand that it's impossible to cover all matters but selfreferencial explanations are as good as none.

about the forum: i am really getting tired of it. if the question you are going to ask is more trivial than p = np? you get flamed. if it's not this forum can't/won't provide any answers. well, this is my first forum so sry for misbehaving by asking stupid questions. i'll figure it out myself. thx for your help

vadkutya

Last edited by vadkutya; 05-13-2008 at 03:11 PM.
 
Old 05-13-2008, 02:14 PM   #7
vadkutya
Member
 
Registered: Apr 2008
Distribution: slackware 10.2
Posts: 117

Original Poster
Rep: Reputation: 17
just a little add on:
been googling for glibc profiling information. i'm sorry i didn't skip through all the 1.160.000 entries as i probably should before asking another question but what i found with at least a bit of information regarding the --disbale-profiling option are:

http://linux.maruhn.com/sec/glibc-profile.html
http://www.gnu.org/software/libtool/...compiling.html

the first states the following:
Quote:
When programs are being profiled used gprof, they must use these libraries instrad of the standard C libraries for gprof to be able to profile them correctly. (from rpm description)
ok, what are "these libraries"? still WHAT does the term "profiling" mean. as i understand it now: if programs are being profiled--by gprof?--they must use "these libraries" instead of the standard C libraries in order to be profiled by gprof. does this explanation strike odd anybody else? gprof(1) returns as descripition "gprof - - Displays pc-sampling or hiprof call graph profile data". still ???

maybe gnu.org provides better explanation? let's see...
Quote:
--disable-profile'
Don't build libraries with profiling information. You may want to use this option if you don't plan to do profiling.
oh well really? so if i don't want to build libraries with profiling information i should '--disable-profiling'? i KNOW that. still, WHAT is profiling? am i stupid? what do i miss in these explanations?

vadkutya

Last edited by vadkutya; 05-13-2008 at 02:17 PM.
 
Old 05-13-2008, 02:44 PM   #8
vadkutya
Member
 
Registered: Apr 2008
Distribution: slackware 10.2
Posts: 117

Original Poster
Rep: Reputation: 17
2nd amendment:

ok, did a little research. profiling is a way of analyzing performance of software. good. i understand that gprof is a software profiling tool which--in order to do it's job--has to alter the source. that's why we probably don't want profiling while building glibc. although, as far as i understand it the additional code would not change the programs behaviour.

still, why is it vital to turn off profiling? shouldn't this be a feature that should be turned off by default sicne most people wont compile glibc to measure it's performance rather than just provide library routines? besides, it wouldn't do any damage if we profiled it, would it?

even still, why not:
--disable-profiling
(software) profiling means adding code bits to the source code of a given program in order to analyze it's performance. since we don't want to analyze it's performance just want it to work we do not profile it.

this is what i mean when i talk of useful information. it's a bit different from "what?! you do not know what profiling is you noob. then get the f*ck lost and RTFM && STFW" which is not useful as well even if it might boast the self esteem of some people in need of it.
regards, vadkutya

Last edited by vadkutya; 05-13-2008 at 02:48 PM.
 
Old 05-13-2008, 04:20 PM   #9
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
I'll just reiterate what b0uncer already eloquently pointed out. The LFS books are intended to provide instructions for building a base operating system from source. They are not intended to provide you a PhD (or any other degree) in Computer Science. What I find interesting is that you figured out what you needed to figure out to understand the --disable-profile switch. And, you did it all by yourself with a little help from Google and proven the point that a little research on your part is usually all that is needed.
 
Old 05-13-2008, 06:18 PM   #10
vadkutya
Member
 
Registered: Apr 2008
Distribution: slackware 10.2
Posts: 117

Original Poster
Rep: Reputation: 17
Quote:
They are not intended to provide you a PhD (or any other degree) in Computer Science
i am not a computer scientist (if i were i'd be poor one ) and the PhD i am trying to earn is from the far side of computer science . however, my original point was why such an information isn't provided with the LFS book. if the only point of lfs is to provide me with an os by doing tons of copy/paste actions as both of you seem to suggest then i could take--as i have done--an already precompiled distribution. after reading the introduction of the lfs book it seemed to me that one of their major goals was to give some backgrounds on what is in a distro, where and why. isn't it one purpose to be able to compile a linux from scratch all on my own one day? am i supposed to memorize everything (that would be ridiculous, woudn't it)? why not give basic++ understanding of the things (en passant; in the way i demonstrated it with the --disable-profiling switch) simply be dereferecing the selfreferences? this way one can memorize the steps needed to build a lfs. that's why i was asking about a --verbose version. where's the learning experience (see LFS book ii. audience) in it if it does not explain the why and why nots, if it only relies on copy/paste? if the learning experience is intended to come from my own research where's the point in compiling linux from scratch? i could do the research without it. lfs does not help much with it. one must hope to blunder into problems to learn something from it...and for non computer scientists it is sometimes harder than it must be just because of selfreferencial explanations.

Quote:
...and proven the point that a little research on your part is usually all that is needed
so what is this forum for again? also, many people would give it up not because they are lazy but simply because they do not have the time to research every little thing to follow the book's steps with some understanding. why do we read newspapers? because we do not have the time to investigate everything for ourself. we are--in one way or the other--dependend on those guys who did it. but enough of it i don't think we will find an agreement...

if anybody reading this knows of a --verbose version i'd be most greatful

thx, vadkutya

Last edited by vadkutya; 05-13-2008 at 06:54 PM.
 
Old 05-15-2008, 11:32 AM   #11
drut
LQ Newbie
 
Registered: Mar 2007
Posts: 21

Rep: Reputation: 15
I read this thread and found it quite interesting - there are differences in opinion but do I agree with some of the views from both sides...

I am getting near the end of lfs 6.3 (chapter 8) and will probably have a look at BLFS, but do feel a lot of the stuff I've typed has been "over my head", but then again - I have never built a system from scratch before so it has been a learning experience (it's took me more than a month so far - I have other priorities), and looking back at some of things I thought were difficult seem so simple now, I can't see where the problem was! I think maybe there's so much to know - and not enough time to learn it.


I used to have a copy of 'LFS 6.3 - The Verbose Edition' but it took 'forever' to read so I deleted it, whoops

Last edited by drut; 05-15-2008 at 11:38 AM. Reason: neatness
 
Old 05-16-2008, 04:53 AM   #12
Vitalie Ciubotaru
Member
 
Registered: Dec 2005
Location: Osaka, Japan
Distribution: Ubuntu Trinity
Posts: 153

Rep: Reputation: 30
Answers to all questions?

Well, whatever we make by ourselves in this life, we still don't know how it works. The guy who spent a lot of time assembling motorcycles most probably has no idea about the chemical composition of the fuel his bikes use. Someone very successful in gardening does not know much about the cell structure of his/her plants. Most of people who successfully compiled a LFS system do not actually care about internal connections between the compiler, linker, assembler, debugger and other fierce beasts.
I am happily running a BLFS-6.1 I compiled quite a while ago, but I still do not claim I can tell the difference between the four creatures I mentioned above. I just don't need to. I know how to install a package not listed in the BOOK. If I don't, I know where to search for answers.
Now, when I think I could just have used an automated version of LFS (e.g. nALFS) to build a core system, I realize that I would not have accumulated this experience. So, it looks like it's a merit of the LFS project.

Vitalie Ciubotaru
 
Old 05-17-2008, 02:36 PM   #13
vadkutya
Member
 
Registered: Apr 2008
Distribution: slackware 10.2
Posts: 117

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by drut View Post
I used to have a copy of 'LFS 6.3 - The Verbose Edition' but it took 'forever' to read so I deleted it, whoops
so there is a verbose version. unfortunately i couldn't found anything in google searching for "LFS 6.3 - The Verbose Edition". do you know from where you obtained a copy and if it was an official version?

thx, vadkutya
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 01:31 AM
is there book which explains LFS? hongxing Linux From Scratch 4 10-13-2005 12:47 PM
LFS 6.0 Book question. microsoft/linux Linux From Scratch 9 07-09-2005 06:35 PM
beyond lfs book not available??? or no such book?? tuxfood Linux From Scratch 2 04-17-2004 05:12 PM
LFS 3.2 book, but LFS packages 3.0 CragStar Linux From Scratch 2 04-07-2002 04:15 PM

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

All times are GMT -5. The time now is 07:16 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration