Linux From Scratch
|
LFS_logo.png
Linux From Scratch (LFS) is the name of a book written by Gerard Beekmans and others. In that book the reader is given instructions on how to build a Linux system from source. The book is available freely from the Linux From Scratch website and is currently in version 6.0. To keep LFS small and focused, the Beyond Linux From Scratch book was created which presents instructions on how to further develop the basic Linux system that was created in 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 (using chroot) 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 the packages are installed, bash needs to prefer to use them instead of the temporary toolchain ones. This is achieved by switching off the hashing of bash and setting the temporary toolchain's bin directory to the end of environment variable PATH in the new environment.
See also
External links
- Linux From Scratch (http://www.linuxfromscratch.org/)
- Beyond Linux From Scratch (http://www.linuxfromscratch.org/blfs/)
- LFS Wiki (http://wiki.linuxfromscratch.org/).
- How to make a LFS Linux bootable CD (http://www.stockwith.uklinux.net/hints/).de:Linux From Scratch
et:Linux From Scratch es:Linux From Scratch fr:Linux From Scratch it:Linux From Scratch ja:Linux from Scratch pl:Linux From Scratch vi:Linux from Scratch