Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Tip: read everything. Take your time - don't be afraid to try things out. If this is an assigned project, team up with someone also working on it. http://www.linuxfromscratch.org/lfs/
The time it takes depends on your previous experience with linux and with programming. If you have none of either, it can be very confusing, and you should start your project with a regular linux to get used to it (a few days to a week) before attempting LFS.
The basic system can take hours in experienced hands. Expect to take days or weeks (sometimes it takes months to discover the one thing that was under your nose the whole time...)
You are not alone. The LFS forum and the project pages have a great deal to support a newcomer. Learn to search them for information. Read examples so you know how to ask questions which are likely to be answered. As you learn, start helping others... try finding answers to other peoples questions, you'll learn much faster that way and get a reputation in the bargain.
Oh - and don't do it on a computer that you want to use for anything else.
I have a background in programming and have been using Linux and unix for a few years before I came accross LFS. During my first build, I found it completely unchallenging to copy and paste the commands as they all worked fine...until I forgot to do a make install after doing a make...for the package make! Just go slow. I went too fast and that's what screws you up if you miss steps.
Use a LiveCD for the build and you can be 99% sure it will go just as the book says, if you follow the instructions exactly and don't mess up. The other 1% having to do with weird hardware.
My first build took a couple of days. I had X-windows and firefox installed as well as a lot of the blfs tools. I'm now working on HLFS and it took me a week to get past chapter 5. I did try the Development version of LFS and it seems to go through chapter 5 just fine, however, for your first build, stick with stable LFS.
I've built LFS three times and I'll echo what the others said. Take your time and read everything well. In fact, and especially on Beyond Linux From Scratch, read the entire page before you start with the first command. They will sometimes list the meanings of options at the bottom of the page that were not mentioned earlier.
My host system is fedora 4.. is that fine?
the country i'm living in is a bit late in open source tech that's why it's kinda hard to find up to date open source softwares here.
Fedora 4 was the latest that i could find..
Someone please assure me that my build will be successful as long as i exactly follow the LFS book..
As long as you follow the book and read closely you should have no problems. just be aware that on some occasions the book has examples that are locale specific so it is very important to read thoroughly. I have built LFS several times 5.1 was the most successful build i had. It usually takes 2 to 5 days for me to build a LFS system. The mistakes I usually make are forgetting to do a command so basically paying attention!
I suggest using their LiveCD as a host system to build from instead of Fedora.
There are a couple benefits of doing it that way - they not only provide a stable and tested build structure to start from, but also provide the exact versions of the packages and patches that you need in order to have a successful build.
Mistakes I've made:
- Too new versions of packages that they ask for. Some of the packages that they want are very depenant on the versions of other packages. Since it's your first time building, I would suggest sticking strictly to what they ask for.
- Not paying attention/skipping steps. It gets a tad repetitive with all the configures/make/make test/make installs... don't let it get to you.
If you're new to linux's world, I'd suggest you to play a bit with the command line before trying to build a lfs system. lfs is not *hard* by itself but it would be helpfull to be a little confortable with the shell.
Knowing the basic commands and ability to read shell's scripts should be a prerequisite IMHO.
You don't have to be a shell scripter to build lfs, but it'll be usefull to understand how bootscripts works; to understand what is done right after the boot.
Another thing to know is the fact that lfs doesn't provide a package managing solution. Once you've installed all the stuff, there's no easy way to go back without such a tool.
I won't tell you to use *this* or *that* but I guess you'll need something quite simple. Slackware's like distro generaly provide some quite simple but *doing the job* shell scripts. They are easy to adapt to lfs.
There's other points to take care about before switching to lfs:
The whole system lay on the triplet binutils - gcc - glibc.
Choose a combination known to be stable and not too old.
When the need will come to upgrade one of these, you'll need to build the whole system from scratch. Be aware of it.
And last but not least, you should build your own kernel and test it on a working system to be sure some errors doesn't come from a bad configured one. Such errors are very underhand and a *bad* kernel can make you going mad in searching solutions to problems which are not where you could imaging they are.
I have built LFS three times. The first time the host system was Libranet 3.0. It went well but I found it easier to use the LiveCD version during the subsequent builds. The first time took over a week. The builds with the LiveCD both took approximately 2-3 days.
LiveCD version 6.2-5 is pending according to LWN.net. I intend to try another build once it is officially announced.
I also recommend using LiveCD as host system ... Just download the iso file and burn it (Nero will do it fine if you're not familiar with burning CDs with Linux), then boot on the CD ...
I took about 2-3 days to build the base system (completing the whole LFS book), and an additional 5 days to have a graphical Gnome running fine with Firefox and all ...
Something realy handy when building LFS is to have GPM and lynx properly installed (to read the book during install and perform copy/paste in console mode)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.