Essential pre-reading for life with *LFS.
This hint is a list of good documents that you can get for free on the Internet, together with some advice from me and my friends. It will help you get 'educated' to a level where you can:
1. Successfully build on *LFS build http://www.cross-lfs.org http://www.linuxfromscratch.org 2. Ask sensible questions on the *LFS mailing lists and understand the replies. 3. Stay sane while doing all this.
Just the ability to switch on the computer and access the Internet, navigate to the LFS website and find the hint. The rest is our topic...
The *LFS book says:
"This book assumes that its reader has a good deal of knowledge about using and installing Linux software."
The book then suggests some further reading, including this document. But this is more than just an *LFS reading list, we expect you to do some exercises too.
Part 1. Social stuff. (Most important)
Many people ask questions badly on the *LFS mailing lists. Sometimes they get rude replies. To stay sane, I suggest you read the entertaining How To Ask Questions The Smart Way by Eric Steven Raymond. http://www.catb.org/~esr/faqs/smart-questions.html
Please note that all the *LFS mailing lists expect:
1. Plain text email. No HTML. 2. Bottom posting. Add your bit UNDERNEATH the bit you quoted. 3. Pruned quotes. Don't quote everything, just the significant bit. 4. No cross-posts. Just use the right list. 5. Thick skins. Don't respond to rudeness, just ignore it. 6. Zazen.http://en.wikipedia.org/wiki/Zazen (Just Sitting) If others have a flame-war, just sit and watch.
Before asking questions on *lfs lists, please search the archives, at least the recent months, and please read Errata Pages and FAQ. Read the latest copy online, not some old thing you downloaded last week.
If you ask a question that is in the FAQ, you are being extremely rude, not least to the maintainer who does that job out of the goodness of their heart. So you rightly WILL get flamed.
Special note: If someone tells you to RTFM, they are not, repeat NOT, being rude or getting at you. This is the accepted phrase indicating that you need to Read The Friendly Manual. If you have previously been told that a certain Old Low Dutch word is referred to by the 'F', please be assured that this is just a myth :-)
Part 2. Technical stuff
Many people attempt to build *LFS without sufficient understanding or experience with LINUX. Here is an excerpt from the tar manual:
"You should understand something about how Unix-type operating systems work, and you should know how to use some basic utilities. For example, you should know how to create, list, copy, rename, edit, and delete files and directories; how to change between directories; and how to figure out where you are in the filesystem. You should have some basic understanding of directory structure and how files are named according to which directory they are in. You should understand concepts such as standard output and standard input, what various definitions of the term "argument" mean, the differences between relative and absolute path names"
In the *LFS book, it says:
"We are going to build the *LFS system by using a previously installed Linux distribution such as Debian, Fedora, SuSE, Slackware, Mandriva, etc. We will use the existing Linux system as the development platform, because we need tools like a compiler, linker, text editor, and other development tools to build our system. Get a modern distro and play with it."
The Base Distro
Choosing a distro is only hard because of the choice, my advice is to choose a cheap one because once you have learned a bit and then built
- LFS you will junk it. I got mine free with a magazine. However it may
help to read The Linux Distribution HOWTO. http://tldp.org/HOWTO/CD-Distributions-EN-HOWTO/index.html
Learning to use UNIX
Unlike Windows, Unix requires you to understand what you are doing to get anything much out of it. Both Windows and Unix require deep understanding to get the best out of them. If you are coming from a Windows background or are new to computing in general then reading The UNIX and Internet Fundamentals HOWTO is very basic and will help. http://tldp.org/HOWTO/Unix-and-Internet-Fundamentals-HOWTO
Also, Linux Installation and Getting Started,http://tldp.org/LDP/gs/, yes, is very dated, but is still good and worth a read.
If you have read those, then you are aware that we drive Unix though a shell, which provides the command line interface. The shell we use in
- LFS, as in most of the Linux world, is bash (The Bourne Again Shell).
You need to be fluent in using bash, and The Advanced Bash Scripting Guide http://tldp.org/LDP/abs/html/ is a good tutorial. (Yes, I know it says 'Advanced', but read it anyway, do you want to be a newbie forever?)
Becoming an Apprentice Guru
Then there are three books that you ought to have available from or on your box for easy reference, skim read them now so you know how to use them:
The Linux User's Guide http://www.linuxhq.com/guides/LUG/guide.html
The Linux Systems Adminstrator's Guide http://tldp.org/LDP/sag/index.html
The Linux Network Administrator's Guide, Second Edition http://tldp.org/LDP/nag2/index.html
I recommend that you put bookmarks to these in your browser, so that you can get to them quickly. It will save lots of time later.
On Building from Source
Having got yourself a LINUX system, and played a bit, you now will know a little about the subject, but before moving on to the building of Linux from Scratch you should learn how to build packages from source code. This is an area where it's hard to find good references. The *LFS book suggests Building and Installing Software Packages http://tldp.org/HOWTO/Software-Building-HOWTO.html for Linux and Autoconf http://sources.redhat.com/autobook/autobook/autobook_toc.html , Automake, and Libtool is good too, if a little advanced.
It's very important that you have some experience installing a package from source on your distro before attempting *LFS.
One good choice would be GNU-Emacs. http://www.gnu.org/software/emacs/emacs.html
Here's what to do:
1. Check out it's homepage 2. Download a source distribution as a gzipped tar file 3. Unpack the source with tar and gunzip 4. Read the README file 5. Read the INSTALL file 6. Build it from scratch
In doing this you will not only learn how to obtain and build a package from scratch, you'll also prove that you have installed the right tools for your distribution.
If you want a real challenge, try MPlayer. http://www.mplayerhq.hu/ This package is a good test of your developing skills, as you will need to track down and install all it's dependencies first. (You could also cheat and look at the Community Beyond Linux From Scratch wiki http://cblfs.cross-lfs.org/index.php/Main_Page for a hint. )
IBM, once Big Bad Blue, is now a great supporter of OpenSource and Linux. They have some free tutorials on their developerWorks http://www-106.ibm.com/developerworks/linux/ website.
Like most Large Multi-nationals, IBM changes their site around regularly, so any link I give to the tutorials may not be valid any more. Follow links to Technical Library and Tutorials though, and you should find:
* Compiling and installing software from sources * Compiling the Linux kernel * Using regular expressions
But there are rich pickings here, even for the experienced.
One area where even seasoned UNIX veterans seem to have trouble is with setting up the bootstrap for the new *LFS system. Often these problems come from not reading the available documents.
Most people will be building for an X86 platform. In the early days of *LFS we used Lilo as our recommended BootLoader, but currently Grub is the preferred Bootloader. There is little to choose between the two, and they are not the only choices either. However, it is important to take time to familiarize yourself with the bootloader that you plan to use.
Check out the homepages for the bootloader (lilo's is not very impressive):
And the various HOWTO's, not all will be relevant for you:
The Lilo mini-HOWTO http://www.tldp.org/HOWTO/LILO.html
Boot + Root + Raid + Lilo : Software Raid mini-HOWTO http://www.tldp.org/HOWTO/Boot+Root+Raid+LILO.html
Linux+WindowsNT mini-HOWTO http://www.tldp.org/HOWTO/Linux+WinNT.html
Win95 + WinNT + Linux multiboot using LILO mini-HOWTO http://www.tldp.org/HOWTO/Multiboot-with-LILO.html
Linux+Win9x+Grub HOWTO http://www.tldp.org/HOWTO/Linux+Win9x+Grub-HOWTO/
Multiboot with GRUB Mini-HOWTO http://www.tldp.org/HOWTO/Multiboot-with-GRUB.html
If you are building for a non-X86 platform you will have to research your own bootloader, try a google for whatever bootstrap is used by your base distro, but these links may help:
PA-RISC/Linux Boot HOWTO http://www.tldp.org/HOWTO/PA-RISC-Linux-Boot-HOWTO/index.html
SRM Firmware Howto http://www.tldp.org/HOWTO/SRM-HOWTO/index.html
The Sparc Improved boot LOader http://silo.auxio.org/
But the most important thing you can do is to read the man and info pages for the bootloader. A print (on paper) of the error codes can be very helpful (as the online docs will not be available just when you need this info), and it is vital that you have an alternative means of booting your system before testing your new bootloader.
Part 3. Other stuff.
My starting point for any query or gap in my knowledge is google, yours should be too. Go to the Google http://www.google.com/ page, and hit the advanced search button. Learn the full capabilities of this essential tool, spend at least a whole day on this. Truely, you can't live without it.
There is a whole heap of documentation at the Linux Documentation Project http://tldp.org/, some of which I've quoted above. Learn to go there regularly and just poke about, it's a great storehouse of knowledge. Beware though a lot of it is out of date.
You might want to find some other software for your Linux box. The place to search is: Freshmeat http://freshmeat.net/
- LFS has it's own search system on the website. You can use it to find
answers to obscure questions that others have asked in the distant past, as well as 'where is' type inquiries. Look on the LFS website homepage.
And finally, whatever you read or don't read concerning LFS, before asking questions, start by reading the FAQ. FAQ stands for 'Frequently Asked Questions'. We don't want to answer them again, so don't ask them. Read The *LFS FAQ http://trac.cross-lfs.org/wiki/faq
Thank you Richard for allowing us to continue this useful document. You have spent many hours and have always provided top notch information to the CLFS development team. We consider you a friend. -- Jim Gifford --
We have received approval from the Author to post this into CLFS-Hints on 1/12/2009 at 11:13pm PST
Original Author Acknowledgement
© Richard A Downing FBCS 2003, 2004 Richard A Downing FBCS CITP <TheOldFellow at gmail dot com> DATE: 2004-12-28 LICENSE: Creative Commons - Attribution-NonCommercial-ShareAlike 2.0