Become a fan of Slashdot on Facebook


Forgot your password?
Linux Software

LFS 4.0 Released 180

Tekmage writes "For those of you who have never had the pleasure of rolling your own Linux install from scratch, take a moment to check out Version 4.0 of Linux From Scratch. Definitely for the techies amonst us, there is (IMHO) truly no better way out there to get down and dirty with the inner workings of our favorite OS." LFS organizes its documentation into "books"; 4.0's book is dated yesterday.
This discussion has been archived. No new comments can be posted.

LFS 4.0 Released

Comments Filter:
  • by Anonymous Coward
    an orgasm when I got LFS installed! It is so cool it can not be described.
  • I've used LFS before to build my own personal distro, and it's a great resource. With basic knowledge of Linux and how to compile, LFS can allow you to make your very own distro.
  • LFS is really good (Score:2, Informative)

    by Ron885 ( 415314 )
    I have been using lfs for about two years. I cannot imagine going back to a normal distribution. LFS gives you so much freedom with the way YOU want to setup your system. If you are looking for just something to do, or if you dislike all the available distributions, try out LFS and you wont be sorry.
    • I installed it too, it took me three days but I learned a lot, and it's really nice to have it boot for the first time (I didn't get an ograsm though :)). I don't use it on my desktop, just on the router - not doing anything else. But it's too much a hassle for me to manage/upgrade packages - I like Debian better. Does anyone care to share some hints on that? e.g., I would like something like this:

      [program] -l logfile make install

      that dumps all files created by make install.
      • you should take a look at install-log or installwatch. you can check the lfs hints repository for some information on them
      • As a compromise, use gentoo linux. It still gives lots of control to the build and upgrades are a cinch.
        • why does everyone have to keep saying... "dont use lfs, use gentoo"? if someone wants to use lfs they will use lfs. some people dont like gentoo(myself) and there are many others that dont like it also, namely many of the regulars in #LFS @ All i'm seeing in these "just use gentoo" posts is this: "gentoo is the best, use it or else". that is not what linux is about.
          • I just meant if package management is an issue gentoo is a good compromise. Read in context of the parent post. I myself used gentoo previously but became an even bigger control freak and actually switched to LFS recently.
            • There are many ways to manage packages in LFS. The great thing is that you can choose how it's done (symlinks, file logging, even .deb or .rpm). The kep here is choice. "Your distro, your rules."
    • by Josh ( 2625 )
      It's easy to understand how LFS enables greater customization. It's also easy for most conventional distribution users to think of particular packages that they like to compile from source to their own custom specs (typically kernel, if nothing else). But it would be nice if an LFS advocate could post something on the most appealing/useful examples of massive customization that they feel justify the extra time/effort involved compared to using a distro with customizations tacked on.
      • Ok, here's an example. My linux system at home (functioning as development machine, router, and firewall) is LFS. I've got each package installed in its own subdirectory under /pkg, and I've got /bin /lib /include and /man full of symlinks to the corresponding files in those directories (this is so utils like gcc, man, and the shell can find things without having to go searching all over the disk).

        Removing a package is trivial: just delete its directory and remove the symlinks. Upgrading a package is trivial too: install the new package into a new directory, update the symlinks, and remove the old dir. If an upgrade has some problems, I can roll back to a previous install by rolling back the symlinks (provided I haven't deleted the old installation yet). My next project is to create a program that can manage the symlinks automatically, to make it even easier. (Preemptively: yes, I know about "stow", no, it doesn't do what I want)

        I don't know of any regular distribution that lets you do that :)
  • Doing a full LFS install has been on my to-do list for quite some time now... perhaps I should try it someday soon. Until now, I have always been a faithful Slackare user, and I've done a bit of hacking in a few programs myself... as I see it, LFS is the perfect way to get the ultimate "feel" for Linux... I'm just not quite sure if I'm up to the task... building a simple Linux system I can handle, but building a full KDE-setup may be a bit too much for me right now...
    • To follow the books you need some skills, but since you've been using Slackware, you're almost overqualified :)

      Besides some skills, the only other thing you'll need is time and patience.

      Johan Veenstra
    • Re:Too many todo's (Score:5, Informative)

      by HIghoS ( 177655 ) on Sunday October 06, 2002 @08:09PM (#4399324) Homepage
      Hey fear not. Getting KDE running on an LFS system is not *that* hard.

      There's a subproject of LFS, that isn't as well known as it should be, that's documenting the process of installing software after (or I should say 'beyond' :) the completion of the lfs-book.

      In there, you will find all the information required to install the graphic libraries, X11, KDE, and so forth.

      You can also check out the lfs-hints for additional software/issues that are not covered by the blfs-book;

      It's more about taking the time todo it ;-)
  • Man they must have seen us coming (have they been /.'ed before?), that is a nice list of mirrors on the linked page... that is until the linked page gets killed ;)

    • by iamthemoog ( 410374 ) on Sunday October 06, 2002 @06:39PM (#4398935) Homepage
      For your enjoyment:

      North America
      Fremont, California, USA [8 Mbit]
      Lufkin, Texas, USA [6 Mbit]
      Columbus, Ohio, USA [1 Mbit]
      Calgary, Alberta, Canada [10 Mbit]

      Mainz, Germany [100 Mbit]
      Amsterdam, The Netherlands [100 Mbit]
      Oslo, Norway [100 Mbit]
      Lancaster, UK [100 Mbit] ml
      Vienna Univ. of Technology, Austria [64 Mbit]
      Karlskrona, Sweden [10 Mbit]
      Freising, Germany [4 Mbit]
      Teesside, UK [256 Kbit]
      Odense, Denmark [256 Kbit]

      Brisbane, Australia [155 Mbit]

      Singapore, Singapore [45 Mbit]
    • Yes, we have been slashdotted several times now. It's one of the reasons we have always kept the mirror list on the front page. We are also the main host for so we have to keep up with all the barrage of hits it gets also :)

      It's always fun *coughs* to watch how shadowfax (the lfs server) handles the load. A little while ago we had nearly ~100 apache processes spawned with a load of almost 5.00. It's gotten a little more sane wotn to about ~50 proc/0.50 load.

      The best part is problably looking at this;

  • When will we be getting WFS?
  • Gentoo? (Score:2, Informative)

    by thing12 ( 45050 )
    Why not just use Gentoo? [] You get all of the benefits of a fully customized and compiled distribution when you want it. Yet it's completely automated for when you don't want to be bothered with every little package that goes into a fully functional system.
    • Re:Gentoo? (Score:4, Informative)

      by Ron885 ( 415314 ) on Sunday October 06, 2002 @06:36PM (#4398925)
      gentoo is an alternative, but its not the same as doing it by hand... you just start it and it does it all by itself... with lfs you can compile everything the way you want to with the options you want and dont need to mess around with the config files of gentoo.
      • by thing12 ( 45050 )
        The gentoo config files are not all that bad - they bring order to the chaos that is a source based distribution. With LFS you either remember what you have installed (which may be easy since you tend not to install very much when you have to do it from scratch) or most likely keep track if it in a file (or on paper). Either way you need to know what you have installed so you have that info available to pass as configure options. With gentoo you keep track of that in one place. Then for every package that *can* use, for example, OpenLDAP it will automatically be configured to use it. It's so much easier than LFS - and yet I'm failing to see what you lose with Gentoo...
        • by Anonymous Coward
          >It's so much easier than LFS - and yet I'm failing to see what you lose with Gentoo...

          Simple: If you are looking for easy, do not do LFS.

          If you are looking for a pre-made distro, do not do LFS.

          (Note that I said "do LFS" instead of "use LFS" above. With LFS you build the system the way you
          want it, THEN use it the way you want to)

          Stick with Gentoo if you don't get it, or don't want it...
      • Re:Gentoo? (Score:2, Informative)

        Have you ever used it?

        Its really iso-linux with a few added features. Everything and I mean everything needs to be installed from scratch. No X, apache, sound, even network settings. You need to setup everything yourself. Very different from the current world of distro's. I suppose some of it is automated like "emerge kde" would install X and kde, but everthing else needs to be installed from scratch.

        • Re:Gentoo? (Score:3, Informative)

          by Fiver-rah ( 564801 )
          That's an unfair characterization. Sure, you get to compile your own kernel and set up a network and all that stuff. But installing new software is always as easy as typing "emerge ". Saying "everything else needs to be installed from scratch" is pretty unfair. There are scripts and ebuilds written so that pretty much all you do by hand is set up the file systems, handle networking, and compile the kernel. You don't need to worry about where to download things, or what to download, or which patches to apply or anything like that.
          • Re:Gentoo? (Score:3, Insightful)

            I totally agree. I use gentoo now (bizarrely enough) because it's simple to maintain and not terribly hard to install in the first place if you have a weekend to kill, especially in comparison to lfs. There's a massive difference from installing KDE from source and typing 'emerge kde.' As others have said, lfs is great for getting your hands dirty and learning some stuff. Gentoo is for after your hands are dirty and you want to clean them up while still getting that feel-good speed from compiling every package for your system from source. Yeah yeah yeah, you have to hand edit all of the X/ftp/ssh/profile/etc config files and that's a big pain. Deal with it. You should be doing that anyways.

            Why is that everytime someone mentions lfs, someone has to say, "Why not just use gentoo?" It makes us (the users) look like the next generation zealots. I have a better idea - learn what distros do what things and at what difficulty and then choose for yourself. Suit your own needs, dammit.
            • Suit your own needs, dammit.

              Exactly. That's what Linux is all about. I can run Gentoo, and my mom can run RedHat.

            • Once the Gentoo ISO burned to CD is on hand does the Gentoo install require much more downloading? I'd like to give it another try but I'm on 56k for a while. I did check out but I couldn't figure out how much things had changed since I last tried it quite a while ago.
            • Re:Gentoo? (Score:3, Insightful)

              by thing12 ( 45050 )
              Why is that everytime someone mentions lfs, someone has to say, "Why not just use gentoo?"

              Because it's a troll. It gets discussion started...

              It makes us (the users) look like the next generation zealots. I have a better idea - learn what distros do what things and at what difficulty and then choose for yourself. Suit your own needs, dammit.

              Exactly! Over the past 8 or so years I've used Redhat, Debian, Mandrake, a couple of BSD's, and LFS. Now I use Gentoo because it suits me - and I think it would suit nearly everyone who has an interest in LFS. I can't see why most people, even those who want the flexiblity of a source based system, would spend the time to maintain an LFS based system unless they had nothing on a computer except learn about how the computer works. You have no time left over to take advantage of what the computer can actually do for you -- save you time. How much different are your compile time choices going to be from the ebuild's defaults? And if they are different, then edit the ebuild file.

              LFS is just tedious to maintain. Which is part of the reason why it's perfect for an embedded system. You get exactly what you need, nothing more, and you never change it.

              As others have said, lfs is great for getting your hands dirty and learning some stuff. Gentoo is for after your hands are dirty and you want to clean them up...

              LFS is a wonderful experience to install. I'm not discouraging anyone from going out and installing LFS. I just believe that after you've done it once, you don't need to do it again - and that's where Gentoo comes in. Gentoo essentially is what Automated LFS [] aims to be.

          • Re:Gentoo? (Score:3, Interesting)

            by Junta ( 36770 )
            To be fair though, knowing which patches can and should be applied to particular versions of particular packages is not very useful, long term knowledge. Most of the patches installed by Gentoo are bugfix patches, which are *really* short lived. The occasional feature enhancement patch is relevant longer, but not too much longer. Same with the where to download and what to download. The learning experience of LFS basically boils down to knowing *every* dependency in your system, and how to manually configure every package (though that configuration step is not taken care of in gentoo). The dependency knowledge is of dubious value, as that too is subject to change in the details. All gentoo does is hide the nitty-gritty of requisite packages and keeps you from having to know every dependency. I did a Linux from scratch before (before the 'official' LFS existed, played it by ear), and it really doesn't teach you much that you don't learn in time with distributions. The useful knowledge is how to *use* the applications, not install them.
    • Re:Gentoo? (Score:2, Informative)

      by jormurgandr ( 128408 )
      gentoo also isnt production stable yet. I've been using it on my home PC for about 6 months now, and although I love the portage system, it isnt perfect yet. Quite frequently, I've had to go in and edit files by hand, without any docs from the install, and without network access (emerge world killed my NIC several times, and my IDE controller another). Hopefully in time it will become more mature.
      • Re:Gentoo? (Score:3, Offtopic)

        by Junta ( 36770 )
        That is really bizarre, I've never had any troubles. Especially killing the NIC and IDE controller, I wouldn't blame software if hardware is dying.

        With the portage system, I've never really *needed* to maunally edit unmasked versions of packages. Occasionally I will change the mask rules to try stuff at my own risk, but I haven't needed to do anything.

        All that said, it is at least as workable as LFS and much much easier. While both take forever to get up and going (my computer emerged for an entire weekend), the interactive time for gentoo makes it at least livable (I issued one emerge command with the packages I wanted and spent the weekend doing other stuff).

        LFS is useful for learning a bit more about the system and how it works, but offers few details that can't be gotten in easier ways. What I have found extremely useful about the LFS references is that when I do go after masked packages and have problems, the LFS hints can explain why it broke and a workaround.

    • Why not just use Gentoo?

      I use Gentoo, and I've done LFS before. You really don't have to know much to install Gentoo, and you barely learn anything because everything is so simplified. This is why I use Gentoo. But I don't think it compares to LFS, where you get to do the minute details of every step of the installation, and have to tediously maintain it.
  • I've been using the 4.0 release candidate for about 2 weeks now, and although it is AWSOME, it does have some problems with some packages, like GDB and Tripwire (neither will compile). I'm pretty sure the problems are related to GCC 3.2. Hopefully a patch for GCC will be released soon so as to compile these apps properly. Just a warning for those interested in LFS (its great otherwise).
    • by ct.smith ( 80232 ) on Sunday October 06, 2002 @06:56PM (#4399005) Homepage
      I wonder if the problems are really gcc3.2 and not the source code. I've just spent the last week trying to compile a suite of programs with 3.2 just to discover that none of it compiles. However, each problem was actually due to use of non-standard C++ code. The issue is that old versions of gcc let a lot of non-standard code compile, but the newest version is much more strict. I would hope that the solution is to fix the code and not make the compiler do silly things to remain backwards compatible.

      I suspect that there is a large amount of code out there that has the same problem. Probably this includes the packages you couldn't compile.
  • by Billly Gates ( 198444 ) on Sunday October 06, 2002 @06:43PM (#4398948) Journal
    If you want a balance between installing everything from scratch and a real distro with documentation, then I would recommend Gentoo.

    Gentoo is pretty much based on iso-linux from the linux from scratch project.

    The benefits are great documentation from their website [] and the best package manager out today. It truly feels like an os you own and not by some corporation since you have to put the os together yourself. The forums are also great. If you want to get your hands dirty and have a huge community help you out through the process then look no further.

    • Well, to be fair, while I *love* portage, I would say the ebuild system isn't the best package manager feature wise (portage would be the package distribution system, ebuild the package system). Ebuilds add optional dependencies, but that is it. But from the perspective of the portage system as a whole, there is a problem. The end system is highly optimized and installs truly are managed well, but if you are undecided about packages that may become dependencies for other packages, well, there is often no turning back while knowing for certain what will be impacted. On installs, portage intelligently figures out what is needed and what optional packages to use based on USE flags. But unmerging will just do that package without regard to broken dependencies. If you are unsure about what you want, gentoo may not be right.

      Personally, I use gentoo on my laptop and desktop (and would my router if I didn't mind spending days for it to finish), but there are things about it that make it not best for everyone.
    • <RANT SUBJECT="Gentoo Zealotry">

      Why is it that every time someone mentions any other distro (especially LFS), Gentoo users apparently feel duty-bound to storm out and preach the glories of their distro?

      You people really sometimes come across as zealots. I've messed a bit around with both Gentoo and LFS myself (I liked both), but one of the main reasons I don't do Gentoo at the moment is simply that I'm so fed up with the legion of Gentoo fanboys who can't understand thatreason. Grow the hell up. Just because Gentoo is a nice, even great, distro doesn't mean that the rest of the Linux distro scene sucks.

      Does the tech community really need all this ridiculous zealotry and misguided "advocacy"? If craftsmen felt the same way about their tools as we computer people do about ours, we'd have screwdriver fans advocating the use of a screwdriver for driving nails and chopping wood, while the chainsaw fanboys are out trying to drill holes and change tires with their chainsaws. Hint: Different distros, different text editors and different programming languages exist for a reason: People are different. "Different" does not necessarily have to become a question of better or worse.

      </RANT> -- this might be flamebait, but don't say I didn't warn you.

    • I'm sitting here typing from Mandrake 9. For the first time ever, I have both my cheap scanner and my cheap printer working (at the same time!).

      Last week I was running Gentoo 1.3. I decided to give Mandrake another try before going to Gen1.4 since I was wiping the drive clean anyway.

      Here's the thing: Mandrake9 feels even *faster* than Gen1.3 was. It's even hard for ME to believe. I assume it has something to do with gcc3.2, but I'm not sure.

      Has anyone tried Gen1.4? Is it faster than Man9?
    • Gentoo is a good distro. Like any other distro it has it's pros and cons. A pro would be compiling your own code usually gives you a faster system. A con, well compiling your own system takes a while. Imagine trying to maintain 4,000 Gentoo PC's with different hardware/software requirements? It be pretty tuff. One thing I don't understand is why most Gentoo users get so uptight about LFS. I have been using LFS for about 2 years and I love the distro that LFS taught /me how to build. Gentoo is not about building your own system. You are building a Gentoo systems the way Gentoo sets things up. I hate the way Gentoo installs Apache/PHP. I didn't like Gentoo's 1.2 install of Gnome, however Gentoo 1.4's Gnome is better but it gets installed in /usr which to me is silly. Sure I can go and muck around with ebuilds, but that takes time, just as much if not more then doing an install on LFS and it is another build system to learn. Linux is about choice, and some will choose Gentoo, some Redhat. I like Gentoo and LFS. The one most important thing to remember is that LFS IS NOT A DISTRO. LFS is about teaching YOU how to build your own Linux system. How to start with bare hardware and build a system from the ground up. Gentoo is not about teaching or learning how to build a your own Linux system. It is a distro like Redhat, mandrake, etc. Instead of using RPM's compiled for 386, Gentoo will build software for you. Configuring some files under /etc is NOT the same as building your own distro based on the LFS books. With ANY distro there will be configuring. I think Gentoo fits in nicely for a Linux Power User. Where one might get bored with Redhat/Mandrake, Gentoo will help you "Kick it up a notch". LFS taught me SO much about Linux, being a programmer, my skill set has gone through the roof when it comes to programming under unix/linux. I will always be grateful to Gerard Beekmans and him sharing his knowledge of Linux with the world. Jim Drabb Programmer Analyst Davenport, FL
  • LFS is great (Score:2, Informative)

    Its been a great way for me to learn the ins and outs of Linux. I still don't know everything but I'm much more comfortable setting everything up. And the #LFS channel on is very helpful.

    As an aside, try using Slackware 8.1 for your base distro. Its got a pretty small footprint but it still has everything you need.
  • Why LFS indeed? (Score:5, Informative)

    by ageitgey ( 216346 ) on Sunday October 06, 2002 @06:52PM (#4398989) Homepage
    I'm sure people are going to reply saying that LFS is a niche product and not news that many people care about.

    Well, though most of you are probably exposed to Linux through the desktop, Linux is winning it's in-roads in the industry through embedded systems and handheld devices (not desktop). Functional LFS installs can be as little as 5 megs or so and completely customized. Perfect to compete with several-thousand-dollar offerings from MS, Palm, etc.

    So if embedded systems are driving commercial linux support, in a way LFS and systems like it are more important in the short term than Mandrake and SuSE.

    So why not write your local LFS contributer and say thanks?
    • Re:Why LFS indeed? (Score:2, Interesting)

      by hirschma ( 187820 )
      Although the LFS folks have been making the claim of an 8 or 5 meg installation, I've yet to see any clear docs on how to do it. I'd like to. Anyone know of a related hint or how-to that details the slimming process?

      • that was a "hey we can do it" type thing, there are actually no docs on how to do that yourself, a few people have asked for that.
      • Not really that difficult, just build LFS and install the feature that you need (ftpd for example). And then remove *everything* that's not needed anymore :)

        Johan Veenstra
      • Re:Why LFS indeed? (Score:2, Informative)

        by HIghoS ( 177655 )
        Hrm... Actually getting a system running in 5-8MB is quite modest today. At the time (2y ago) Gerard had build a complete lfs system and stripped all the useless packages/files from the system and then installed apache. It actually worked quite well for it's purpose.

        Today, it could be done in under 1MB by switching to uClibc from Glibc and so forth.

        Honestly however.. just do some research. I know of dozens of people that have done this over the years, many of them have posted details on weblogs, mailing lists, portals, etc. It's such a grey area and considered more "embedded" then custom that there isn't much of a need for documentation like the lfs-book.

        It's just assumed that if you are going to be working on such a project-you at least know where to start :)

      • Re:Why LFS indeed? (Score:3, Interesting)

        by tzanger ( 1575 )

        Although the LFS folks have been making the claim of an 8 or 5 meg installation, I've yet to see any clear docs on how to do it. I'd like to.

        That's because you need to learn it yourself. :-)

        Honestly though, I personally have a LFS-based firewall system (kernel+netfilter+ipsec+ssh+snmp+ntp+vim+perl (yes perl)) that fits in to an 8M CompactFlash card. Now I use 16M cards and add a 3M boot/config partition with grub, but making small linux distros is dead simple with uClibc and busybox (both are in the LFS hints).

        The basic recipe is to use uclibc and busybox, optimize for size (-Os), strip everything you can and once all of that is done, go through and remove any unnecessary libraries and files. Big hint: you don't need documentation on small distros.

  • educational value (Score:5, Insightful)

    by mrm677 ( 456727 ) on Sunday October 06, 2002 @06:56PM (#4399003)
    LFS is a great way to learn Linux. It truly helped take me to the next level of my personal understanding of how things work.

    However I would never recommend it for a production system. Even using it for a personal workstation takes loads of time to manage. One doesn't appreciate package management until they have installed a LFS system!!! Of course one could always use RPM/APT/DEB after doing a LFS installation...
    • Re:educational value (Score:3, Interesting)

      by jgkastra ( 571174 )
      Package management?

      My current LFS install (3.3) has LFS installed in the default places, and everything else created after LFS in /opt in its own directory. The files are symlinked into their respective directories in /opt, and are uninstalled by reading the list of files in the /opt/foo/* directories. I can then rm -r the directory and uninstall the package.

      My next installation is moved towards installing the core in /usr/lfs and /lfs and symlinking out from there.

      This keeps me in check with the program version and what is installed with a simple ls. The only time I've had to use a package manager is to install Glide (I couldn't compile Glide, so I had to use RPM).

      • Yes, I used the same approach when I maintained my LFS system. Except I used a tool to manage the symlinks (I forgot the name of what I used though GNU has a similar tool). It still got tedious after least in my opinion. Also symlinks do have a very small effect in speed and usually take up 4k per symlink depending on your choice of file system.
        • Re:educational value (Score:3, Informative)

          by CoolVibe ( 11466 )
          Also symlinks do have a very small effect in speed and usually take up 4k per symlink depending on your choice of file system.

          This "problem" has a simple solution. If the slack from symlinks bothers you that much, why not move to a extent-based filesystem like XFS? I use it on most my LFS and Gentoo boxes, and it works like a charm.

        • The GNU tool you're referring to is probably Stow.

          Other good package management tools for LFS use include Depot, Graft, swpkg, opt_depot and the countless other free package managers whose names I have forgotten.

    • by Anonymous Coward
      The only reason I wouldn't is it takes a long time to set up. If you do it once, though, you wouldn't need to do it again.

      Seriously, it depends on the purpose of the production system and how often you install/change packages. Often I wind up compiling software from scratch anyway. For instance, I've never been able to use a standard apache. A source RPM isn't all that useful if you need to add compile options and modules, etc., etc.

      Where I really miss RPM's or DEB's is when I need to recompile something huge like gnome or KDE--which is more of an issue on desktops.

      Keep in mind, too, that it is possible to install a package manager, and use it for the non-base packages.
    • I would have to say I NEVER liked pakage management. I always have performed src installs. I don't like the amount of time required to get a LFS system started, but after that, its no problem.
    • by Tekmage ( 17375 ) on Sunday October 06, 2002 @11:33PM (#4400345) Homepage
      Ditto on the educational value. I'd been using Linux in various forms since '93, but it wasn't until I started exploring LFS that I really began to understand and appreciate what went on behind the curtain.

      I'd argue the "never in a production system" point though. For an average end-user, sure. But if you have a particular end use(r) in mind (robot control, wearable computer, multimedia entertainment, home automation, etc) then it may be easier to enhance an LFS recipe than prune back a generic distro.

    • by adam613 ( 449819 ) on Monday October 07, 2002 @01:29AM (#4400936)
      I beg to differ. I'm running LFS (a CVS version from early August) on a small-time production web/email server. It was much simpler to set up than RedHat because I knew exactly what was being installed where, and I had configured everything myself. It took the better part of the day to compile LFS and the other packages necessary to set up the server, but it was ready to go the minute I was done compiling.

      It's been up and serving for 38 days straight. It was up for a month straight before that, but I had to bring it down to add memory and remove the cdrom drive.

      I'm also running LFS on a desktop machine. It's not as pleasant to use as the server (KDE took 8 hours to compile), but it was definitely worth the effort it took to set up in terms of learning, stability, and configuration flexibility.

      I appreciated package management a LOT more before I started using LFS. I got into LFS originally because I got sick of Mandrake installing hundreds of packages I didn't recognize or need. I want to know exactly what's on my system and why. And I hate when a package refuses to compile or install due to dependencies which shouldn't be failing. I've never had that happen in LFS.

      LFS definitely has a steeper learning curve than pre-built distros. But what it loses in initial ease-of-use, it more than gains in long-term stability and simplicity. I wouldn't recommend that someone do their first (or second or third or fourth) LFS build on a production server, but after experimenting with it and really learning how it works, I can't go back.

      YMMV, obviously. Not everyone is paranoid and anal like I am.
  • "pleasure?" (Score:3, Funny)

    by Anonymous Coward on Sunday October 06, 2002 @06:59PM (#4399015)
    "Linux install" and "pleasure" do not belong in the same sentence.
  • The Way to Learn (Score:4, Interesting)

    by fm6 ( 162816 ) on Sunday October 06, 2002 @07:00PM (#4399021) Homepage Journal
    I've heard popular distros like Red Hat criticized because they do too much hand-holding. The theory is that you'll learn more about how Linux works if you use a less user-friendly distro, such as Slackware.

    But if you need handholding, you really need it. On the other hand, if you're comfortable with using Linux, but want to know more about how it's put together, even Slackware is too high-level. LFS, on the other hand, is the ultimate Linux-learners tool, because it doesn't automate anything.

    • Amen to that. I've always loved Slackware, and it's always my first choice for most systems, but my main desktop is LFS. My only nitpick is how the premade boot scripts in the book are (ick) SysV. Ah well, at least it taught me to write boot scripts from scratch, too. :)
      • I guess you haven't heard about the lfs-hints yet. One of the major reasons for doing LFS, is the educational value, which is why we like to encourage users to experiment and change the book to fit _their_ needs, so...

        Considering you are talking about Slackware, I assume you would prefer a bsd init system; xt
        • Actually, that's exactly where I learned it. I used the scripts in bsd-init.txt, and modified them. I like to have a runlevel without networking but with virtual consoles (long and boring story behind that), and that hintfile made it easy.
  • If you're like me you like to have everything compiled from scratch. Thats why I tried LFS some months ago, but found it at that the time it took to make a basic setup was awful long. Then I switched to gentoo but I disliked their portage system, but finally I setteled with FreeBSD. Compiling everything from scratch is as easy as:
    cvsup stable-supfile
    cd /usr/src
    make world && make buildkernel KERNCONF=MYKERNEL && make installkernel KERNCONF=MYKERNEL

    and ports+portupgrade is just great.
    • It's just an unpopular opinion.

      I've tried Gentoo too. I think the portage system per se is pretty good, and I like their XML based documentation. However, the software in portage is not up to the quality standards of Debian, for example. I emerged X11, and after waiting for several hours I was rewarded with non-functioning X server software a missing external symbol). This is not a problem with portage per se, but the contents of portage. Yes, I do have the source, but I don't have the time to figure this one out when I can simply download a Debian iso and know that everything will work.

      Of course one glitch like this doesn't put me down on gentoo. I think it has a place, but I can't see using gentoo on anything but my personal experimental machine. First it takes to long to install major systems by emerging them. Secondly, it's too bleeding edge and therefore (in my opinion) too squirrely for use on machines I have to provide support with.
  • For some time I'm toying around with the idea of using LFS as the basis of a linux distribution.

    Use LFS to create a linux demo/distribution, a bit like Beos R5. You boot the cd, try it out, and if you like it, have a program to copy the cd over to the hard disk and setup a bootloader.

    And keep it small. BeOS managed to cram a lot of stuff into a 40mb iso image. Current mainstream distros are too fat, spreading all on at least 2 cds.

    Well, gotta ditch the older version and check this new LFS book.
    • 40mb iso image is possible, but it would be 40mb of compressed data and don't expect XFree to start.

      [lfs]$ startx
      bash: startx: command not found

      Johan Veenstra
    • Knoppix [] essentially does what you're saying.

      It's a distro that doesn't use the hard drive at all. It boots from a cd, detects your hardware, and loads up KDE3. It's does a pretty good job at hardware detection, although saving your settings (and files) for the next time is kind of a pain. However, for trying Linux out without screwing up your machine, Knoppix does a pretty good job.
  • Want to play with multiple distros? but you don't want to trash your setup? wait until the next major kernel release, you will be able to play with this with out even rebooting! The new VM in the latest kernel is touted as being able to run multiple installations.

    (disclaimer, this is only an opinion, not actually based on first hand experience)
  • From: LFS Book 4.0 - Chapter 1.1, Section 2 []

    We are going to build the LFS system by using a previously installed Linux distribution such as Debian, SuSE, Slackware, Mandrake, RedHat, 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. Ordinarily, the required tools are available by default if we selected "development" as one of our installation options when we installed a Linux distribution.

    Okay, so what do these people mean by "Linux From Scratch"? Installing another distro first to install "required tools" is in my view not installing from scratch. I was hoping to be able to install a very, VERY base HD based distro for my two antique 486s with just the standard stuff (GCC, shell, GNU utils and iptables) for use as a router/NAT gateway but that is quite far out of the question now. Huge disappointment from something with such a promissing name.

    • yes, you do need somewhere to compile the chapter 5 programs in, but there are many people who provide iso images with the chapter 5 programs precompiled, or you could use another box to compile the stuff for chapter 5. after you have that sorted out, you could than just install the things from chapter 6 that you want and skip the other things. what is nice about lfs is that you can install what you want and not install what you dont want.
    • by amccall ( 24406 ) on Sunday October 06, 2002 @07:40PM (#4399196) Homepage
      What do you want them to start from? Flip 0's and 1's on a front panel?

      In order to build ANYTHING you need an existing tool chain. Here that means gcc, bash, ld, etc... LFS starts with creating a bootstrap system using your existing distribution: this existing distribution might just be a bootable ISO cd. LFS DOES go through everything: the kernel, gcc, glibc, ... everything.

      LFS will show you how to build your own Linux, step by step. It will tell you everything you need to know to understand the bootup process.

      If you want to run LFS on a 486 though, you'd probably be a lot better off getting it going from your main system, and then copying over. glibc alone can take HOUR(S) to compile on a modern system.

      • Flip 0's and 1's on a front panel?
        Get some! Go AN/UYK-7! []
        -1 Jackass
        • The Altair was the first home computer. You had to assemble it yourself (as in, from what I understand, put each chip on the board. Tho I think traces where already laid out for you) and even then there was no monitor, no keyboard, just a CPU, RAM, switches and lights on the front.

          You'd set 8 bits (Up, Down, Down, Down, Up, Up, Up, Up) and then flip another switch to store it in memory. Repeat as required.

          People would do this for *pages* of code... with the only result being the lights flashing.

          We don't realise how lucky we are. :) (and I don't even code!)

          Google gave me this:
 tair880 0.htm
          • A UYK-7 boot had you pull a loader out of its 512 bytes of NDRO (read, BIOS), which you then used to load a program loader from tape, after which you initiated the program.
            All via switches and direct register manipulation in octal.
            Aye, MS-Denial Of Service (DOS) was heaven by comparison...
    • Dude how are you going to install an OS without an OS? explain please how you will boot up a machine with nothing on it and proceed to download and install packages without a compiler, terminal, shell prompt etc.

      Here is a hint for you though: download an iso linux distro (one that boots off cd) and build using that. or install redhat on a second hard drive that you can remove after you are finished.
    • > Okay, so what do these people mean by "Linux From Scratch"?
      > Installing another distro first to install "required tools"
      > is in my view not installing from scratch.

      If I understand correctly, the other distro you use to build
      your LFS is not part of your finished project, and does not have
      to be installed on the same drive or end up running on the same
      hardware. i.e., you can take the hard drive from your 486 and
      pop it in any working Linux system and build LFS on it, then
      put it back in your 486 and use your shiny new LFS. At least,
      I think that's the theory.
      • That pretty much sums it up. You build a few essential tools, linked statically so they can run on their own. Then you chroot into
        where the tools are and build glibc. Then you build everything again inside chroot, dynamically linked against your shiny new glibc. Set up init scripts and a kernel and you can boot the thing.
    • Your particular definition of scratch involves compiling the C source code.
      Some might say scratch could also be:
      - Writing it in assembly
      - Writing it in x86 machine language
      - Flipping the bits on the hard drive
      - Re-inventing the C source code

      All of the methods require additional tools:
      - A tool to take the Hard Disk and provide a file structure, write a boot sector and loader
      - A tool with some commands to copy the compiler there
      - A tool to take the C source code and generate the machine language binary code

      You might find it similar to how mammals develop. As far as I know, most mammals require parents to feed, care, and raise their young. I can't think of any fertilized egg, fetus, or newborn that can survive without the parent to hand down their knowledge (I even heard that the reason we are able to live past 30 is to provide knowledge as grandparents or family/clan elders).

      I have thought of one way to completely write the OS with only one machine. A long time ago, the old IBM PCs (and Apple computers) had a key sequence which would break into debug mode. After this mode starts, you would be able to type in the machine code to get a rudimentary system going. Another way would be to get an old ethernet card with a rom chip and burn a startup rom. Then you type in the boot loader.
      For example: a bootable ``Hello World!'' program, consisting of just over 100 lines of assembler code. []

      While 100 lines of code is easy to hand type, imagine typing in the 10,000-100,000 characters for an extremely simple operating system. Then imagine hand typing in the machine code for a C compiler (yikes!), unless you want to hand type in the millions to 100's of millions of bytes of machine code to write a Linux system. There would be another way speed it up if you take apart a keyboard, wire it to a device capable of playing back keystrokes. I started to work on this but have postponed it until better times. I did start out by building Linux from Scratch and it took me 30-40 hours of very patient, slow progress. The complexity of even a minimal Linux is boggling when you jump in, compile, link, and see how much text scrolls by your screen when compiling it.

      The advantage to Linux from Scratch is you have the greatest control over the OS. Without your direct control over every detail it won't run, as it depends on your Linux knowledge or following the tutorial to install.

      Other links:
      From-PowerUp-To-Bash-Prompt-HOWTO []
      How to Write an Operating System []

      If you want an extremely minimalist Linux distro, there's a list at : []
      Select Category-minimalist, Platform-Intel compatible and click go.
      Search for gateway on the page.

      I've tried the following ones because they have the basic OS requirements for a user, they load from a floppy, and move resources to RAM:
      Alphalinux []
      muLinux []

    • When you bake cookies "from scratch," that doesn't mean that you're buying some chips-ahoy's in a ziplock bag and heating them up in the microwave.

      It means that you need some tools, a cook book tells you the ingredients and what to with them, and you bake yourself some cookies.
  • I did the LFS about a year ago, just prior to installing Gentoo 1rc6. It was a great learning experience. I am probably comfortable using Gentoo now, because of it. With that said, once my machine was up and running, there was not much I could do with it! LFS does walk you through the compiles and installs of all essential components of a linux system. But, they give you exact, step by step instructions on how to do this. This helps you learn a lot about how the linux system is built, and works, but it still doesn't help you learn how to compile and/or install other programs that may need adjustments to makefiles or anything non-standard. (This is why I have since picked up a book on C ;))

    This is what Gentoo accels at. Installing applications (from source) successfully. Previously using RedHat or Mandrake, I never got to the point where I had ALL the applications I wanted installed and working successfully. With gentoo, I have this, and I'm actually using my linux box; not just tinkering with it...
  • My home box, a 600Mhz AMD Duron, was bought two years ago, and I spent some days installing LFS on it. It's still the system I use now. A lot of software was added over time.

    It works fine. However, now, after two years, package management is getting a bit aggravating. I find I have to upgrade libraries and stuff before I can install some new things, and there's no good way to uninstall the old ones. So you just make install the new one over it and hope it's all ok. I suppose I could look at the logs of make install to see what went where, and delete it by hand, but many of those logs are gone and it's too much work.

    And recently I wanted to install something that triggered a bug in my trusty old gcc 2.95.2 (an actual software caused sig 11). So I installed gcc 3.2, the latest. And yes, many things have trouble, probably because their C++ isn't entirely up to the standard, but it's still irritating. Also some .configure scripts seems to get confused when the gcc version is 3.2. Keeping both around is doable, but not as smooth as I'd want it.

    This system is fun, and everything is *exactly* like I want it, but I'll go to some "real" distro on my next computer.

  • One point that installing LFS drives home: GNU/Linux is a totally fair name. If I recall correctly, of the LFS version I installed, 45 of 61 packages came from, and some others were also part of the project. Calling my system a GNU system is actually more accurate than calling it Linux. But I'll reserve that name for systems running Hurd.
  • I learn't an awful lot doing this, but still have far more to learn yet. That's why I've begun trawling through Beyond LFS. The LFS documentation is very good. If you want to know more about a particular package read the INSTALL and README files after unpacking the file under /usr/src.

    I haven't seen Gentoo so I cannot compare, but I can say I'm very chuffed to boot up my very own linux distro and to spend time building upon the LFS foundation (and all the time my understanding of linux grows too!).

    Thanks to the LFS team for their efforts and respect to you all.................

I was playing poker the other night... with Tarot cards. I got a full house and 4 people died. -- Steven Wright