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.
Re:Why LFS indeed? (Score:2, Interesting)
jonathan
The Way to Learn (Score:4, Interesting)
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.
LFS as the basis for a distro (Score:2, Interesting)
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.
Re:Gentoo config files (Score:1, Interesting)
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:This is only slightly off-topic but, (Score:4, Interesting)
Re:Gentoo? (Score:3, Interesting)
Re:educational value (Score:3, Interesting)
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).
Re:LFS is really good (Score:2, Interesting)
Re:Why LFS indeed? (Score:3, Interesting)
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.
The scope of "entirely from scratch" (Score:2, Interesting)
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. [netspace.net.au]
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 [netspace.net.au]
How to Write an Operating System [uiuc.edu]
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 [sourceforge.net]
muLinux [sunsite.auc.dk]
Re:Gentoo is a great iso-linux distro (Score:2, Interesting)
Just installed LFS the other day (Score:2, Interesting)
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.................