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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
...of course "working" is a matter of interpretation. I've been away from linux for a while but now I'm planning on building a linux pvr and I'm trying to decide on a distro. Building my own linux from scratch seems like it might be a fun (!?) way to go. I started this thread to see what other people's experiences have been following the LFS books. What are you using the system for? How long did it take to get your system set up? What kind of hardware are you using?
I use a Cross LFS multilib system for my everyday machine. I use it to do things like read e-mail, answer posts at LQ, or play Mahjong, develop, etc. Everything you might use an Ubuntu or Slackware or Fedora or Gentoo machine for.
I have a Gigabyte GA-M51-S3G motherboard. Sound, ethernet, and video built in. There's a review at the HCL with the specs. I use an AMD64 X2 5600+ processor. Seagate ST3120814A HDD (120GB) and WD WDC WD400BB-53AUA1 HDD (40GB). LITE-ON DVDRW LH-20A1H DVD/CD R/W and LITE-ON LTR-52327S CD R/W. I also have a second LiteOn NIC (Tulip clone).
It took 7-8 hours IIRC to build the base system. After that it's never really done. It has all kinds of stuff you might want. X Windows, GNOME and XFCE, Dia, Inkscape, Picasa, The GIMP, Firefox, X-Chat, BOINC, Open Office, Geany, DevHelp, Glade, MySQL, MPlayer, Nero, etc. I use my own "package manager"; doesn't resolve dependencies, but it keeps track of what gets installed for easy removal. I edit the CBLFS Wiki so I install a lot of stuff that I never really use.
The second NIC is used to connect this machine with three others in a cluster. The other three machines are a mish-mash of older 32-bit machines. All three of them have CLFS too. They're slower, so they took longer to build the base system. However, they don't have as much software installed on them as the master node.
Last edited by weibullguy; 10-15-2007 at 08:38 AM.
The desktop was a challenge, but I'm running (B)LFS (+extra's) for a while now and I don't have any complains. On the contrary!
What do I run besides the usual stuff (e-mail, browsing, newsgroups/p2p/torrents)? I like to do multimedia related things and use (among others): cinelerra, mplayer/mencoder, kino, and gimp. I also have openLdap, SUN's Directory Server, LAMP, proFTPD and vsftpd running. Some of them run multiple instances (mostly work related) and some run both on my server and desktop.
It takes me about 6-8 hours to build LFS another 6-8 hours to build the none-X related BLFS packages. X and related can take a lot of time depending on what you want/need (example: building KDE takes a long!!! time). And, as weibullguy already stated, the work is never done (also true for all other distro's).
thanks for your replies. I'm not too concerned about the compile time but more about the time it takes to maintain a LFS system. Without a package manager, updating something like binutils or glibc could be a lot of work, if you have to manually recompile a bunch of dependencies. Just keeping track of the dependencies could be a nightmare. You could use a package manager that handles dependencies but then you'd have to write a bunch of .spec files (or whatever) and that could be even more work than installing the system in the first place. Of course you probably don't need to update those core packages too often. When I look at a source based distro (Gentoo) I see that they have done a lot of work to integrate CFLAGS and USE flags to make things easier on the end user and it seems like in a LFS system you'd have to track all that yourself somehow. Am I making it more complicated than it is?
Still, it sounds kinda cool to build you own operating system the way you might build your own computer.
When you start talking about rebuilding tool chain packages like glibc or binutils, most (C)LFS users are just going to rebuild the system. In the long run it'll be quicker and your life will be simpler if you do.
You can install a package manager if you want, but what's the point? I installed Gentoo's portage on a CLFS partition once, but it's not really worth the effort IMHO. After you get a functioning environment, you'd be surprised how rarely a build will fail because of a missing dependency.
If you look in the LFS hints you will find several that are about package management. There is also the one that I linked to in my original post. The BLFS book and the CBLFS Wiki list dependency requirements because someone else has already figured that out.
CFLAGS can be set in your shell configuration files (e.g., ~/.bash_profile) or temporarily when you build a package. Other environment variables can be similarly set. The (C)LFS instructions will ensure that the environment variables that need to be set are properly set. There really aren't that many that you'd need to muck around with.
The USE variable is used by portage to, basically, determine which flags to pass to a package's configure script. You pass those options manually when you execute the configure script. There is no need for a USE type variable on a (C)LFS system. It's really used by the package manager, not the system.