LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS a true Learning Experience or just Routine Steps ? (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-a-true-learning-experience-or-just-routine-steps-271730/)

rvijay 12-29-2004 08:35 PM

LFS a true Learning Experience or just Routine Steps ?
 
I wonder if LFS is a true learning experience. Reason being, take a look at this command

For the Installation Sysvinit-2.85

cp src/init.c{,.backup}
sed 's/Sending processes/& started by init/g' \
src/init.c.backup > src/init.c

This is almost impossible to understand for the small time user. I ahve to admit, if I were to do this install, I might just copy and execute this command mechanically ? How can one fully learn all such minute details ? Can one skip learning all these things and still have a good LFS experience ?

Thanks.

Vijay

freegianghu 12-29-2004 10:10 PM

Re: LFS a true Learning Experience or just Routine Steps ?
 
Quote:

How can one fully learn all such minute details?
Look inside package before installation, install package and try, ... and much more (the way author of LFS do, I think).
Quote:

Can one skip learning all these things and still have a good LFS experience ?
Noone, I guess.
Quote:

Thanks.
Not at all :)

Cerbere 12-30-2004 06:19 AM

What version of LFS are you working from? (I ask because LFS 6.0 has altered this step slightly)

However, in 5.1.1 and 5.0, just before it tells you to execute:
Code:

cp src/init.c{,.backup}
sed 's/Sending processes/& started by init/g' \
    src/init.c.backup > src/init.c

There is a paragraph which explains what this step does:
Quote:

When run-levels are changed (for example, when halting the system), init sends termination signals to those processes that init itself started and that shouldn't be running in the new run-level. While doing this, init outputs messages like “Sending processes the TERM signal” which seem to imply that it is sending these signals to all currently running processes. To avoid this misinterpretation, you can modify the source so that these messages read like “Sending processes started by init the TERM signal” instead:
(This is from 5.1.1, but there are similar explanations in both 5.0 and 6.0, as well)

From this explanation, it shouldn't be too difficult to figure out that the commands are editing the source code so that anything that reads, 'Sending processes the TERM signal' is changed to, 'Sending processes started by init the TERM signal'. And since at this stage in the install, you have already installed sed, you already know that:
Quote:

sed is used to filter and transform text files in a single pass.
Put this information together and you should realize that the sed command is looking for the string, 'Sending processes', and adding to this the string, ' started by init'.

And if you don't know what 'cp' does, than you really shouldn't even be attempting LFS until you've gotten a little more seasoning.

The point I'm trying to make is that you pretty much get out of LFS what you put into it. It requires a little effort and assumes a fundamental knowledge of the basic Linux commands. If you look between the little boxes with the instructions, and read the information you find there, then you've a chance to learn. But even then, you can read mechanically without processing the information. Yes, you can just copy and paste the commands and if you are careful enough, you can get a working system without learning a thing. However, to get the most out of the LFS experience, you must read and reflect on what you're doing in each step.

That being said, the LFS book is not a totally exhaustive, stand-alone teaching tool. If you are looking for more information about (for example) the sed command, you'll have to look elsewhere. The LFS book is not intended as a reference on the various Linux commands. There are countless other sources for that type of information, some of which are listed in the 'Prerequisites' section of LFS. Another reference which I highly recommend is the Rute User's Tutorial. You can find other supplemental information through Google, or through fora such as this one.

Enjoy!
--- Cerbere

rvijay 12-30-2004 06:57 AM

I have 5.1 Also downloaded 6.0
When seeing for the first time, all those commands look like someone who has had too much to drink and scratched them all over !!!

I am short of space on my PC. I was pushing my Linux partition to the limit. I have about 1.8Gigs and 71% is usedup.

I need to revise the basic Linux commands. Then read the LFS book more carefully. I need to seek assistance on anything unclear and make sure I understand it. Then down the road I can try LFS.

Your post was very helpful. Thanks for all the explanations and taking the time to type all that. I may also lurk here in this forum and try to learn something from the posts here.

Vijay

rvijay 12-30-2004 06:58 AM

Learning one or two LFS chapters a week, but learning it well is not a bad goal.

Vijay

foo_bar_foo 01-05-2005 12:04 AM

Re: LFS a true Learning Experience or just Routine Steps ?
 
Quote:

Originally posted by rvijay
I wonder if LFS is a true learning experience. Can one skip learning all these things and still have a good LFS experience ?

Thanks.

Vijay

this question can apply to everything one does in life.

example:
do you accept everything unquestioningly or do you ask questions and think for yourself?

MasterC 01-05-2005 04:31 AM

Can you clean that up a bit? I realize your point, but could it be a bit less... drastic.

Thanks!

XavierP 01-06-2005 01:42 AM

foo_bar_foo - I have edited your lines to make them less offensive to some of our members.

AlexV 01-07-2005 11:33 PM

Let's face it. A GNU/Linux system is probably one of the most complex pieces of software that any of us will ever have the privilege to tinker with. No, I don't think that a beginner is going to work through the LFS guide and instantly become a Linux Guru or understand exactly how every part of the system works, but that doesn't mean that it's just mindless Copy & Paste either. There's no way to learn all the ins and outs overnight, but I think LFS can be a great starting point.

Besides, it's a lot of fun! According to Linus that's why it all began anyway. Just For Fun. I think that's probably the single most important reason Linux has been a success. Let's try to keep it that way :)

Punkie 01-24-2005 01:16 PM

...Actually, the way I went about "learning with LFS" was this:

The book gives you a set of instructions that will help you install Linux using the sources for each package. Some of the instructions are (more or less) easy to understand, regardless of that, it is best to read up on them before executing them.

Take for instance one of the first commands you would have to do:
Code:

ln -s $LFS/tools /
I have seen a lot of people saying "I think that command is not right!" (hence the warning underneath that command), but if you read the ln's man/info page, you will see that is correct. At the same time, you can also pick up a bit more interesting things about said command.

Even if the command seems unlikely to be of any use to you (I started LFS practically as a beginner), it's still good to know what it does, so that in the future, if you ever need it or see it somewhere else, you will have an idea what it should do.

In adition to LFS book, it also helps to take a look at some of the Hints written by others (http://www.linuxfromscratch.org/hints/list.html). One in particular proved to be a very good starting point: http://www.linuxfromscratch.org/hint...prereading.txt

I will have to agree with the people who have started the project, that if they had explained every command listed in the book, it would have taken far more time and text than the scope of the book. Reading up on this is left at the reader's discretion.

Besides the learning process that can start with you reading up on the instructions used in the book, if you read carefully the book and don't just "copy & paste" instructions, you will learn a lot about where the files go, what files will be used to configure that package, how do you compile a compiler, etc. - which is the main reason I used LFS, even though I am a newbie.


All times are GMT -5. The time now is 02:55 PM.