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."
By IBM
I want mine with hello kitty all over it
Beware the Jubjub bird, and shun the frumious Bandersnatch.
With LFS reaching 6.0 a while ago, how is this news exactly?
Step 1: Build your own linux distribution. Step 2: Distribute. Step 3: ??? Step 4: Profit!
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.
found a great primer: http://www.ccoss.org/tutorials/lfs/Linux_from_Scra tch_A_Tour.htm
FTFA: ;-)
"The Linux kernel is unlikely to split into competing forks -- corporate upheavals notwithstanding -- because the GNU Public License (GPL), the existence of a centralized research lab -- the Open Source Development Lab (OSDL) -- and Linus Torvalds' unassailable position make Linux, luckily, a slow-moving target"
Makes no sense. "Corporate upheavals nothwithstanding" -- how do corporates have anything to do with Linux?
GPL -- I thought the very spirit of the GPL was to allow everyone to make their own forks
Centralised Research Lab: I thought the very spirit of Linux was to have voluntary developers from around the world, not people working in some centralised lab.
Linus Torvalds' unassailable position --- This is the only one that makes sense. Everyone loves and trusts Linus so much that they wouldn't want to fork
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]. )
This LFS project has been around for years, shall I post that this new Debian distro has just been released? Come on guys..
People have been doing LFS for years. It's nothing really too new or significant.
It's not even a really good way to learn about how "Linux the OS" works. It's just another way of spending an inordinate amount of time tinkering with your computer (not that there's anything wrong with that).
If you want the benefits of LFS without the pain, just stick with Gentoo or Sorcerer Linux and let someone else worry about the sources. You still get the custom compilation benefits but don't have to waste time trying to track down stupid dependency problems (at least not as much as you would with LFS, but more than with a mainstream distro).
http://www.linuxfromscratch.org/
Since it wasn't linked in the main thingamjig, you might want to check this out: http://www.linuxfromscratch.org/ Notice, when you look at that, LFS is now at version 6.0. Solid proof that this isn't actually "new" at all. =) I can remember building LFS 3.0 actually on an old pentium 150... just made some scripts for it and left the PC on overnight.
who succeed in getting their own build running will learn a lot from this experience. The others will switch to Windows. - Hubbah
this is old news... why posted on slashdot ?
I can't wait for Microsoft's response and rebuttal entitled "How to steal an core concepts, and pass them off as your own operating system"
"I'm going to f***ing bury that guy, I have done it before, and I will do it again. I'm going to f***ing kill Google"
...when the internals of Linux are elegant enough to be worth learning.
Watch out Digg.com! Slashdot is coming to claim your turf on ancient web content! We're gonna out-digg you! Or digg you out! Or digg.... dugg?
-- mumbles incoherently ---
... but seeing an article about LFS in the index section feels like travelling back in time.
If only there were something like an article about Apple switching to Intel below, the effect would be complete...
---- MISSING MISCELLANEOUS DATA SEGMENT --- [sigdash] trolololol
...if you have all the time in the world. The single biggest advantage to Linux, for me at least, is that it allows me to get my job done faster and more cheaply (although I sometimes wonder if thats the case when something goes wrong).
I think the single biggest disadvantage to Linux is the amount of knowledge needed to do most things. I have been using one version of Linux or another for about 4 years and only now do I really feel like I know how to use it. If you start telling people they have to build the whole thing themselves there isn't a hope in hell they will switch.
As long as this is aimed at the interested minority who perhaps are activly involved in putting together a distribution fair enough but it would be suicide to promote this approach to the general populous.
I used to have a better sig but it broke.
LFS is a nice way to learn more about Linux, I built LFS on a box a few years ago, and probably learned more about Linux doing so than I ever could have just from using it, or just from reading books targed at a specific distribution.
That said though, I don't think it's very practicle for a system that you actually want to use for day to day use. Building a Linux system from scratch takes a lot of time, and then you have to keep track of all of the security patches for all of the packages you used, and if you want to upgrade one of the core libraries for some reason you end up having to rebuild most of the system.
Building a distro for scratch is a fun way to learn, and I encourage hobbiests who are interested in learning how a linux system works to do so, but unless you have a critical mass of people contributing patches, helping with stuff, etc, then you end up spending all your time keeping the distro up to date, and no time actually using the system.
Which, if your just in it for the hobbiest aspect isn't necessarily a bad thing, but I still think it's generally impracticle if you want to have an actually usuable distribution.
Famous Last Words: "hmm...wikipedia says it's edible"
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
Next week: Fire - A How-To Guide
(A disturbance in the force, as though an entire audience with Asperger's was thinking: "was that supposed to be funny?")
This is humor. Laugh damnit, laugh!
You're right - this is a mixed blessing. Sure, making your own distro is great and all, but it can only make things more confusing for new Linux users (and believe me, the more the better). It's a great idea, to be able to build your own distribution - don't get me wrong - but as I said, some users could be fazed, and yet others put off from Linux by malicious distributions - better, methinks, to stick with 'safe' ones such as SUSE, Mandrake, Fedora Core, etc., and to a lesser extent Gentoo.
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.
I really don't see how anyone could use LFS as anything but "build it, learn how it works, delete it". There are so many security bugs fixed from package release to package release, it would be a full time job to keep track of all of them. Then, the ONE package you overlooked gets compromised and you're owned.
It's probably one of the most common security problems - making a system secure is very hard. Even security experts fail at this. Doing it yourself is only going to make you repeat the errors which have been corrected in other distros.
The only security you could get is security through obscurity, which is not security.
i dint RTFA but from the synopsis provided, its a tutorial on how to build your own distro from scratch. its not talking about LFS but how to USE lfs to BUILD YOUR OWN DISTRO.
think about that for a moment.
again: how to USE LFS to BUILD YOUR OWN DISTRO.
thank you
_ In Egypt Networks: Network Solutions with a Twist
We're trying to create a new distro especially for elderly people. What we did is to start with a livecd based on Gentoo catalyst. Took us some weeks to create something bootable, but we are up and running with a pre-beta now... BTW:anyone with ideas for a nice logo?
Debian? Ubuntu?
Try out fish, the friendly interactive shell.
lived from a LFS distro: http://lfs.osuosl.org/hints/downloads/files/2.6-ud ev-nptl-bootcd.txt
package management:
http://linuxfromscratch.org/~gerard/log-install
http://linuxfromscratch.org/~gerard/pkgdel
and
http://lfs.osuosl.org/hints/downloads/files/rpm.tx t
reinstalling LFS (for toolchain updates):
http://lfs.osuosl.org/alfs
oh wait, so is saying that...
Anyway, does anyone know of a book like LFS except aimed at making you're own bootscripts?
and want to take the shortcut there's http://www.rocklinux.org/
See my blog for my free opinions.
It takes a while, but you really learn about the inners of Linux, and it will help you understand a lot. For anyone serious about being a Linux user, the LFS experience is mandatory.
Do you play with your Willy?
his is only the second post saying that LFS is not new. It's not really redundant yet.
Was it said already? Yes? Then yes it was redundant.
redundant:
adj 1: more than is needed, desired, or required;
Only one post stating that is needed, desired or required.
My Suburban burns less gasoline than your Prius.
Since when did it become law for everyone to release every distro they make? I don't think this is going to be as much of a problem as you make out. The newbie linux user is more likely to end up with one of the 'safe' distros anyway.
We probably don't need any more general purpose distributions, but the value in a kit for making a new distribution is for specialised applications. There are various router/firewall projects and a couple of DAW (Digital Audio Workstation) packages that come in to this category, for example. There's lots of potential for whole applications that boot from a CDROM like Knoppix and can be temporarily used on an PC without touching what was installed on the HD.
Yes, now you too can learn to fork your favorite linux distribution, adding to the gabazillion other ones already out there! Just 5.95 plus 93.95 S&H and it can all be yours!
Gotta love how you managed to insinuate that you actually programmed for a living.
I guess if you consider shell scripts *guffaw* to be programs, then maybe...
No. Not a programmer. Just a password-changer.
Maintaining a Linux distro is pretty much work. You will end up with zillions of packages that YOU don't even care, but only others would like to have. Building a distro from scratch is somehow obsolete these days that we have Gentoo - which does exactly that. But all scripted. You can customize Gentoo exactly how you want it by putting your own or modified ebuilds into the overlay portage tree.
I'm not sure I want to totally build LINUX from Scratch. I can't see how it teaches you how an operating system really works. I built two operating systems from texts: MINIX from Tannenbaum's book and Oberon from Wirth's book. I had to constantly communicate with other people on the net to get files and resolve issues with MINIX because the book doesn't give you a complete operating system, but it was well worth the effort even though my finished product was missing major functions. Oberon was an incredible learning experience even though the books cost me several hundred dollars more than I could have spent for a good OS. Once I learned some principles of OS, books on LINUX internals and tuning into the developer's lists were enough to convince me that no amount of single-handed effort on my part would be worth the time needed to get the results of almost any co-ordinated distro team. The ONLY reason I'd build LFS is to have a custom OS for a task that normal distros didn't do.
I say "more power to ya" for those who have the desire to try.
Yes, but is it not possible that the other comment wasn't on the page yet when he submitted his? I mean, by punished the first repititon of a particular comment it then becomes risky to say anything! What if someone else just said that +5 insightful nugget! Then you'll get -1, redundant. Better keep that possibly repetitive comment to yourself.
The mod guidelines say you should concentrate on modding UP for just this reason.
I built an LFS system a while back. It was great fun, and if nothing else, it taught me how to compile from source - something I'd always been a bit afraid of doing before. After all, if I messed up, how did I delete the files? The package manager wouldn't do it for me. . .
Some people are saying it teaches you a lot, and others are saying it's no better than any other distro.
I think installing LFS is like buying home gym equipment. Buying an excercise bike isn't going to make you fit, installing LFS isn't going to teach you a great deal.
All either does is provide you with an opportunity to get what you want. You CAN use excercise equipment to get fit; You CAN use LFS to learn a lot about Linux.
If you just follow the LFS instructions and leave it at that, you'll probably be wasting your time. If you take the time to read around what you're doing, so you understand exactly WHY you're doing what you're doing, you'll learn a great deal.
And if you go on to Beyond LFS, you'll come to truly appreciate package managers. When you've done the "To install A, I need B, which requires C, which relies on D. . . " thing a few times, you'll REALLY understand why package management is such a big topic. The amount of running around I had to do to get FVWM running. . .
I liked my LFS install, but once I had overcome the challenge of getting it working, it just became a chore to KEEP it working. So I switched to Gentoo, which is no effort at all to keep up-to-date.
But I'm glad I did LFS first.
So.. it has come to this
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!
lol you are a fucking jew.
I have linux experience about 10 years, but haven't succeeded in creating my own distro. I can compile a nice kernel for my PC, write it to floppy and boot it, but after that comes a moment when init and rc-scripts need to take the control over and just at this step I fail, if I consider my own LFS. In case of Windows98, it is quite simple to make a boot floppy with CD-ROM support, add a stripped-down version of Norton Commander and you have a nice tool. In Linux, the same task is extremely difficult. In general, it is very difficult to find in Internet a good 1-floppy linux (Tomsrbt is not good due to nonstandard 1.7 Mb).
Because there can never be enough.
But modding UP doesn't give the moderators thier little power-trip hard on.
LFS is old and has been reported on Slashdot before. And how does watching compiler output scroll past a screen teach a person how Linux works? I'm a Gentoo user myself but I admit that using Portage to install packages from source hasn't taught me anything about how Linux works. That came from reading manuals, etc. The only part of Portage that taught me anything about Linux was the broken packages. Then I'd have to track down the bugs and any patches posted for them or fix things myself.
Sorry, my karma just ran over your dogma.
He didn't want them to respond, he wanted them to all stand in line and wait. (and wait. and wait ...)
Building your own Linux distribution is like building your own airplane.
People build their own airplanes not because they want Airplane X or Feature Y, they do it because they want to build an airplane. They want to take control of the construction process and be intimately familiar with the final product. They want to learn how the various airplane systems function. They will not necessarily learn the detailed workings of an internal combustion engine, but they will learn how it interacts with other systems.
The same is true with LFS. If you want a generic Linux distribution, then install Fedora, Gentoo, Debian, or whatever suits you. However, if you want to build your own Linux distribution, if want to take control and be intimately familiar with the final product, then LFS is the way to go. You will learn how the various components function. You will not necessarily learn the detailed workings of the Linux kernel, but you will learn how it interacts with other system components.
from the summary:
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
Simply put this is the first one that addresses the Linux philosophy head-on; Linux is used to make Linux, using Linux you can make your own Linux distribution, how great!
I built a basic LFS system about a year ago. It was a very educational experience. One of the things that I learned was that current vanilla sources often won't work "out of the box". Lots of the source packages (even current versions) have to be patched to make them work on LFS. Obviously, you have to patch to fix bugs, but some of these pataches were just to get things to work at all. I didn't expect that and it was very suprising. One would think that the source's author(s) would make their stuff work "out of the box" on Linux (seeing how it is a very common and expected target).
I would have never figured out myself which sources needed patches. Thank God for distribution maintainers for figuring this out for us.
I wonder if that decision was made before or after 9/11...
Escher was the first MC and Giger invented the HR department.
... it would be just like Slackware. So why not just use Slackware.
GETPKG - Package Management for Slackware
We have too many distro's out there now. We need a new distro like we need a new hole in the head.
Why ?
Chris ,
Php Programmers.
When we look to Windows admins, do they need to install it from scratch to understand the internals and how to repair things? No!
And that's exactly the same here. We don't need to know how to compile things to know how they interact and how to repair what's broken. Yes, you can learn to assemble an OS but WHO CARES? All the enterprises or people you'll met will ALL used canned distributions of Linux. They all have their own problems installing but also have their way to solve it.
If you want to learn the system internal do it with a distro you like. Install packages one by one and see how they work, what they do, etc. but don't give you the trouble to compile all from scratch.
If you are still searching problems to solve to learn something after that, check out your distro's bug tracker. I'm sure they'll appreciate you helping them solve the thousand problem there are!
you can make it from scratch just by downloading the source tar balls from kernel.org, make menuconfig ; make bzImage ; make modules modules_install
Finally I can go to Soviet Russia and let the Operating system create me! Then Name it "Boobies Linux"... Well hey it might happen, YOU Insensitive Clod!!
Because you know mindlessly boostrapping gcc and watching the compilation script blast through your monitor for several hours straight makes you a Linux guru....
All children left unattended will be sold as slaves.
Saying the only way to learn Linux is by building from source is like saying the only way to program in C is to build a C compiler from scratch. This is like those who say that in order to properly learn how to program you should learn assembly language first. How many java programmers do you know who would be able to pound out byte code? Yeah I know, there's some 13 year old who is gonna reply to this saying that he can pound out an enterprise level java app in byte code faster that he can in java, but does anyone really believe that?
Im looking to sort out my current computer situation. Ive been using windows for years and now it begins to bore me with it's slow processing times and it's general shiteness all round.
Linux, however, seems to be a very reliable OS (indeed, Ive used Mandrake 9 for a while and it did everything i needed it to) the only problem is that no-one seems to want it to look nice like windows does.
Assuming that what I have heard it true, and the mac osx+ runs on Unix... what is the problem with getting mac OSx to run on wintel machines? The OS is beautiful to look at and the stability is unchallenged. IT MUST be possible to rig this up - has anyone else tried? if so, did it work and where can I get a copy?
Failing that, if anyone can tell me where i can get a Linux dist that actually looks like it was compiled in the last ten years?
cheers.
Hmm... I wonder who said that... let's try it again:
Who said news have to be about something new?
Idiot.
While not 'news' its still a nice story, for those that missed it the last 15 times on here..
---- Booth was a patriot ----
" Contrary to popular belief, most people do not use Gentoo for optimization or learning"
Then why does every Gentoo user I've ever seen say exactly that? I think your way off. Gentoo users do mention how they like the Gentoo manages itself and how they are "in control", but 90% of the time I hear about how their OS is "optimized" unlike Red Hat etc and how they are learning what's going on "under the hood".
If you wanna get rich, you know that payback is a bitch
"How to Build Your Own Linux Distribution"
Klaus Knopper's Knoppix has encouraged many people build their own distro. Most of these have instructions for remastering the disk and creating a personal Linux disro on a bootable CD.
I'm fond of:
GeeXbox - multimedia player, plays my DVDs on a old machine.
SLAX - based on Slackware, detailed instructions for remastering. Has quite a community around it.
Austrumi - Loads into memory and then ejects the CD. Browser, word processor, Email, multimedia, games, more. It's only a 48 M download, I love it.
Puppy - Good reviews but doesn't work on my hardware.
DamnSmallLinux - Fits on a miniCD. A community is growing around this one also.
1000 SlashDot sigs
The killer app in this distro is the NT password utility.
Pretty much I just got a Linspire disk, took a sharpy to it and wrote "MY LINUX" on it.
Worked great. Installed everything just fine, found all my device drivers, rebooted and runs great.
MadOgre.com
I didn't start completely from scratch, but I spent the better part of February through May putting together my own distribution based on packages from different versions of Red Hat Enterprise, Fedora, and a few other packages I put together myself. It gave my a new respect for package maintainers -- there's an awful lot of work that goes in to not only ensure the individual packages install and run properly, but that all the dependencies are there and the different programs interact properly, and at the same time keep up to date with bug fixes and security patches.
On the other hand, I'm a bit disgusted at the way some of the stock packages are built, because in some cases there are customizations patched in that I really don't want, libraries removed due to licencing issues (real or perceived), and dependencies on bleeding-edge software that doesn't need to be there.
I'm happy to say that as of a couple of weeks ago, I successfully installed my custom distribution on my home computer and have had only a few minor glitches pop up while using it. After I get those weeded out, I'll be installing it at work!
Somebody here said that LFS is better when you have a script to run its installation steps overnight in unattended mode. SourceMage is this kind of script, only more. If you're keen on LFS, want to learn Linux, but don't have patience to go through mundate things (like typing ./configure approximately 1,000,000 times, including false starts), please check out SourceMage. We won't disappoint.