Linux From Scratch 11.3
Date: 2023-07-28
About Linux From Scratch
GNU/Linux distributions are defined in large part by their package manager: these are programs that handle the
installation, updating, and configuration of other programs on the host. Linux From Scratch is a book that
teaches the reader a way to compile a functional GNU/Linux operating system without the use of such a program.
The reader is left with an
operating system akin to a base install of Arch Linux at the end of the project, and that is where the sequel
book Beyond Linux From Scratch comes in.
Why I Recommend The Project
LFS can provide users with a greater understanding of: the standards that LFS is structured around, what
functionality each program within the project adds to an operating system, how cross-compilation is achieved, and
how they might troubleshoot compilation and configuration errors.
Advice On Undertaking The Project
- A basic knowledge of the GNU Core Utilities, disk partitioning, and
common network protocols is recommended before beginning.
- Try not to rush: it is easy to just copy and paste the commands for each section without processing what each
piece does.
- LFS requires the installation of one of two init systems, SysVinit or Systemd, the latter is more commonly used
in
modern distributions, but the former has more documentation available due to its age.
- If the host's operating system utilizes SELinux, it is fairly common to
encounter errors
when compiling Attr; LFS documentation and online discussion advise building on an install without SELinux or
manually disabling it and erasing the attributes it has assigned to each object in
the filesystem.
- The LFS variable should be set within both the primary user and root account's .bash_profile or .bashrc as
explained
in Section 2.6 as it is common for users to accidentally damage their host OS by referencing the
variable in a command without it being set for that user.
- LFS does not carry over the MAKEFLAGS variable, which specifies how many jobs can be running at the same
time, when entering the chroot environment: compile times can be significantly reduced by reapplying the
MAKEFLAGS variable or specifying -jx (where x is the number of threads available) in each make command.
- If the LFS install is intended to run in a virtualized environment, the UUID and PARTUUID of
the
root partition must generally be specified in grub.cfg as explained in Section 10.4.4 to avoid boot failure.
- Using LFS as a daily driver
is often discouraged due
to the complexities of upgrading the GNU C Library, which many system utilities depend on, as explained in Section 8.2.1.