Linux From Scratch

Version 6.6

Created by Gerard Beekmans

Edited by Matthew Burgess and Bruce Dubbs


Legal Notice

Copyright © 1999-2010, Gerard Beekmans

All rights reserved.

This book is licensed under a Creative Commons License.

Computer instructions may be extracted from the book under the MIT License.

Linux® is a registered trademark of Linus Torvalds.


Preface
1. Foreword
2. Audience
3. LFS Target Architectures
4. LFS and Standards
5. Rationale for Packages in the Book
6. Prerequisites
7. Host System Requirements
8. Typography
9. Structure
9.1. Part I - Introduction
9.2. Part II - Preparing for the Build
9.3. Part III - Building the LFS System
10. Errata
I. Introduction
1. Introduction
1.1. How to Build an LFS System
1.2. What's new since the last release
1.3. Changelog
1.4. Resources
1.4.1. FAQ
1.4.2. Mailing Lists
1.4.3. IRC
1.4.4. Mirror Sites
1.4.5. Contact Information
1.5. Help
1.5.1. Things to Mention
1.5.2. Configure Script Problems
1.5.3. Compilation Problems
II. Preparing for the Build
2. Preparing a New Partition
2.1. Introduction
2.2. Creating a New Partition
2.2.1. Other Partition Issues
2.3. Creating a File System on the Partition
2.4. Mounting the New Partition
3. Packages and Patches
3.1. Introduction
3.2. All Packages
3.3. Needed Patches
4. Final Preparations
4.1. About $LFS
4.2. Creating the $LFS/tools Directory
4.3. Adding the LFS User
4.4. Setting Up the Environment
4.5. About SBUs
4.6. About the Test Suites
5. Constructing a Temporary System
5.1. Introduction
5.2. Toolchain Technical Notes
5.3. General Compilation Instructions
5.4. Binutils-2.20 - Pass 1
5.4.1.
5.4.2. Installation of Cross Binutils
5.4.3.
5.5. GCC-4.4.3 - Pass 1
5.5.1.
5.5.2. Installation of Cross GCC
5.5.3.
5.6. Linux-2.6.32.8 API Headers
5.6.1.
5.6.2. Installation of Linux API Headers
5.6.3.
5.7. Glibc-2.11.1
5.7.1.
5.7.2. Installation of Glibc
5.7.3.
5.8. Adjusting the Toolchain
5.9. Binutils-2.20 - Pass 2
5.9.1.
5.9.2. Installation of Binutils
5.9.3.
5.10. GCC-4.4.3 - Pass 2
5.10.1.
5.10.2. Installation of GCC
5.10.3.
5.11. Tcl-8.5.8
5.11.1.
5.11.2. Installation of Tcl
5.11.3. Contents of Tcl
5.12. Expect-5.43.0
5.12.1.
5.12.2. Installation of Expect
5.12.3. Contents of Expect
5.13. DejaGNU-1.4.4
5.13.1.
5.13.2. Installation of DejaGNU
5.13.3. Contents of DejaGNU
5.14. Ncurses-5.7
5.14.1.
5.14.2. Installation of Ncurses
5.14.3.
5.15. Bash-4.1
5.15.1.
5.15.2. Installation of Bash
5.15.3.
5.16. Bzip2-1.0.5
5.16.1.
5.16.2. Installation of Bzip2
5.16.3.
5.17. Coreutils-8.4
5.17.1.
5.17.2. Installation of Coreutils
5.17.3.
5.18. Diffutils-2.8.1
5.18.1.
5.18.2. Installation of Diffutils
5.18.3.
5.19. Findutils-4.4.2
5.19.1.
5.19.2. Installation of Findutils
5.19.3.
5.20. Gawk-3.1.7
5.20.1.
5.20.2. Installation of Gawk
5.20.3.
5.21. Gettext-0.17
5.21.1.
5.21.2. Installation of Gettext
5.21.3.
5.22. Grep-2.5.4
5.22.1.
5.22.2. Installation of Grep
5.22.3.
5.23. Gzip-1.4
5.23.1.
5.23.2. Installation of Gzip
5.23.3.
5.24. M4-1.4.13
5.24.1.
5.24.2. Installation of M4
5.24.3.
5.25. Make-3.81
5.25.1.
5.25.2. Installation of Make
5.25.3.
5.26. Patch-2.6.1
5.26.1.
5.26.2. Installation of Patch
5.26.3.
5.27. Perl-5.10.1
5.27.1.
5.27.2. Installation of Perl
5.27.3.
5.28. Sed-4.2.1
5.28.1.
5.28.2. Installation of Sed
5.28.3.
5.29. Tar-1.22
5.29.1.
5.29.2. Installation of Tar
5.29.3.
5.30. Texinfo-4.13a
5.30.1.
5.30.2. Installation of Texinfo
5.30.3.
5.31. Stripping
5.32. Changing Ownership
III. Building the LFS System
6. Installing Basic System Software
6.1. Introduction
6.2. Preparing Virtual Kernel File Systems
6.2.1. Creating Initial Device Nodes
6.2.2. Mounting and Populating /dev
6.2.3. Mounting Virtual Kernel File Systems
6.3. Package Management
6.3.1. Upgrade Issues
6.3.2. Package Management Techniques
6.3.3. Deploying LFS on Multiple Systems
6.4. Entering the Chroot Environment
6.5. Creating Directories
6.5.1. FHS Compliance Note
6.6. Creating Essential Files and Symlinks
6.7. Linux-2.6.32.8 API Headers
6.7.1.
6.7.2. Installation of Linux API Headers
6.7.3. Contents of Linux API Headers
6.8. Man-pages-3.23
6.8.1.
6.8.2. Installation of Man-pages
6.8.3. Contents of Man-pages
6.9. Glibc-2.11.1
6.9.1.
6.9.2. Installation of Glibc
6.9.3. Configuring Glibc
6.9.4. Configuring the Dynamic Loader
6.9.5. Contents of Glibc
6.10. Re-adjusting the Toolchain
6.11. Zlib-1.2.3
6.11.1.
6.11.2. Installation of Zlib
6.11.3. Contents of Zlib
6.12. Binutils-2.20
6.12.1.
6.12.2. Installation of Binutils
6.12.3. Contents of Binutils
6.13. GMP-5.0.0
6.13.1.
6.13.2. Installation of GMP
6.13.3. Contents of GMP
6.14. MPFR-2.4.2
6.14.1.
6.14.2. Installation of MPFR
6.14.3. Contents of MPFR
6.15. File-5.04
6.15.1.
6.15.2. Installation of File
6.15.3. Contents of File
6.16. GCC-4.4.3
6.16.1.
6.16.2. Installation of GCC
6.16.3. Contents of GCC
6.17. Sed-4.2.1
6.17.1.
6.17.2. Installation of Sed
6.17.3. Contents of Sed
6.18. Pkg-config-0.23
6.18.1.
6.18.2. Installation of Pkg-config
6.18.3. Contents of Pkg-config
6.19. Ncurses-5.7
6.19.1.
6.19.2. Installation of Ncurses
6.19.3. Contents of Ncurses
6.20. Util-linux-ng-2.17
6.20.1.
6.20.2. FHS compliance notes
6.20.3. Installation of Util-linux-ng
6.20.4. Contents of Util-linux-ng
6.21. E2fsprogs-1.41.10
6.21.1.
6.21.2. Installation of E2fsprogs
6.21.3. Contents of E2fsprogs
6.22. Coreutils-8.4
6.22.1.
6.22.2. Installation of Coreutils
6.22.3. Contents of Coreutils
6.23. Iana-Etc-2.30
6.23.1.
6.23.2. Installation of Iana-Etc
6.23.3. Contents of Iana-Etc
6.24. M4-1.4.13
6.24.1.
6.24.2. Installation of M4
6.24.3. Contents of M4
6.25. Bison-2.4.1
6.25.1.
6.25.2. Installation of Bison
6.25.3. Contents of Bison
6.26. Procps-3.2.8
6.26.1.
6.26.2. Installation of Procps
6.26.3. Contents of Procps
6.27. Grep-2.5.4
6.27.1.
6.27.2. Installation of Grep
6.27.3. Contents of Grep
6.28. Readline-6.1
6.28.1.
6.28.2. Installation of Readline
6.28.3. Contents of Readline
6.29. Bash-4.1
6.29.1.
6.29.2. Installation of Bash
6.29.3. Contents of Bash
6.30. Libtool-2.2.6b
6.30.1.
6.30.2. Installation of Libtool
6.30.3. Contents of Libtool
6.31. GDBM-1.8.3
6.31.1.
6.31.2. Installation of GDBM
6.31.3. Contents of GDBM
6.32. Inetutils-1.7
6.32.1.
6.32.2. Installation of Inetutils
6.32.3. Contents of Inetutils
6.33. Perl-5.10.1
6.33.1.
6.33.2. Installation of Perl
6.33.3. Contents of Perl
6.34. Autoconf-2.65
6.34.1.
6.34.2. Installation of Autoconf
6.34.3. Contents of Autoconf
6.35. Automake-1.11.1
6.35.1.
6.35.2. Installation of Automake
6.35.3. Contents of Automake
6.36. Bzip2-1.0.5
6.36.1.
6.36.2. Installation of Bzip2
6.36.3. Contents of Bzip2
6.37. Diffutils-2.8.1
6.37.1.
6.37.2. Installation of Diffutils
6.37.3. Contents of Diffutils
6.38. Gawk-3.1.7
6.38.1.
6.38.2. Installation of Gawk
6.38.3. Contents of Gawk
6.39. Findutils-4.4.2
6.39.1.
6.39.2. Installation of Findutils
6.39.3. Contents of Findutils
6.40. Flex-2.5.35
6.40.1.
6.40.2. Installation of Flex
6.40.3. Contents of Flex
6.41. Gettext-0.17
6.41.1.
6.41.2. Installation of Gettext
6.41.3. Contents of Gettext
6.42. Groff-1.20.1
6.42.1.
6.42.2. Installation of Groff
6.42.3. Contents of Groff
6.43. GRUB-1.97.2
6.43.1.
6.43.2. Installation of GRUB
6.43.3. Contents of GRUB
6.44. Gzip-1.4
6.44.1.
6.44.2. Installation of Gzip
6.44.3. Contents of Gzip
6.45. IPRoute2-2.6.31
6.45.1.
6.45.2. Installation of IPRoute2
6.45.3. Contents of IPRoute2
6.46. Kbd-1.15.1
6.46.1.
6.46.2. Installation of Kbd
6.46.3. Contents of Kbd
6.47. Less-436
6.47.1.
6.47.2. Installation of Less
6.47.3. Contents of Less
6.48. Make-3.81
6.48.1.
6.48.2. Installation of Make
6.48.3. Contents of Make
6.49. Man-DB-2.5.6
6.49.1.
6.49.2. Installation of Man-DB
6.49.3. Non-English Manual Pages in LFS
6.49.4. Contents of Man-DB
6.50. Module-Init-Tools-3.11.1
6.50.1.
6.50.2. Installation of Module-Init-Tools
6.50.3. Contents of Module-Init-Tools
6.51. Patch-2.6.1
6.51.1.
6.51.2. Installation of Patch
6.51.3. Contents of Patch
6.52. Psmisc-22.10
6.52.1.
6.52.2. Installation of Psmisc
6.52.3. Contents of Psmisc
6.53. Shadow-4.1.4.2
6.53.1.
6.53.2. Installation of Shadow
6.53.3. Configuring Shadow
6.53.4. Setting the root password
6.53.5. Contents of Shadow
6.54. Sysklogd-1.5
6.54.1.
6.54.2. Installation of Sysklogd
6.54.3. Configuring Sysklogd
6.54.4. Contents of Sysklogd
6.55. Sysvinit-2.86
6.55.1.
6.55.2. Installation of Sysvinit
6.55.3. Configuring Sysvinit
6.55.4. Contents of Sysvinit
6.56. Tar-1.22
6.56.1.
6.56.2. Installation of Tar
6.56.3. Contents of Tar
6.57. Texinfo-4.13a
6.57.1.
6.57.2. Installation of Texinfo
6.57.3. Contents of Texinfo
6.58. Udev-151
6.58.1.
6.58.2. Installation of Udev
6.58.3. Contents of Udev
6.59. Vim-7.2
6.59.1.
6.59.2. Installation of Vim
6.59.3. Configuring Vim
6.59.4. Contents of Vim
6.60. About Debugging Symbols
6.61. Stripping Again
6.62. Cleaning Up
7. Setting Up System Bootscripts
7.1. Introduction
7.2. LFS-Bootscripts-20100124
7.2.1.
7.2.2. Installation of LFS-Bootscripts
7.2.3. Contents of LFS-Bootscripts
7.3. How Do These Bootscripts Work?
7.4. Configuring the setclock Script
7.5. Configuring the Linux Console
7.6. Configuring the sysklogd Script
7.7. Creating the /etc/inputrc File
7.8. The Bash Shell Startup Files
7.9. Device and Module Handling on an LFS System
7.9.1. History
7.9.2. Udev Implementation
7.9.3. Problems with Loading Modules and Creating Devices
7.9.4. Useful Reading
7.10. Creating Custom Symlinks to Devices
7.10.1. CD-ROM symlinks
7.10.2. Dealing with duplicate devices
7.11. Configuring the localnet Script
7.12. Customizing the /etc/hosts File
7.13. Configuring the network Script
7.13.1. Creating stable names for network interfaces
7.13.2. Creating Network Interface Configuration Files
7.13.3. Creating the /etc/resolv.conf File
8. Making the LFS System Bootable
8.1. Introduction
8.2. Creating the /etc/fstab File
8.3. Linux-2.6.32.8
8.3.1.
8.3.2. Installation of the kernel
8.3.3. Configuring Linux Module Load Order
8.3.4. Contents of Linux
8.4. Using GRUB to Set Up the Boot Process
8.4.1. Introduction
8.4.2. Setting Up the Configuration
8.4.3. Testing the Configuration
8.4.4. Updating the Master Boot Record
9. The End
9.1. The End
9.2. Get Counted
9.3. Rebooting the System
9.4. What Now?
IV. Appendices
A. Acronyms and Terms
B. Acknowledgments
C. Dependencies
D. Boot and sysconfig scripts version-20100124
D.1. /etc/rc.d/init.d/rc
D.2. /etc/rc.d/init.d/functions
D.3. /etc/rc.d/init.d/mountkernfs
D.4. /etc/rc.d/init.d/consolelog
D.5. /etc/rc.d/init.d/modules
D.6. /etc/rc.d/init.d/udev
D.7. /etc/rc.d/init.d/swap
D.8. /etc/rc.d/init.d/setclock
D.9. /etc/rc.d/init.d/checkfs
D.10. /etc/rc.d/init.d/mountfs
D.11. /etc/rc.d/init.d/udev_retry
D.12. /etc/rc.d/init.d/cleanfs
D.13. /etc/rc.d/init.d/console
D.14. /etc/rc.d/init.d/localnet
D.15. /etc/rc.d/init.d/sysctl
D.16. /etc/rc.d/init.d/sysklogd
D.17. /etc/rc.d/init.d/network
D.18. /etc/rc.d/init.d/sendsignals
D.19. /etc/rc.d/init.d/reboot
D.20. /etc/rc.d/init.d/halt
D.21. /etc/rc.d/init.d/template
D.22. /etc/sysconfig/rc
D.23. /etc/sysconfig/modules
D.24. /etc/sysconfig/createfiles
D.25. /etc/sysconfig/network-devices/ifup
D.26. /etc/sysconfig/network-devices/ifdown
D.27. /etc/sysconfig/network-devices/services/ipv4-static
D.28. /etc/sysconfig/network-devices/services/ipv4-static-route
E. Udev configuration rules
E.1. 55-lfs.rules
F. LFS Licenses
F.1. Creative Commons License
F.2. The MIT License
Index
n
Next Page
p
Previos Page
h
Book Home
u
Go Up One Level
?
Press ? for Help
esc
Hide Help

Press '?' for keyboard shortcuts

Your Ad Here