Slashdot Mirror


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."

10 of 192 comments (clear)

  1. Huh?! by SinaSa · · Score: 4, Interesting

    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.
  2. These youngsters... by Goth+Biker+Babe · · Score: 3, Interesting

    I remember when rolling your own was the only way to have a distribution on some of the processors.

  3. LFS.. by Sir+Pallas · · Score: 5, Interesting

    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.

  4. Build Your Own Linux! by VxJasonxV · · Score: 4, Interesting

    It can also provide you with the most frustrating experience ever!

    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, ./configure options, and installation in general.

    (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]. )

    1. Re:Build Your Own Linux! by NineNine · · Score: 2, Interesting

      the "Cult of Ease" has resulted in countless generations of incompetent slobs unable to even wipe their own /tmp dir, let alone figure out how to reboot

      Well, why stop there? Generations of having "farmers" has made it so people can't grow their own food any more. Everybody should learn how to grow their own food, and raise their own meat. And hell, when was the last time you met somebody who could make their own clothes? I mean, everybody I know just buys their clothes. If they need a special shirt, wouldn't it be better if they grew their own cotton, made their own fabric, and leared to sew themselves?

      It's called "speciaization". It's the basis of advanced human civilization. Without it, we'd still be living like the Amish.

  5. Re:Not really that new by irw · · Score: 4, Interesting

    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.

  6. Not that uselss - why not try it yourself? by victorhooi · · Score: 2, Interesting
    heya,

    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

    1. Re:Not that uselss - why not try it yourself? by Shadowlore · · Score: 2, Interesting

      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.


      No, not necessarily. It is not necessarily true that banging your head over something for a while and finally fixing it will teach you how to fix things. You have to understand why it failed and why the fix worked. You can effect a specific fix without either of those. Up till 2am? Please. I'm just getting to lunch at 2am. ;) Most admins trying to figure out why something is broke during compilation do the smart thing: they turn to google, to usenet, and email.

      They do the smart thing and ask others who may have already solved the problem. They don't beat their head against the wall trying to figure it out to the wee hours of their next morning. I've been at this "Linux thing" for ten years laddie. I've also worked a good amount of time as a Q&A and qualification test engineer. Learning how to compile something is not the same as learning how to fix something. Often the things that go wrong on a system, have nothing to do with compiling them. It is interaction among processes and limited resources in strange ways that tend to cause problems. Or removing something that something else needed.

      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.

      Seeing how something is done does not get you any understanding on *why* it was done.

      I've bult Linux installs since before "LFS" was born. One of which was on one of the early Alpha 4/233 stations to hit ebay _many_ years ago. That machine is still running from that install base. LFS is not some rite of passage, nor is it particularly useful in "learning Linux" any more so than any other distribution. It doesn't make you a better admin or any better at understanding "Linux". You can "learn Linux" using the same method of trial/error/ask/learn that you can with LFS. If you can't "learn Linux" using a canned distribution, you will have issues with LFS or Gentoo if you seek to use them as your learning tool. *Every* technique you think makes LFS help you learn is available on *any* Linux install/distribution.

      --
      My Suburban burns less gasoline than your Prius.
  7. Not exactly teaching how it works by Shadowlore · · Score: 4, Interesting

    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.
  8. Best way to learn Linux by Mika_Lindman · · Score: 4, Interesting

    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!