Linux From Scratch

Version 5.1-pre1

Gerard Beekmans

This book describes the process of creating a Linux system from scratch, using nothing but the sources of the required software.


Dedication

This book is dedicated to my loving and supportive wife Beverly Beekmans.

Table of Contents
Preface
Foreword
Audience
Who would want to read this book
Who would not want to read this book
Prerequisites
Structure
Part I - Introduction
Part II - Preparing for the build
Part III - Building the LFS system
Part IV - Appendices
I. Part I - Introduction
1. Introduction
How things are going to be done
Conventions used in this book
Book version
Changelog
Resources
Acknowledgments
2. Important information
About $LFS
About SBUs
About the test suites
How to ask for help
II. Part II - Preparing for the build
3. Preparing a new partition
Introduction
Creating a new partition
Creating a file system on the new partition
Mounting the new partition
4. The materials: packages and patches
Introduction
All the packages
Needed patches
5. Constructing a temporary system
Introduction
Toolchain technical notes
Creating the $LFS/tools directory
Adding the user lfs
Setting up the environment
Installing Binutils-2.14 - Pass 1
Installing GCC-3.3.2 - Pass 1
Installing Linux-2.4.24 headers
Installing Glibc-2.3.3
"Locking in" Glibc
Installing Tcl-8.4.5
Installing Expect-5.40.0
Installing DejaGnu-1.4.4
Installing GCC-3.3.2 - Pass 2
Installing Binutils-2.14 - Pass 2
Installing Gawk-3.1.3
Installing Coreutils-5.0
Installing Bzip2-1.0.2
Installing Gzip-1.3.5
Installing Diffutils-2.8.1
Installing Findutils-4.1.20
Installing Make-3.80
Installing Grep-2.5.1
Installing Sed-4.0.9
Installing Gettext-0.14.1
Installing Ncurses-5.3
Installing Patch-2.5.4
Installing Tar-1.13.25
Installing Texinfo-4.6
Installing Bash-2.05b
Installing Util-linux-2.12
Installing Perl-5.8.3
Stripping
III. Part III - Building the LFS system
6. Installing basic system software
Introduction
Entering the chroot environment
Changing ownership
Creating directories
Mounting the proc and devpts file systems
Creating essential symlinks
Creating the passwd, group and log files
Creating devices with Makedev-1.7
Installing Linux-2.4.24 headers
Installing Man-pages-1.65
Installing Glibc-2.3.3
Re-adjusting the toolchain
Installing Binutils-2.14
Installing GCC-3.3.2
Installing Coreutils-5.0
Installing Zlib-1.2.1
Installing Lfs-Utils-0.4.2
Installing Findutils-4.1.20
Installing Gawk-3.1.3
Installing Ncurses-5.3
Installing Vim-6.2
Installing M4-1.4
Installing Bison-1.875
Installing Less-381
Installing Groff-1.19
Installing Sed-4.0.9
Installing Flex-2.5.4a
Installing Gettext-0.14.1
Installing Net-tools-1.60
Installing Inetutils-1.4.2
Installing Perl-5.8.3
Installing Texinfo-4.6
Installing Autoconf-2.59
Installing Automake-1.8.2
Installing Bash-2.05b
Installing File-4.07
Installing Libtool-1.5.2
Installing Bzip2-1.0.2
Installing Diffutils-2.8.1
Installing Ed-0.2
Installing Kbd-1.12
Installing E2fsprogs-1.34
Installing Grep-2.5.1
Installing Grub-0.94
Installing Gzip-1.3.5
Installing Man-1.5m2
Installing Make-3.80
Installing Modutils-2.4.26
Installing Patch-2.5.4
Installing Procinfo-18
Installing Procps-3.1.15
Installing Psmisc-21.4
Installing Shadow-4.0.4.1
Installing Sysklogd-1.4.1
Installing Sysvinit-2.85
Installing Tar-1.13.25
Installing Util-linux-2.12
Installing GCC-2.95.3
Revised chroot command
Installing LFS-Bootscripts-1.12
About debugging symbols
7. Setting up system boot scripts
Introduction
How does the booting process with these scripts work?
Configuring the setclock script
Do I need the loadkeys script?
Configuring the sysklogd script
Configuring the localnet script
Creating the /etc/hosts file
Configuring the network script
8. Making the LFS system bootable
Introduction
Creating the /etc/fstab file
Installing Linux-2.4.24
Making the LFS system bootable
9. The End
The End
Get Counted
Rebooting the system
What now?
IV. Part IV - Appendices
A. Index of packages
B. Index of programs and library files