How to Build Your Own Linux Distribution
Shelly writes "Go to the source to learn Linux basics and build the right Linux for you. Linux From Scratch (LFS) and its descendants represent a new way to teach users how the Linux operating systems work. LFS is based on the assumption that compiling a complete operating system piece by piece not only teaches how the operating system works but also allows an independent operator to build systems for speed, footprint, or security."
Queue gentoo fanboys...
But seriously, LFS is new? I based my distribution on LFS, and it taught me a lot about how linux works, but this was several years ago. How is LFS new?
--
The last digit of pi is four.
I remember when rolling your own was the only way to have a distribution on some of the processors.
First, Linux From Scratch has been around a long time. Back when I first started using GNU/Linux, I had RedHat installed because I recognized the name. I soon decided that I wanted something that I knew worked because the programs were compiled together, the way they were meant to be. Enter LFS. But if you've ever set up a system (especially a slow system) from scratch, it is kind of painful. My laptop was an LFS system because nothing else worked right with the hardware. But Gentoo is really not a bad solution: you get the flexibility, but all the hard, painful work is done. No more looking for hundreds of package updates, no more hand checking dependencies. LFS is a good deal for systems that are tied to very specific applications, and I learned quite a bit about the layout of the system, so I encourage everyone to take a look at LFS. But for oft used systems, it's more of a hassle than it's worth.
It can also provide you with the most frustrating experience ever!
./configure options, and installation in general.
Not entirely, but some broken packages (or installing one that breaks another) is probably the bane of most administrators existence...
This is why a source hybrid (ala. gentoo) system works so well. You compile from source (reaping all the benefits) but something else manages dependancies, conflicts,
(For the record, I used Linux From Scratch 5.0, I built my base system, then stopped before I had an x server or anything [also known as, Beyond LFS]. )
I did the installation-from-sourcecode back in in 1994 using the slackware (2.0) source set, but building manually instead of using the scripts.
At the time I was also a modest C programmmer (2nd year at uni), and took the time to look at the internals of many of the daemons and other major components. It taught me a damn lot.
Eleven years on... I've been a professsional unix sysadmin/engineer for around 8 years, with better understanding of unix - ANY unix, the skills are very transferable - than most others in my organisation with twice my experience, because I have an "internal" view of unix in addition to the "external" view your average admin has.
So the exercise most definitely IS worth the effort.
LFS is NOT about "custom compilation benefits", and is ALL about tracking down those "stupid dependency problems" in order to learn how the whole show hangs together.
Hmm, in reply to all those who claim that you don't learn anything, and that you're just following instructions, and who recommend Gentoo, how about putting your money where your mouth is and building it yourself? (and pasting the proof here, which will usually take the form of "oh fsck this......how do i fix this?")
Take it from me, when you've stayed up to 2am trying to figure out why this fsck-ing package won't install, and why you keep getting "Error 1:...blah blah", then when you finally figure out why, it tends to stick in your head.
Sure, if you copy and paste everything from the single-html file, you won't learn much - the learning comes from actually *reading* the document instead of mindlessly pasting/copying, and skimming through the mailing lists, to see why they chose to do things a certain way, and hanging on the IRC channel.
The BLFS which follows afterwards is also definitely recommended - in fact, I often use it as a hints guide to installing stuff on top of my normal distro (Slack)...(not for my WinXP box..lol)
Also, using something like checkinstall or paco is recommended - and there's also cpucaps is also useful (link at end).
cya,
Victor
(http://members.jcom.home.ne.jp/jacobi/linux/softw ares.html
If you can follow directions you can get LFS up and running. That is all you need to know how to do. Complete newbies get Gentoo or LFS working simply by following directions.
LFS is cool and has a place for those willing and able to make decisions on how base libraries and apps are compiled. Speed? Sometimes, but only of import in limited applications. None of which newbies should be involved with.
I teach Linux use and administration, as well as security. LFS doesn't exactly provide you the opportunity to learn how to secure your system any more than SuSE, Redhat, or Gentoo for example, or even Slackware.
Further, there are many choices you have to make right from the get go. This merely teaches you a way (assuming you are doing more than following the directions), not the way. There are few "the way it works" out there. And that is how it works on nearly all distributions. LFS provides no advantage there.
Indeed, security-wise unless you already know what you are doing, LFS provides you a prime opportunity to leave your system open. Most modern distributions come fairly well locked down out of the box. LFS, by definition doesn't. While you are downloading the packages you are potentially exposed. So you have to follow the step by step directions. Which puts us back to merely following directions.
When I want/need to teach people the nitty gritty, I turn to gentoo, not LFS. I gave LFS a long trial and it failed in comparison to gentoo for this purpose. I've been "doing Linux" for about ten years, so the idea behind LFS isn't new to me. Gentoo provides a solid base on which to build a custom "distribution" (it isn't a distribution if it is for your own purposes/company/use - you have to distribute it to be a distribution).
LFS has it's place, but not as a teaching you how Linux works and how to make it fast and secure standpoint. It is mainly aimed at/useful for the hardcore or people who have very specific unmet software set needs.
My Suburban burns less gasoline than your Prius.
Best way to learn how Linux works is by breaking it. And then spending 3 days trying to fix it. And then breaking it again. And again. And again.
And it's easy, all you need to do is try to get that weird piece of equipment working, or that x version of software y which isn't in your distributions repository. And Linux will break. And you'll learn it! It's great!