Linux From Scratch Without Going Into Details
Linux From Scratch Without Going Into Details
LFS is a book on how to build a working GNU / Linux operating system from source. Of course, it’s better to build the system yourself from this book. But if you spend a few days of your time, it’s a pity, but hunting is still to meet you - I’ll try to tell.
Based on Linux From Scratch, Version 7.3, in English.
I wanted to build LFS to better understand the Linux device, I hope you are interested in this too. I admit, there was one more desire - to collect reference, "vanilla" Linux. Alas, reference Linux exists only in the imagination of naive IT specialists.

Nevertheless, you can compile a wonderful working system from the LFS book, and by BLFS (this is the next book), add it to the full Linux Standard Base. This, incidentally, is reported in one of the first chapters.
The chapters are mostly short and concise. The language is simple and clear. Reading such a book is a pleasure.
The system is assembled by compiling all necessary programs from the source code — the kernel, the main C library, the compiler, the command line shell, etc. All packages with source codes are listed in the wget-list file. So downloading them all is very simple. The md5sum file is also provided for checking the integrity of files after downloading.
First you need to use some other linux (you can live-cd). Using its compiler and other tools, it builds the environment necessary for the assembly (compiler, linker). Results are placed in
/mnt/lfs/tools. Then, overhead mounted filesystems (
/mnt/lfs/proc -> /proc, /mnt/lfs/dev -> /dev, et al.) And usingchrootthe user session switches to using /mnt/lfsyour new Linux system as the root file system. And the folder is /toolsadded to the environment variable $PATH. Thus, as the tools are assembled, they will replace their temporary counterparts from /tools. 
With the help of a temporary system to re-gather all the tools, but this time they are placed in
/bin, /sbin, /lib. Then install download scripts from one of the downloaded packages. Next, the minimum configuration of the system (network, console, devices) is made. A file is created
/etc/fstab(disk configuration), the kernel is compiled and installed (FINALLY!), GRUB is configured, and a reboot is performed. All.It is worth mentioning that the book pretty well explains some points. For example: what kind of files are / etc / profile, ~ / .bash_profile, ~ / .bashrc and how they interact. Or it is explained how to use udev to configure the two network cards to always get the same names eth0, eth1. For each package, a list of all the programs included in it is provided with a brief description of each.