|
Helping ordinary people create extraordinary websites! |
How to Build Your Own Linux DistributionBy Frank Pohlmann2005-07-06
Linux From Scratch The LFS project is, obviously, based on the source files that are sufficient -- but not necessary -- to make up a basic Linux system. It has moved beyond the Linux kernel and the device drivers, because to produce a working Linux system, you have to add a complete compiler tool chain, a number of Linux assembler utilities, the glibc system library, system configuration tools, and tools connected to userland shell access. LFS is predicated on the assumption that a Linux or UNIX power user with some knowledge of scripting wants to get to know the workings of a complete usable system without having to delve into the kernel code itself. To get acquainted with the way a Linux system works, the creators of LFS decided that compiling the system by following the tree of module dependencies would be a natural way to get to know the mechanics of an operating system in general and Linux in particular. After users have mastered the compilation process, they can start eliminating those parts of the dependency tree connected to system components that are irrelevant to supporting the operating system's primary purpose. It is feasible, for instance, to eliminate the compiler tool chain itself after compilation is complete. Embedded LAMP stacks can make do without a full set of command-line utilities. Configuration utilities might be dropped, as well, and most users can make do with one, instead of the plethora of file systems Linux tends to support. Linux parts Now for the big caveat of LFS distributions: What a courageous distribution builder needs is a working Linux distribution, including a complete compiler tool chain and a suite of file system-creation utilities. Naturally, all source-based Linux distributions need to be bootstrapped using a particular compiler version, which is by no means identical from distribution release to distribution release. LFS is not the only system in this field, but it is the only system that allows you to work directly with individual source files. Most other source-based Linux systems, such as Sourcemage and MyGeOS, provide a complete download, which users are well advised to use. LFS makes no such assumption, and stripping down the LFS framework is encouraged. Presuppose a functioning Linux distribution installed on nonexotic hardware, even though LFS is probably less demanding as far as configuration tools and scripting are concerned. To compile LFS, you need to prepare a partition and a file system, and you also need to compile a compiler and system library. It is a fairly nerve-racking procedure if done by hand, but it definitely increases your confidence in dealing with the rest of the installation. The compilation of the whole system tends to take from an hour to four days, depending on the age of the underlying hardware and your command-line dexterity. If -- and this is a fairly big assumption -- you're willing to retain much of the book installation and keep changes to the installation proposed in the LFS book to a minimum, you could also use the automated installation routine to install an LFS-based distribution. The installation routine is not presented in the LFS book, but is available as an XML-based description under the name Automated Linux from Scratch (ALFS). The active installation is available as a C-based script that uses Automated Linux From Scratch Tutorial Pages: » Go to the source to learn Linux basics and build the right Linux for you » Why UNIX internals matter » Linux From Scratch » Beyond LFS » Hardened LFS » The growing LFS family » Resources First published by IBM DeveloperWorks
|
|