mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-06 06:14:47 +00:00
Prologue indentation.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7227 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
8e8f00393a
commit
b330f4a3a2
@ -1,91 +1,86 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="pre-audience">
|
||||
<title>Audience</title>
|
||||
<?dbhtml filename="audience.html"?>
|
||||
<?dbhtml filename="audience.html"?>
|
||||
|
||||
<para>There are many reasons why somebody would want to read this
|
||||
book. The principal reason is to install a Linux system
|
||||
from the source code. A question many people raise is, <quote>why go
|
||||
through all the hassle of manually building a Linux system from
|
||||
scratch when you can just download and install an existing
|
||||
one?</quote> That is a good question and is the impetus for this
|
||||
section of the book.</para>
|
||||
<title>Audience</title>
|
||||
|
||||
<para>One important reason for LFS's existence is to help people learn
|
||||
how a Linux system works from the inside out. Building an LFS system
|
||||
helps demonstrate what makes Linux tick, and how things work together
|
||||
and depend on each other. One of the best things that this learning
|
||||
experience provides is the ability to customize Linux to your own
|
||||
tastes and needs.</para>
|
||||
<para>There are many reasons why somebody would want to read this book.
|
||||
The principal reason is to install a Linux system from the source code.
|
||||
A question many people raise is, <quote>why go through all the hassle of
|
||||
manually building a Linux system from scratch when you can just download
|
||||
and install an existing one?</quote> That is a good question and is the
|
||||
impetus for this section of the book.</para>
|
||||
|
||||
<para>A key benefit of LFS is that it allows users to have more
|
||||
control over the system without relying on someone else's Linux
|
||||
implementation. With LFS, <emphasis>you</emphasis> are in the
|
||||
driver's seat and dictate every aspect of the system, such as the
|
||||
directory layout and bootscript setup. You also dictate where, why,
|
||||
and how programs are installed.</para>
|
||||
<para>One important reason for LFS's existence is to help people learn
|
||||
how a Linux system works from the inside out. Building an LFS system
|
||||
helps demonstrate what makes Linux tick, and how things work together
|
||||
and depend on each other. One of the best things that this learning
|
||||
experience provides is the ability to customize Linux to your own tastes
|
||||
and needs.</para>
|
||||
|
||||
<para>Another benefit of LFS is the ability to create a very compact
|
||||
Linux system. When installing a regular distribution, one is often
|
||||
forced to include several programs which are probably never used.
|
||||
These programs waste disk space, or worse, CPU cycles. It is
|
||||
not difficult to build an LFS system of less than 100 megabytes (MB),
|
||||
which is substantially smaller than the majority of existing installations. Does
|
||||
this still sound like a lot of space? A few of us have been working on
|
||||
creating a very small embedded LFS system. We successfully built a
|
||||
system that was specialized to run the Apache web server with
|
||||
approximately 8MB of disk space used. Further stripping could bring
|
||||
this down to 5 MB or less. Try that with a regular distribution!
|
||||
This is only one of the many benefits of designing your own Linux
|
||||
implementation.</para>
|
||||
<para>A key benefit of LFS is that it allows users to have more control
|
||||
over the system without relying on someone else's Linux implementation.
|
||||
With LFS, <emphasis>you</emphasis> are in the driver's seat and dictate
|
||||
every aspect of the system, such as the directory layout and bootscript
|
||||
setup. You also dictate where, why, and how programs are installed.</para>
|
||||
|
||||
<para>We could compare Linux distributions to a hamburger purchased at
|
||||
a fast-food restaurant—you have no idea what might be in what
|
||||
you are eating. LFS, on the other hand, does not give you a hamburger.
|
||||
Rather, LFS provides the recipe to make the exact hamburger desired.
|
||||
This allows users to review the recipe, omit unwanted ingredients, and
|
||||
add your own ingredients to enhance the flavor of the burger.
|
||||
When you are satisfied with the recipe, move on to preparing it. It
|
||||
can be made to exact specifications—broil it, bake it, deep-fry
|
||||
it, or barbecue it.</para>
|
||||
<para>Another benefit of LFS is the ability to create a very compact Linux
|
||||
system. When installing a regular distribution, one is often forced to
|
||||
include several programs which are probably never used. These programs
|
||||
waste disk space, or worse, CPU cycles. It is not difficult to build an
|
||||
LFS system of less than 100 megabytes (MB), which is substantially smaller
|
||||
than the majority of existing installations. Does this still sound like a
|
||||
lot of space? A few of us have been working on creating a very small
|
||||
embedded LFS system. We successfully built a system that was specialized
|
||||
to run the Apache web server with approximately 8MB of disk space used.
|
||||
Further stripping could bring this down to 5 MB or less. Try that with a
|
||||
regular distribution! This is only one of the many benefits of designing
|
||||
your own Linux implementation.</para>
|
||||
|
||||
<para>Another analogy that we can use is that of comparing LFS with a
|
||||
finished house. LFS provides the skeletal plan of a house, but it is up
|
||||
to you to build it. LFS maintains the freedom to adjust plans
|
||||
throughout the process, customizing it to the user's needs and
|
||||
preferences.</para>
|
||||
<para>We could compare Linux distributions to a hamburger purchased at a
|
||||
fast-food restaurant—you have no idea what might be in what you are
|
||||
eating. LFS, on the other hand, does not give you a hamburger. Rather,
|
||||
LFS provides the recipe to make the exact hamburger desired. This allows
|
||||
users to review the recipe, omit unwanted ingredients, and add your own
|
||||
ingredients to enhance the flavor of the burger. When you are satisfied
|
||||
with the recipe, move on to preparing it. It can be made to exact
|
||||
specifications—broil it, bake it, deep-fry it, or barbecue it.</para>
|
||||
|
||||
<para>An additional advantage of a custom built Linux system is
|
||||
security. By compiling the entire system from source code, you are
|
||||
empowered to audit everything and apply all the security patches
|
||||
desired. It is no longer necessary to wait for somebody else to
|
||||
compile binary packages that fix a security hole. Unless you
|
||||
examine the patch and implement it yourself, you have no guarantee
|
||||
that the new binary package was built correctly and adequately fixes
|
||||
the problem.</para>
|
||||
<para>Another analogy that we can use is that of comparing LFS with a
|
||||
finished house. LFS provides the skeletal plan of a house, but it is up
|
||||
to you to build it. LFS maintains the freedom to adjust plans throughout
|
||||
the process, customizing it to the user's needs and preferences.</para>
|
||||
|
||||
<para>The goal of Linux From Scratch is to build a complete and usable
|
||||
foundation-level system. Readers who do not wish to build their own
|
||||
Linux system from scratch may not benefit from the information in this
|
||||
book. If you only want to know what happens while the computer boots,
|
||||
we recommend the <quote>From Power Up To Bash Prompt</quote> HOWTO
|
||||
located at <ulink url="http://axiom.anu.edu.au/~okeefe/p2b/"/> or on
|
||||
The Linux Documentation Project's (TLDP) website at <ulink
|
||||
url="http://www.tldp.org/HOWTO/From-PowerUp-To-Bash-Prompt-HOWTO.html"/>.
|
||||
The HOWTO builds a system which is similar to that of this book,
|
||||
but it focuses strictly on creating a system capable of booting to a
|
||||
BASH prompt. Consider your objective. If you wish to build a Linux
|
||||
system while learning along the way, then this book is your best
|
||||
choice.</para>
|
||||
<para>An additional advantage of a custom built Linux system is security.
|
||||
By compiling the entire system from source code, you are empowered to audit
|
||||
everything and apply all the security patches desired. It is no longer
|
||||
necessary to wait for somebody else to compile binary packages that fix a
|
||||
security hole. Unless you examine the patch and implement it yourself, you
|
||||
have no guarantee that the new binary package was built correctly and
|
||||
adequately fixes the problem.</para>
|
||||
|
||||
<para>There are too many good reasons to build your own LFS system to
|
||||
list them all here. This section is only the tip of the iceberg. As
|
||||
you continue in your LFS experience, you will find the power that
|
||||
information and knowledge truly bring.</para>
|
||||
<para>The goal of Linux From Scratch is to build a complete and usable
|
||||
foundation-level system. Readers who do not wish to build their own Linux
|
||||
system from scratch may not benefit from the information in this book. If
|
||||
you only want to know what happens while the computer boots, we recommend
|
||||
the <quote>From Power Up To Bash Prompt</quote> HOWTO located at
|
||||
<ulink url="http://axiom.anu.edu.au/~okeefe/p2b/"/> or on The Linux
|
||||
Documentation Project's (TLDP) website at <ulink
|
||||
url="http://www.tldp.org/HOWTO/From-PowerUp-To-Bash-Prompt-HOWTO.html"/>.
|
||||
The HOWTO builds a system which is similar to that of this book, but it
|
||||
focuses strictly on creating a system capable of booting to a BASH prompt.
|
||||
Consider your objective. If you wish to build a Linux system while learning
|
||||
along the way, then this book is your best choice.</para>
|
||||
|
||||
<para>There are too many good reasons to build your own LFS system to
|
||||
list them all here. This section is only the tip of the iceberg. As
|
||||
you continue in your LFS experience, you will find the power that
|
||||
information and knowledge truly bring.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -1,58 +1,66 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!DOCTYPE bookinfo PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<bookinfo>
|
||||
<title>Linux From Scratch</title>
|
||||
<subtitle>Version &version;</subtitle>
|
||||
<title>Linux From Scratch</title>
|
||||
<subtitle>Version &version;</subtitle>
|
||||
|
||||
|
||||
<authorgroup>
|
||||
<author><firstname>Gerard</firstname><surname>Beekmans</surname></author>
|
||||
</authorgroup>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Gerard</firstname>
|
||||
<surname>Beekmans</surname>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
|
||||
<copyright id="copyright">
|
||||
<year>1999–2005</year>
|
||||
<holder>Gerard Beekmans</holder>
|
||||
</copyright>
|
||||
<copyright id="copyright">
|
||||
<year>1999–2005</year>
|
||||
<holder>Gerard Beekmans</holder>
|
||||
</copyright>
|
||||
|
||||
<legalnotice>
|
||||
<para>Copyright (c) 1999–2005, Gerard Beekmans</para>
|
||||
<legalnotice>
|
||||
<para>Copyright (c) 1999–2005, Gerard Beekmans</para>
|
||||
|
||||
<para>All rights reserved.</para>
|
||||
<para>All rights reserved.</para>
|
||||
|
||||
<para>Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:</para>
|
||||
<para>Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Redistributions in any form must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Neither the name of <quote>Linux From Scratch</quote> nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this material without specific prior written
|
||||
permission</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Any material derived from Linux From Scratch must contain
|
||||
a reference to the <quote>Linux From Scratch</quote> project</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<listitem><para>Redistributions in any form must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer</para></listitem>
|
||||
<para>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
<quote>AS IS</quote> AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</para>
|
||||
|
||||
<listitem><para>Neither the name of <quote>Linux From Scratch</quote> nor the
|
||||
names of its contributors may be used to endorse or promote products derived
|
||||
from this material without specific prior written permission</para></listitem>
|
||||
|
||||
<listitem><para>Any material derived from Linux From Scratch must contain
|
||||
a reference to the <quote>Linux From Scratch</quote> project</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
<para>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS <quote>AS
|
||||
IS</quote> AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</para>
|
||||
</legalnotice>
|
||||
</legalnotice>
|
||||
|
||||
</bookinfo>
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE dedication PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!DOCTYPE dedication PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
<dedication>
|
||||
<title>Dedication</title>
|
||||
<para>This book is dedicated</para>
|
||||
</dedication>
|
||||
|
||||
<dedication>
|
||||
<title>Dedication</title>
|
||||
<para>This book is dedicated</para>
|
||||
</dedication>
|
||||
|
@ -1,20 +1,22 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
<sect1 id="pre-errata">
|
||||
<title>Errata</title>
|
||||
<?dbhtml filename="errata.html"?>
|
||||
|
||||
<para>The software used to create an LFS system is constantly being updated and
|
||||
enhanced. Security warnings and bug fixes may become available after the LFS
|
||||
book has been released. To check whether the package versions or instructions in
|
||||
this release of LFS need any modifications to accommodate security
|
||||
vulnerabilities or other bug fixes, please visit <ulink url="&errata;"/> before
|
||||
proceeding with your build. You should note any changes shown and apply them to
|
||||
the relevant section of the book as you progress with building the LFS system.
|
||||
</para>
|
||||
<sect1 id="pre-errata">
|
||||
<?dbhtml filename="errata.html"?>
|
||||
|
||||
<title>Errata</title>
|
||||
|
||||
<para>The software used to create an LFS system is constantly being updated
|
||||
and enhanced. Security warnings and bug fixes may become available after
|
||||
the LFS book has been released. To check whether the package versions or
|
||||
instructions in this release of LFS need any modifications to accommodate
|
||||
security vulnerabilities or other bug fixes, please visit <ulink
|
||||
url="&errata;"/> before proceeding with your build. You should note any
|
||||
changes shown and apply them to the relevant section of the book as you
|
||||
progress with building the LFS system.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -1,67 +1,67 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="pre-foreword">
|
||||
<title>Foreword</title>
|
||||
<?dbhtml filename="foreword.html"?>
|
||||
<?dbhtml filename="foreword.html"?>
|
||||
|
||||
<para>My adventures in Linux began in 1998 when I downloaded and
|
||||
installed my first distribution. After working with it for a while, I
|
||||
discovered issues I definitely would have liked to see improved upon.
|
||||
For example, I didn't like the arrangement of the bootscripts or the way
|
||||
programs were configured by default. I tried a number of alternative
|
||||
distributions to address these issues, yet each had its pros and cons.
|
||||
Finally, I realized that if I wanted full satisfaction from my Linux
|
||||
system, I would have to build my own from scratch.</para>
|
||||
<title>Foreword</title>
|
||||
|
||||
<para>What does this mean? I resolved not to use pre-compiled packages
|
||||
of any kind, nor CD-ROMs or boot disks that would install basic
|
||||
utilities. I would use my current Linux system to develop my own
|
||||
customized system. This <quote>perfect</quote> Linux system would then
|
||||
have the strengths of various systems without their associated
|
||||
weaknesses. In the beginning, the idea was rather daunting, but I
|
||||
remained committed to the idea that a system could be built that would
|
||||
conform to my needs and desires rather than to a standard that just
|
||||
did not fit what I was looking for.</para>
|
||||
<para>My adventures in Linux began in 1998 when I downloaded and
|
||||
installed my first distribution. After working with it for a while, I
|
||||
discovered issues I definitely would have liked to see improved upon.
|
||||
For example, I didn't like the arrangement of the bootscripts or the way
|
||||
programs were configured by default. I tried a number of alternative
|
||||
distributions to address these issues, yet each had its pros and cons.
|
||||
Finally, I realized that if I wanted full satisfaction from my Linux
|
||||
system, I would have to build my own from scratch.</para>
|
||||
|
||||
<para>After sorting through issues such as circular dependencies and
|
||||
compile-time errors, I created a custom-built Linux system that was
|
||||
fully operational and suitable to individual needs. This process also
|
||||
allowed me to create compact and streamlined Linux systems which are
|
||||
faster and take up less space than traditional operating systems. I
|
||||
called this system a Linux From Scratch system, or an LFS system for
|
||||
short.</para>
|
||||
<para>What does this mean? I resolved not to use pre-compiled packages
|
||||
of any kind, nor CD-ROMs or boot disks that would install basic
|
||||
utilities. I would use my current Linux system to develop my own
|
||||
customized system. This <quote>perfect</quote> Linux system would then
|
||||
have the strengths of various systems without their associated
|
||||
weaknesses. In the beginning, the idea was rather daunting, but I
|
||||
remained committed to the idea that a system could be built that would
|
||||
conform to my needs and desires rather than to a standard that just
|
||||
did not fit what I was looking for.</para>
|
||||
|
||||
<para>As I shared my goals and experiences with other members of the
|
||||
Linux community, it became apparent that there was sustained interest
|
||||
in the ideas set forth in my Linux adventures. Such custom-built LFS
|
||||
systems serve not only to meet user specifications and requirements, but
|
||||
also serve as an ideal learning opportunity for programmers and system
|
||||
administrators to enhance their Linux skills. Out of this broadened
|
||||
interest, the Linux From Scratch Project was born.</para>
|
||||
<para>After sorting through issues such as circular dependencies and
|
||||
compile-time errors, I created a custom-built Linux system that was
|
||||
fully operational and suitable to individual needs. This process also
|
||||
allowed me to create compact and streamlined Linux systems which are
|
||||
faster and take up less space than traditional operating systems. I
|
||||
called this system a Linux From Scratch system, or an LFS system for
|
||||
short.</para>
|
||||
|
||||
<para>This <emphasis>Linux From Scratch</emphasis> book provides
|
||||
readers with the background and instruction to design and build custom
|
||||
Linux systems. This book highlights the Linux from Scratch project and
|
||||
the benefits of using this system. Users can dictate all aspects of
|
||||
their system, including directory layout, script setup, and security.
|
||||
The resulting system will be compiled completely from the source code,
|
||||
and the user will be able to specify where, why, and how programs are
|
||||
installed. This book allows readers to fully customize Linux systems
|
||||
to their own needs and allows users more control over their
|
||||
system.</para>
|
||||
<para>As I shared my goals and experiences with other members of the
|
||||
Linux community, it became apparent that there was sustained interest
|
||||
in the ideas set forth in my Linux adventures. Such custom-built LFS
|
||||
systems serve not only to meet user specifications and requirements, but
|
||||
also serve as an ideal learning opportunity for programmers and system
|
||||
administrators to enhance their Linux skills. Out of this broadened
|
||||
interest, the Linux From Scratch Project was born.</para>
|
||||
|
||||
<para>I hope you will have a great time working on your own LFS
|
||||
system, and enjoy the numerous benefits of having a system that is
|
||||
truly <emphasis>your own</emphasis>.</para>
|
||||
<para>This <emphasis>Linux From Scratch</emphasis> book provides
|
||||
readers with the background and instruction to design and build custom
|
||||
Linux systems. This book highlights the Linux from Scratch project and
|
||||
the benefits of using this system. Users can dictate all aspects of
|
||||
their system, including directory layout, script setup, and security.
|
||||
The resulting system will be compiled completely from the source code,
|
||||
and the user will be able to specify where, why, and how programs are
|
||||
installed. This book allows readers to fully customize Linux systems
|
||||
to their own needs and allows users more control over their
|
||||
system.</para>
|
||||
|
||||
<para></para>
|
||||
<para>I hope you will have a great time working on your own LFS
|
||||
system, and enjoy the numerous benefits of having a system that is
|
||||
truly <emphasis>your own</emphasis>.</para>
|
||||
|
||||
<literallayout>--
|
||||
Gerard Beekmans
|
||||
gerard@linuxfromscratch.org</literallayout>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -1,43 +1,46 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="pre-hostreqs">
|
||||
<title>Host System Requirements</title>
|
||||
<?dbhtml filename="hostreqs.html"?>
|
||||
<?dbhtml filename="hostreqs.html"?>
|
||||
|
||||
<para>The host must be running at least a 2.6.2 kernel compiled with GCC-3.0 or
|
||||
higher. There are two main reasons for this requirement. First, the Native POSIX
|
||||
Threading Library (NPTL) test suite will segfault if the host's kernel has not
|
||||
been compiled with GCC-3.0 or a later version. Second, the 2.6.2 or later
|
||||
version of the kernel is required for the use of Udev. Udev creates devices
|
||||
dynamically by reading from the <systemitem
|
||||
class="filesystem">sysfs</systemitem> file system. However, support for this
|
||||
filesystem has only recently been implemented in most of the kernel drivers. We
|
||||
must be sure that all critical system devices get created properly.</para>
|
||||
<title>Host System Requirements</title>
|
||||
|
||||
<para>In order to determine whether the host kernel meets the
|
||||
requirements outlined above, run the following command:</para>
|
||||
<para>The host must be running at least a 2.6.2 kernel compiled with GCC-3.0
|
||||
or higher. There are two main reasons for this requirement. First, the Native
|
||||
POSIX Threading Library (NPTL) test suite will segfault if the host's kernel
|
||||
has not been compiled with GCC-3.0 or a later version. Second, the 2.6.2 or
|
||||
later version of the kernel is required for the use of Udev. Udev creates
|
||||
devices dynamically by reading from the <systemitem
|
||||
class="filesystem">sysfs</systemitem> file system. However, support for this
|
||||
filesystem has only recently been implemented in most of the kernel drivers.
|
||||
We must be sure that all critical system devices get created properly.</para>
|
||||
|
||||
<para>In order to determine whether the host kernel meets the requirements
|
||||
outlined above, run the following command:</para>
|
||||
|
||||
<screen role="nodump"><userinput>cat /proc/version</userinput></screen>
|
||||
|
||||
<para>This will produce output similar to:</para>
|
||||
<para>This will produce output similar to:</para>
|
||||
|
||||
<screen><computeroutput>Linux version 2.6.2 (user@host) (gcc version 3.4.0) #1
|
||||
Tue Apr 20 21:22:18 GMT 2004</computeroutput></screen>
|
||||
|
||||
<para>If the results of the above command do not state that the host kernel is
|
||||
either 2.6.2 (or later), or that it was not compiled using a GCC-3.0 (or later)
|
||||
compiler, one will need to be installed. There are two methods you can take to
|
||||
solve this. First, see if your Linux vendor provides a 2.6.2 (or later) kernel
|
||||
package. If so, you may wish to install it. If your vendor doesn't offer a 2.6.2
|
||||
(or later) kernel package, or you would prefer not to install it, then you can
|
||||
compile a 2.6 kernel yourself. Instructions for compiling the kernel and
|
||||
configuring the boot loader (assuming the host uses GRUB) are located in <xref
|
||||
linkend="chapter-bootable"/>. This second option can also be seen as a gauge
|
||||
of your current Linux skills. If this second requirement is too steep, then the
|
||||
LFS book will not likely be much use to you at this time.</para>
|
||||
<para>If the results of the above command do not state that the host kernel
|
||||
is either 2.6.2 (or later), or that it was not compiled using a GCC-3.0 (or
|
||||
later) compiler, one will need to be installed. There are two methods you
|
||||
can take to solve this. First, see if your Linux vendor provides a 2.6.2 (or
|
||||
later) kernel package. If so, you may wish to install it. If your vendor
|
||||
doesn't offer a 2.6.2 (or later) kernel package, or you would prefer not to
|
||||
install it, then you can compile a 2.6 kernel yourself. Instructions for
|
||||
compiling the kernel and configuring the boot loader (assuming the host
|
||||
uses GRUB) are located in <xref linkend="chapter-bootable"/>. This second
|
||||
option can also be seen as a gauge of your current Linux skills. If this
|
||||
second requirement is too steep, then the LFS book will not likely be much
|
||||
use to you at this time.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -1,40 +1,43 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="pre-organization">
|
||||
<title>Structure</title>
|
||||
<?dbhtml filename="organization.html"?>
|
||||
<?dbhtml filename="organization.html"?>
|
||||
|
||||
<para>This book is divided into the following parts.</para>
|
||||
<title>Structure</title>
|
||||
|
||||
<sect2>
|
||||
<title>Part I - Introduction</title>
|
||||
<para>This book is divided into the following parts.</para>
|
||||
|
||||
<para>Part I explains a few important notes on how to proceed with the
|
||||
LFS installation. This section also provides meta-information about
|
||||
the book.</para>
|
||||
</sect2>
|
||||
<sect2>
|
||||
<title>Part I - Introduction</title>
|
||||
|
||||
<sect2>
|
||||
<title>Part II - Preparing for the Build</title>
|
||||
<para>Part I explains a few important notes on how to proceed with the
|
||||
LFS installation. This section also provides meta-information about
|
||||
the book.</para>
|
||||
</sect2>
|
||||
|
||||
<para>Part II describes how to prepare for the building process—making
|
||||
a partition, downloading the packages, and compiling temporary
|
||||
tools.</para>
|
||||
</sect2>
|
||||
<sect2>
|
||||
<title>Part II - Preparing for the Build</title>
|
||||
|
||||
<sect2>
|
||||
<title>Part III - Building the LFS System</title>
|
||||
<para>Part II describes how to prepare for the building process—making
|
||||
a partition, downloading the packages, and compiling temporary
|
||||
tools.</para>
|
||||
</sect2>
|
||||
|
||||
<para>Part III guides the reader through the building of the LFS
|
||||
system—compiling and installing all the packages one by one,
|
||||
setting up the boot scripts, and installing the kernel. The resulting
|
||||
Linux system is the foundation on which other software can be built to
|
||||
expand the system as desired. At the end of this book, there is an
|
||||
easy to use reference listing all of the programs, libraries, and
|
||||
important files that have been installed.</para>
|
||||
</sect2>
|
||||
<sect2>
|
||||
<title>Part III - Building the LFS System</title>
|
||||
|
||||
<para>Part III guides the reader through the building of the LFS
|
||||
system—compiling and installing all the packages one by one,
|
||||
setting up the boot scripts, and installing the kernel. The resulting
|
||||
Linux system is the foundation on which other software can be built to
|
||||
expand the system as desired. At the end of this book, there is an
|
||||
easy to use reference listing all of the programs, libraries, and
|
||||
important files that have been installed.</para>
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
|
@ -1,19 +1,22 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
<preface id="preface">
|
||||
<?dbhtml dir="prologue"?>
|
||||
<title>Preface</title>
|
||||
<?dbhtml filename="preface.html"?>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="foreword.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="audience.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prerequisites.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hostreqs.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="typography.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="organization.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="errata.xml"/>
|
||||
<preface id="preface">
|
||||
<?dbhtml dir="prologue"?>
|
||||
<?dbhtml filename="preface.html"?>
|
||||
|
||||
<title>Preface</title>
|
||||
|
||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="foreword.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="audience.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="prerequisites.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hostreqs.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="typography.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="organization.xml"/>
|
||||
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="errata.xml"/>
|
||||
|
||||
</preface>
|
||||
|
@ -1,50 +1,59 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
|
||||
<sect1 id="pre-prerequisites">
|
||||
<title>Prerequisites</title>
|
||||
<?dbhtml filename="prerequisites.html"?>
|
||||
<?dbhtml filename="prerequisites.html"?>
|
||||
|
||||
<para>Building an LFS system is not a simple task. It requires a certain level
|
||||
of existing knowledge of Unix system administration in order to resolve
|
||||
problems, and correctly execute the commands listed. In particular, as an
|
||||
absolute minimum, the reader should already have the ability to use the command
|
||||
line (shell) to copy or move files and directories, list directory and file
|
||||
contents, and change the current directory. It is also expected that the reader
|
||||
has a reasonable knowledge of using and installing Linux software.</para>
|
||||
<title>Prerequisites</title>
|
||||
|
||||
<para>Because the LFS book assumes <emphasis>at least</emphasis> this basic
|
||||
level of skill, the various LFS support forums are unlikely to be able to
|
||||
provide you with much assistance; you will find that your questions regarding
|
||||
such basic knowledge will likely go unanswered, or you will simply be referred
|
||||
to the LFS essential pre-reading list.</para>
|
||||
<para>Building an LFS system is not a simple task. It requires a certain
|
||||
level of existing knowledge of Unix system administration in order to resolve
|
||||
problems, and correctly execute the commands listed. In particular, as an
|
||||
absolute minimum, the reader should already have the ability to use the
|
||||
command line (shell) to copy or move files and directories, list directory
|
||||
and file contents, and change the current directory. It is also expected that
|
||||
the reader has a reasonable knowledge of using and installing Linux
|
||||
software.</para>
|
||||
|
||||
<para>Before building an LFS system, we recommend reading the following HOWTOs:
|
||||
</para>
|
||||
<para>Because the LFS book assumes <emphasis>at least</emphasis> this basic
|
||||
level of skill, the various LFS support forums are unlikely to be able to
|
||||
provide you with much assistance; you will find that your questions regarding
|
||||
such basic knowledge will likely go unanswered, or you will simply be referred
|
||||
to the LFS essential pre-reading list.</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Software-Building-HOWTO
|
||||
<ulink url="http://www.tldp.org/HOWTO/Software-Building-HOWTO.html"/></para>
|
||||
<para>Before building an LFS system, we recommend reading the following
|
||||
HOWTOs:</para>
|
||||
|
||||
<para>This is a comprehensive guide to building and installing
|
||||
<quote>generic</quote> Unix software distributions under Linux.</para></listitem>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>Software-Building-HOWTO
|
||||
<ulink url="http://www.tldp.org/HOWTO/Software-Building-HOWTO.html"/></para>
|
||||
|
||||
<listitem><para>The Linux Users' Guide
|
||||
<ulink url="http://www.linuxhq.com/guides/LUG/guide.html"/></para>
|
||||
<para>This is a comprehensive guide to building and installing
|
||||
<quote>generic</quote> Unix software distributions under Linux.</para>
|
||||
</listitem>
|
||||
|
||||
<para>This guide covers the usage of assorted Linux software.</para></listitem>
|
||||
<listitem>
|
||||
<para>The Linux Users' Guide
|
||||
<ulink url="http://www.linuxhq.com/guides/LUG/guide.html"/></para>
|
||||
|
||||
<listitem><para>The Essential Pre-Reading Hint
|
||||
<ulink url="&hints-root;essential_prereading.txt"/></para>
|
||||
<para>This guide covers the usage of assorted Linux software.</para>
|
||||
</listitem>
|
||||
|
||||
<para>This is an LFS Hint written specifically for users new to Linux.
|
||||
It includes a list of links to excellent sources of information on a
|
||||
wide range of topics. Anyone attempting to install LFS should have an
|
||||
understanding of many of the topics in this hint.</para></listitem>
|
||||
<listitem>
|
||||
<para>The Essential Pre-Reading Hint
|
||||
<ulink url="&hints-root;essential_prereading.txt"/></para>
|
||||
|
||||
</itemizedlist>
|
||||
<para>This is an LFS Hint written specifically for users new to Linux.
|
||||
It includes a list of links to excellent sources of information on a
|
||||
wide range of topics. Anyone attempting to install LFS should have an
|
||||
understanding of many of the topics in this hint.</para>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -1,41 +1,41 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
||||
<!ENTITY % general-entities SYSTEM "../general.ent">
|
||||
%general-entities;
|
||||
]>
|
||||
<sect1 id="pre-typography">
|
||||
<title>Typography</title>
|
||||
<?dbhtml filename="typography.html"?>
|
||||
|
||||
<para>To make things easier to follow, there are a few typographical
|
||||
conventions used throughout this book. This section contains some
|
||||
examples of the typographical format found throughout Linux From
|
||||
Scratch.</para>
|
||||
<sect1 id="pre-typography">
|
||||
<?dbhtml filename="typography.html"?>
|
||||
|
||||
<title>Typography</title>
|
||||
|
||||
<para>To make things easier to follow, there are a few typographical
|
||||
conventions used throughout this book. This section contains some
|
||||
examples of the typographical format found throughout Linux From
|
||||
Scratch.</para>
|
||||
|
||||
<screen role="nodump"><userinput>./configure --prefix=/usr</userinput></screen>
|
||||
|
||||
<para>This form of text is designed to be typed exactly as seen unless
|
||||
otherwise noted in the surrounding text. It is also used in the
|
||||
explanation sections to identify which of the commands is being
|
||||
referenced.</para>
|
||||
<para>This form of text is designed to be typed exactly as seen unless
|
||||
otherwise noted in the surrounding text. It is also used in the explanation
|
||||
sections to identify which of the commands is being referenced.</para>
|
||||
|
||||
<screen><computeroutput>install-info: unknown option '--dir-file=/mnt/lfs/usr/info/dir'</computeroutput></screen>
|
||||
|
||||
<para>This form of text (fixed-width text) shows screen output,
|
||||
probably as the result of commands issued. This format is also used
|
||||
to show filenames, such as
|
||||
<filename>/etc/ld.so.conf</filename>.</para>
|
||||
<para>This form of text (fixed-width text) shows screen output, probably as
|
||||
the result of commands issued. This format is also used to show filenames,
|
||||
such as <filename>/etc/ld.so.conf</filename>.</para>
|
||||
|
||||
<para><emphasis>Emphasis</emphasis></para>
|
||||
<para><emphasis>Emphasis</emphasis></para>
|
||||
|
||||
<para>This form of text is used for several purposes in the book. Its main
|
||||
purpose is to emphasize important points or items.</para>
|
||||
<para>This form of text is used for several purposes in the book. Its main
|
||||
purpose is to emphasize important points or items.</para>
|
||||
|
||||
<para><ulink url="&lfs-root;"/></para>
|
||||
<para><ulink url="&lfs-root;"/></para>
|
||||
|
||||
<para>This format is used for hyperlinks both within the LFS
|
||||
community and to external pages. It includes HOWTOs, download locations,
|
||||
and websites.</para>
|
||||
<para>This format is used for hyperlinks both within the LFS community and to
|
||||
external pages. It includes HOWTOs, download locations, and websites.</para>
|
||||
|
||||
<screen role="nodump"><userinput>cat > $LFS/etc/group << "EOF"
|
||||
<literal>root:x:0:
|
||||
@ -43,35 +43,35 @@ bin:x:1:
|
||||
......</literal>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<para>This format is used when creating configuration files. The first
|
||||
command tells the system to create the file
|
||||
<filename>$LFS/etc/group</filename> from whatever is typed on the
|
||||
following lines until the sequence end of file (EOF) is encountered.
|
||||
Therefore, this entire section is generally typed as seen.</para>
|
||||
<para>This format is used when creating configuration files. The first command
|
||||
tells the system to create the file <filename>$LFS/etc/group</filename> from
|
||||
whatever is typed on the following lines until the sequence end of file (EOF)
|
||||
is encountered. Therefore, this entire section is generally typed as
|
||||
seen.</para>
|
||||
|
||||
<para><replaceable>[REPLACED TEXT]</replaceable></para>
|
||||
<para><replaceable>[REPLACED TEXT]</replaceable></para>
|
||||
|
||||
<para>This format is used to encapsulate text that is not to be typed
|
||||
as seen or copied-and-pasted.</para>
|
||||
<para>This format is used to encapsulate text that is not to be typed
|
||||
as seen or copied-and-pasted.</para>
|
||||
|
||||
<para><filename>passwd(5)</filename></para>
|
||||
<para><filename>passwd(5)</filename></para>
|
||||
|
||||
<para>This format is used to refer to a specific manual page (hereinafter
|
||||
referred to simply as a <quote>man</quote> page). The number inside parentheses
|
||||
indicates a specific section inside of <command>man</command>. For example,
|
||||
<command>passwd</command> has two man pages. Per LFS installation instructions,
|
||||
those two man pages will be located at
|
||||
<filename>/usr/share/man/man1/passwd.1</filename> and
|
||||
<filename>/usr/share/man/man5/passwd.5</filename>. Both man pages have different
|
||||
information in them. When the book uses <filename>passwd(5)</filename> it is
|
||||
specifically referring to <filename>/usr/share/man/man5/passwd.5</filename>.
|
||||
<command>man passwd</command> will print the first man page it finds that
|
||||
matches <quote>passwd</quote>, which will be
|
||||
<filename>/usr/share/man/man1/passwd.1</filename>. For this example, you will
|
||||
need to run <command>man 5 passwd</command> in order to read the specific page
|
||||
being referred to. It should be noted that most man pages do not have duplicate
|
||||
page names in different sections. Therefore, <command>man <replaceable>[program
|
||||
name]</replaceable></command> is generally sufficient.</para>
|
||||
<para>This format is used to refer to a specific manual page (hereinafter
|
||||
referred to simply as a <quote>man</quote> page). The number inside parentheses
|
||||
indicates a specific section inside of <command>man</command>. For example,
|
||||
<command>passwd</command> has two man pages. Per LFS installation instructions,
|
||||
those two man pages will be located at
|
||||
<filename>/usr/share/man/man1/passwd.1</filename> and
|
||||
<filename>/usr/share/man/man5/passwd.5</filename>. Both man pages have different
|
||||
information in them. When the book uses <filename>passwd(5)</filename> it is
|
||||
specifically referring to <filename>/usr/share/man/man5/passwd.5</filename>.
|
||||
<command>man passwd</command> will print the first man page it finds that
|
||||
matches <quote>passwd</quote>, which will be
|
||||
<filename>/usr/share/man/man1/passwd.1</filename>. For this example, you will
|
||||
need to run <command>man 5 passwd</command> in order to read the specific page
|
||||
being referred to. It should be noted that most man pages do not have duplicate
|
||||
page names in different sections. Therefore, <command>man <replaceable>[program
|
||||
name]</replaceable></command> is generally sufficient.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user