Linux from Scratch

libro sui sistemi operativi a kernel Linux

Template:Tradurre Linux From Scratch e' un libro scritto da Gerard Beekmans e altri. In quel libro sono date le instruzioni su come costruire un sistema Linux da zero. Il libro e' scaricabile gatuitamente dal sito di Linux From Scratch la cui versione corrente e' la 5.1.1. Per mantenere LFS piccolo e aggiornato, e' stato creato il libro Beyond Linux From Scratch che presenta le istruzioni su come sviluppare cio' che viene dopo il sistema base creato con LFS.

Linux From Scratch (LFS) is a way to install a working Linux system by building all components of it manually. This is, by design, much more labour-intensive than installing a pre-built distribution (see Linux distribution). The idea is that installing the individual packages one-by-one will lead to an understanding of the internals of a working Linux system. In addition, of course, compiling all of the software specifically for the system on which it will run tends to result in smaller and faster programs. Finally, it is easier to customize the installed packages when each is installed manually - "Your distro, your rules".

To build LFS, the builder needs a clean partition and a working Linux system. First a toolchain must be compiled consisting of the tools used to compile LFS like gcc, glibc and Perl. Then the root directory must be changed to the toolchain's partition to start building the final system. One of the first packages to compile is glibc; after that, the toolchain's linker must be adjusted to link against the newly built glibc, so that all other packages that will make up the finished system can be linked against it as well. When the final version of one package is installed, bash prefers to use it instead of the temporary toolchain ones. This is achieved by switching off the hashing of bash and setting the toolchain's bin directory to the end of environment variable PATH.