aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerard Beekmans <gerard@linuxfromscratch.org>2005-02-19 22:16:42 +0000
committerGerard Beekmans <gerard@linuxfromscratch.org>2005-02-19 22:16:42 +0000
commit81fd230419b0cfd052b08fc1ed352bb7d49975df (patch)
tree24c98d2876e5b457dcb88d39e7cca4905f58691a
parent2f9131f8390243dbc350fe2eeb9e1d58f0264888 (diff)
Trunk is now identical to Testing
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4648 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r--INSTALL19
-rw-r--r--Makefile18
-rw-r--r--TODO10
-rw-r--r--appendixa/acronymlist.xml397
-rw-r--r--appendixb/acknowledgments.xml285
-rw-r--r--chapter01/administrativa.xml82
-rw-r--r--chapter01/askforhelp.xml106
-rw-r--r--chapter01/bootcd.xml55
-rw-r--r--chapter01/changelog.xml217
-rw-r--r--chapter01/how.xml74
-rw-r--r--chapter02/creatingfilesystem.xml26
-rw-r--r--chapter02/creatingpartition.xml47
-rw-r--r--chapter02/introduction.xml5
-rw-r--r--chapter02/mounting.xml46
-rw-r--r--chapter03/introduction.xml40
-rw-r--r--chapter03/packages.xml156
-rw-r--r--chapter03/patches.xml38
-rw-r--r--chapter04/aboutlfs.xml25
-rw-r--r--chapter04/aboutsbus.xml40
-rw-r--r--chapter04/abouttestsuites.xml40
-rw-r--r--chapter04/addinguser.xml70
-rw-r--r--chapter04/creatingtoolsdir.xml32
-rw-r--r--chapter04/settingenviron.xml68
-rw-r--r--chapter05/adjusting.xml85
-rw-r--r--chapter05/bash.xml38
-rw-r--r--chapter05/binutils-pass1.xml115
-rw-r--r--chapter05/binutils-pass2.xml63
-rw-r--r--chapter05/bison.xml19
-rw-r--r--chapter05/bzip2.xml19
-rw-r--r--chapter05/chapter05.xml6
-rw-r--r--chapter05/coreutils.xml40
-rw-r--r--chapter05/dejagnu.xml29
-rw-r--r--chapter05/diffutils.xml17
-rw-r--r--chapter05/expect.xml82
-rw-r--r--chapter05/findutils.xml19
-rw-r--r--chapter05/flex.xml25
-rw-r--r--chapter05/gawk.xml19
-rw-r--r--chapter05/gcc-pass1.xml102
-rw-r--r--chapter05/gcc-pass2.xml164
-rw-r--r--chapter05/gettext.xml42
-rw-r--r--chapter05/glibc.xml162
-rw-r--r--chapter05/grep.xml37
-rw-r--r--chapter05/gzip.xml17
-rw-r--r--chapter05/hostreqs.xml30
-rw-r--r--chapter05/introduction.xml57
-rw-r--r--chapter05/linux-libc-headers.xml29
-rw-r--r--chapter05/m4.xml21
-rw-r--r--chapter05/make.xml17
-rw-r--r--chapter05/ncurses.xml36
-rw-r--r--chapter05/patch.xml19
-rw-r--r--chapter05/perl.xml38
-rw-r--r--chapter05/sed.xml17
-rw-r--r--chapter05/stripping.xml23
-rw-r--r--chapter05/tar.xml17
-rw-r--r--chapter05/tcl.xml67
-rw-r--r--chapter05/texinfo.xml17
-rw-r--r--chapter05/toolchaintechnotes.xml214
-rw-r--r--chapter05/udev.xml40
-rw-r--r--chapter05/util-linux.xml24
-rw-r--r--chapter06/aboutdebug.xml41
-rw-r--r--chapter06/autoconf.xml101
-rw-r--r--chapter06/automake.xml173
-rw-r--r--chapter06/bash.xml73
-rw-r--r--chapter06/binutils.xml230
-rw-r--r--chapter06/bison.xml54
-rw-r--r--chapter06/bzip2.xml140
-rw-r--r--chapter06/changingowner.xml28
-rw-r--r--chapter06/chroot.xml46
-rw-r--r--chapter06/coreutils.xml785
-rw-r--r--chapter06/createfiles.xml6
-rw-r--r--chapter06/creatingdirs.xml37
-rw-r--r--chapter06/devices.xml47
-rw-r--r--chapter06/diffutils.xml55
-rw-r--r--chapter06/e2fsprogs.xml330
-rw-r--r--chapter06/file.xml40
-rw-r--r--chapter06/findutils.xml90
-rw-r--r--chapter06/flex.xml78
-rw-r--r--chapter06/gawk.xml86
-rw-r--r--chapter06/gcc.xml162
-rw-r--r--chapter06/gettext.xml266
-rw-r--r--chapter06/glibc.xml587
-rw-r--r--chapter06/grep.xml44
-rw-r--r--chapter06/groff.xml327
-rw-r--r--chapter06/grub.xml81
-rw-r--r--chapter06/gzip.xml142
-rw-r--r--chapter06/hotplug.xml126
-rw-r--r--chapter06/iana-etc.xml39
-rw-r--r--chapter06/inetutils.xml136
-rw-r--r--chapter06/introduction.xml61
-rw-r--r--chapter06/iproute2.xml253
-rw-r--r--chapter06/kbd.xml248
-rw-r--r--chapter06/kernfs.xml21
-rw-r--r--chapter06/less.xml57
-rw-r--r--chapter06/libol.xml39
-rw-r--r--chapter06/libtool.xml45
-rw-r--r--chapter06/linux-libc-headers.xml37
-rw-r--r--chapter06/m4.xml35
-rw-r--r--chapter06/make.xml29
-rw-r--r--chapter06/man-pages.xml26
-rw-r--r--chapter06/man.xml135
-rw-r--r--chapter06/mktemp.xml55
-rw-r--r--chapter06/module-init-tools.xml120
-rw-r--r--chapter06/ncurses.xml162
-rw-r--r--chapter06/patch.xml37
-rw-r--r--chapter06/perl.xml280
-rw-r--r--chapter06/procps.xml158
-rw-r--r--chapter06/psmisc.xml82
-rw-r--r--chapter06/pwdgroup.xml60
-rw-r--r--chapter06/readjusting.xml84
-rw-r--r--chapter06/readline.xml66
-rw-r--r--chapter06/revisedchroot.xml29
-rw-r--r--chapter06/sed.xml28
-rw-r--r--chapter06/shadow.xml354
-rw-r--r--chapter06/strippingagain.xml38
-rw-r--r--chapter06/syslogng.xml39
-rw-r--r--chapter06/sysvinit.xml191
-rw-r--r--chapter06/tar.xml37
-rw-r--r--chapter06/texinfo.xml99
-rw-r--r--chapter06/udev.xml105
-rw-r--r--chapter06/util-linux.xml572
-rw-r--r--chapter06/vim.xml283
-rw-r--r--chapter06/zlib.xml45
-rw-r--r--chapter07/bootscripts.xml207
-rw-r--r--chapter07/console.xml81
-rw-r--r--chapter07/hostname.xml12
-rw-r--r--chapter07/hosts.xml45
-rw-r--r--chapter07/inputrc.xml41
-rw-r--r--chapter07/introduction.xml17
-rw-r--r--chapter07/network.xml79
-rw-r--r--chapter07/profile.xml83
-rw-r--r--chapter07/setclock.xml35
-rw-r--r--chapter07/udev.xml229
-rw-r--r--chapter07/usage.xml107
-rw-r--r--chapter08/fstab.xml42
-rw-r--r--chapter08/grub.xml86
-rw-r--r--chapter08/introduction.xml6
-rw-r--r--chapter08/kernel.xml197
-rw-r--r--chapter09/chapter09.xml2
-rw-r--r--chapter09/getcounted.xml8
-rw-r--r--chapter09/reboot.xml33
-rw-r--r--chapter09/theend.xml12
-rw-r--r--chapter09/whatnow.xml39
-rw-r--r--general.ent7
-rw-r--r--prologue/audience.xml81
-rw-r--r--prologue/bookinfo.xml20
-rw-r--r--prologue/dedication.xml1
-rw-r--r--prologue/foreword.xml57
-rw-r--r--prologue/organization.xml30
-rw-r--r--prologue/prerequisites.xml27
-rw-r--r--prologue/typography.xml48
-rw-r--r--stylesheets/lfs-chunked.xsl2
-rw-r--r--stylesheets/lfs-nochunks.xsl2
-rw-r--r--stylesheets/lfs.css5
153 files changed, 12724 insertions, 839 deletions
diff --git a/INSTALL b/INSTALL
index 82cf8ae41..62e2961d7 100644
--- a/INSTALL
+++ b/INSTALL
@@ -20,23 +20,8 @@ If all you want to do is convert XML to HTML perform the following:
* DocBook DTD
- http://www.linuxfromscratch.org/blfs/view/svn/pst/xml.html
-* DocBook XSL Stylesheets (1.67.2)
- install -d /usr/share/xml/docbook/xsl-stylesheets-1.67.2
- chown -R root:root .
- cp -af INSTALL VERSION common eclipse extensions fo html htmlhelp images \
- javahelp lib manpages params profiling template xhtml \
- /usr/share/xml/docbook/xsl-stylesheets-1.67.2
- install -d /usr/share/doc/xml
- cp -af doc/* /usr/share/doc/xml
- cd /usr/share/xml/docbook/xsl-stylesheets-1.67.2 && \
- sed -i -e 's@current/@1.67.2/@' INSTALL && \
- sh INSTALL
- xmlcatalog --noout --add "delegateURI" \
- "http://docbook.sourceforge.net/release/xsl/1.67.2/" \
- "file:///usr/share/xml/docbook/xsl-stylesheets-1.67.2/catalog.xml" \
- /etc/xml/catalog
- ln -sf xsl-stylesheets-$(VERSION) \
- /usr/share/xml/docbook/xsl-stylesheets-current
+* DocBook XSL Stylesheets
+ - http://www.linuxfromscratch.org/blfs/view/svn/pst/docbook-xsl.html
* HTMLTidy
- http://www.linuxfromscratch.org/blfs/view/svn/general/tidy.html
diff --git a/Makefile b/Makefile
index 2bc4e2cab..4bf6f9488 100644
--- a/Makefile
+++ b/Makefile
@@ -5,9 +5,9 @@ NOCHUNKS_OUTPUT=LFS-BOOK.html
XSLROOTDIR=/usr/share/xml/docbook/xsl-stylesheets-current
lfs:
- xsltproc --xinclude --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
- -stringparam base.dir $(BASEDIR)/ stylesheets/lfs-chunked.xsl \
- index.xml
+ xsltproc --xinclude --nonet -stringparam profile.condition html \
+ -stringparam chunk.quietly $(CHUNK_QUIET) -stringparam base.dir $(BASEDIR)/ \
+ stylesheets/lfs-chunked.xsl index.xml
if [ ! -e $(BASEDIR)/stylesheets ]; then \
mkdir -p $(BASEDIR)/stylesheets; \
@@ -32,8 +32,9 @@ lfs:
for filename in `find $(BASEDIR) -name "*.html"`; do \
sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
done;
+
#
-# This is the old "pdf" target. The old "print" target below has been
+# This is the old "pdf" target. The old "print" target below has been
# renamed to "pdf" and will be used. This commented out previous_pdf
# target can be removed eventually. It'll remain here for a bit for
# historical reasons
@@ -46,7 +47,7 @@ lfs:
# rm lfs.fo
pdf:
- xsltproc --xinclude --nonet --stringparam profile.condition print \
+ xsltproc --xinclude --nonet --stringparam profile.condition pdf \
--output $(BASEDIR)/lfs-pdf.xml stylesheets/lfs-profile.xsl index.xml
xsltproc --nonet --output $(BASEDIR)/lfs-pdf.fo stylesheets/lfs-pdf.xsl \
$(BASEDIR)/lfs-pdf.xml
@@ -55,10 +56,15 @@ pdf:
rm $(BASEDIR)/lfs-pdf.xml $(BASEDIR)/lfs-pdf.fo
nochunks:
- xsltproc --xinclude --nonet --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
+ xsltproc --xinclude --nonet -stringparam profile.condition html \
+ --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
stylesheets/lfs-nochunks.xsl index.xml
+
tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
+ sed -i -e "s@text/html@application/xhtml+xml@g" \
+ $(BASEDIR)/$(NOCHUNKS_OUTPUT)
+
validate:
xmllint --noout --nonet --xinclude --postvalid index.xml
diff --git a/TODO b/TODO
deleted file mode 100644
index 95596151c..000000000
--- a/TODO
+++ /dev/null
@@ -1,10 +0,0 @@
- - Mention --enable-kernel=... where appropriate.
- - POSIX compliance patches (aka, removing the coreutils hack).
- - Pass --enable-const (and maybe --enable-widec) to ncurses.
- - Use that E2fsprogs patch to include Readline support in debugfs.
- - See about removing some things from Chapter 5, like patch. We can build
- those at the beginning of chapter 6 and have one less package to compile.
- We need to be sure this doens't break the pureness though.
- - Check for pureness and fix any occurrences of breakage.
- - Add more index terms to hotplug page.
- - Convert some patches to seds (only sane ones, though).
diff --git a/appendixa/acronymlist.xml b/appendixa/acronymlist.xml
index 815ffe207..132a31d59 100644
--- a/appendixa/acronymlist.xml
+++ b/appendixa/acronymlist.xml
@@ -8,7 +8,402 @@
<title>Acronyms and Terms</title>
<?dbhtml filename="acronymlist.html"?>
-<para>See testing</para>
+<variablelist>
+<?dbfo list-presentation="list"?>
+
+<varlistentry>
+<term><emphasis role="bold">ABI</emphasis></term><listitem><para>Application Binary Interface</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">ALFS</emphasis></term><listitem><para>Automated Linux From Scratch</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">ALSA</emphasis></term><listitem><para>Advanced Linux
+Sound Architecture</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">API</emphasis></term><listitem><para>Application
+Programming Interface</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">ASCII</emphasis></term><listitem><para>American Standard
+Code for Information Interchange</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">BIOS</emphasis></term><listitem><para>Basic Input/Output
+System</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">BLFS</emphasis></term><listitem><para>Beyond Linux From
+Scratch</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">BSD</emphasis></term><listitem><para>Berkeley Software
+Distribution</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">chroot</emphasis></term><listitem><para>change root</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">CMOS</emphasis></term><listitem><para>Complementary
+Metal Oxide Semiconductor</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">COS</emphasis></term>
+<listitem><para>Class Of Service</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">CPU</emphasis></term>
+<listitem><para>Central Processing Unit</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">CRC</emphasis></term>
+<listitem><para>Cyclic Redundancy Check</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">CVS</emphasis></term>
+<listitem><para>Concurrent Versions System</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">DHCP</emphasis></term>
+<listitem><para>Dynamic Host Configuration Protocol</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">DNS</emphasis></term>
+<listitem><para>Domain Name Service</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">EGA</emphasis></term>
+<listitem><para>Enhanced Graphics Adapter</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">ELF</emphasis></term>
+<listitem><para>Executable and Linkable Format</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">EOF</emphasis></term>
+<listitem><para>End of File</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">EQN</emphasis></term>
+<listitem><para>equation</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">EVMS</emphasis></term>
+<listitem><para>Enterprise Volume Management System</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">ext2</emphasis></term>
+<listitem><para>second extended file system</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">FAQ</emphasis></term>
+<listitem><para>Frequently Asked Questions</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">FHS</emphasis></term>
+<listitem><para>Filesystem Hierarchy Standard</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">FIFO</emphasis></term>
+<listitem><para>First-In, First Out</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">FQDN</emphasis></term>
+<listitem><para>Fully Qualified Domain Name</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">FTP</emphasis></term>
+<listitem><para>File Transfer Protocol</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">GB</emphasis></term>
+<listitem><para>Gibabytes</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">GCC</emphasis></term>
+<listitem><para>GNU Compiler Collection</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">GID</emphasis></term>
+<listitem><para>Group Identifier</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">GMT</emphasis></term>
+<listitem><para>Greenwich Mean Time</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">GPG</emphasis></term>
+<listitem><para>GNU Privacy Guard</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">HTML</emphasis></term>
+<listitem><para>Hypertext Markup Language</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">IDE</emphasis></term>
+<listitem><para>Integrated Drive Electronics</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">IEEE</emphasis></term>
+<listitem><para>Institute of Electrical and Electronic Engineers</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">IO</emphasis></term>
+<listitem><para>Input/Output</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">IP</emphasis></term>
+<listitem><para>Internet Protocol</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">IPC</emphasis></term>
+<listitem><para>Inter-Process Communication</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">IRC</emphasis></term>
+<listitem><para>Internet Relay Chat</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">ISO</emphasis></term>
+<listitem><para>International Organization for Standardization</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">ISP</emphasis></term>
+<listitem><para>Internet Service Provider</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">KB</emphasis></term>
+<listitem><para>Kilobytes</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">LED</emphasis></term>
+<listitem><para>Light Emitting Diode</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">LFS</emphasis></term>
+<listitem><para>Linux From Scratch</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">LSB</emphasis></term>
+<listitem><para>Linux Standards Base</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">MB</emphasis></term>
+<listitem><para>Megabytes</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">MBR</emphasis></term>
+<listitem><para>Master Boot Record</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">MD5</emphasis></term>
+<listitem><para>Message Digest 5</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">NIC</emphasis></term>
+<listitem><para>Network Interface Card</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">NLS</emphasis></term>
+<listitem><para>Native Language Support</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">NNTP</emphasis></term>
+<listitem><para>Network News Transport Protocol</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">NPTL</emphasis></term>
+<listitem><para>Native POSIX Threading Library</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">OSS</emphasis></term>
+<listitem><para>Open Sound System</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">PCH</emphasis></term>
+<listitem><para>Pre-Compiled Headers</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">PCRE</emphasis></term>
+<listitem><para>Perl Compatible Regular Expression</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">PID</emphasis></term>
+<listitem><para>Process Identifier</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">PLFS</emphasis></term>
+<listitem><para>Pure Linux From Scratch</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">PTY</emphasis></term>
+<listitem><para>pseudo terminal</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">QA</emphasis></term>
+<listitem><para>Quality Assurance</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">QOS</emphasis></term>
+<listitem><para>Quality Of Service</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">RAM</emphasis></term>
+<listitem><para>Random Access Memory</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">RPC</emphasis></term>
+<listitem><para>Remote Procedure Call</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">RTC</emphasis></term>
+<listitem><para>Real Time Clock</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">SBU</emphasis></term>
+<listitem><para>Static Binutils Unit</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">SCO</emphasis></term>
+<listitem><para>The Santa Cruz Operation</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">SGR</emphasis></term>
+<listitem><para>Select Graphic Rendition</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">SHA1</emphasis></term>
+<listitem><para>Secure-Hash Algorithm 1</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">SMP</emphasis></term>
+<listitem><para>Symmetric Multi-Processor</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">TLDP</emphasis></term>
+<listitem><para>The Linux Documentation Project</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">TFTP</emphasis></term>
+<listitem><para>Trivial File Transfer Protocol</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">TLS</emphasis></term>
+<listitem><para>Thread-Local Storage</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">UID</emphasis></term>
+<listitem><para>User Identifier</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">umask</emphasis></term>
+<listitem><para>user file-creation mask</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">USB</emphasis></term>
+<listitem><para>Universal Serial Bus</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">UTC</emphasis></term>
+<listitem><para>Coordinated Universal Time</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">UUID</emphasis></term>
+<listitem><para>Universally Unique Identifier</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">VC</emphasis></term>
+<listitem><para>Virtual Console</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">VGA</emphasis></term>
+<listitem><para>Video Graphics Array</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><emphasis role="bold">VT</emphasis></term>
+<listitem><para>Virtual Terminal</para></listitem>
+</varlistentry>
+
+</variablelist>
</appendix>
diff --git a/appendixb/acknowledgments.xml b/appendixb/acknowledgments.xml
index 332735422..c7c8aa2c2 100644
--- a/appendixb/acknowledgments.xml
+++ b/appendixb/acknowledgments.xml
@@ -8,7 +8,290 @@
<title>Acknowledgments</title>
<?dbhtml filename="acknowledgements.html"?>
-<para>See testing</para>
+<para>We would like to thank the following people and organizations
+for their contributions to the Linux From Scratch Project.</para>
+
+<bridgehead renderas="sect2">Project Team Members</bridgehead>
+
+<itemizedlist>
+
+<listitem><para><ulink url="mailto:gerard@linuxfromscratch.org">Gerard
+Beekmans</ulink> &lt;gerard@linuxfromscratch.org&gt; &ndash; Linux From
+Scratch initiator, LFS Project organizer</para></listitem>
+
+<listitem><para><ulink
+url="mailto:theladyskye@linuxfromscratch.org">Christine
+Barczak</ulink> &lt;theladyskye@linuxfromscratch.org&gt; &ndash; LFS Book
+Editor</para></listitem>
+
+<listitem><para><ulink
+url="mailto:matthew@linuxfromscratch.org">Matthew Burgess</ulink>
+&lt;matthew@linuxfromscratch.org&gt; &ndash; LFS Project Co-Leader, LFS
+general package maintainer, LFS Technical Writer.</para></listitem>
+
+<listitem><para><ulink url="mailto:meerkats@bellsouth.net">Craig
+Colton</ulink> &lt;meerkats@bellsouth.net&gt; &ndash; LFS, Automated Linux
+From Scratch (ALFS), BLFS and hints project logo
+creator</para></listitem>
+
+<listitem><para><ulink url="mailto:nathan@linuxfromscratch.org">Nathan
+Coulson</ulink> &lt;nathan@linuxfromscratch.org&gt; &ndash; LFS bootscripts
+maintainer</para></listitem>
+
+<listitem><para><ulink url="mailto:jeroen@linuxfromscratch.org">Jeroen
+Coumans</ulink> &lt;jeroen@linuxfromscratch.org&gt; &ndash; Website
+developer, FAQ maintainer</para></listitem>
+
+<listitem><para><ulink url="mailto:bdubbs@linuxfromscratch.org">Bruce
+Dubbs</ulink> &lt;bdubbs@linuxfromscratch.org&gt; &ndash; LFS Quality
+Assurance (QA) Team leader, BLFS Book Editor</para></listitem>
+
+<listitem><para><ulink url="mailto:manuel@linuxfromscratch.org">Manuel
+Canales Esparcia</ulink> &lt;manuel@linuxfromscratch.org&gt; &ndash; LFS
+XML/XSL maintainer</para></listitem>
+
+<listitem><para><ulink url="mailto:jim@linuxfromscratch.org">Jim
+Gifford</ulink> &lt;jim@linuxfromscratch.org&gt; &ndash; LFS Technical
+Writer, Patches maintainer</para></listitem>
+
+<listitem><para><ulink url="mailto:jhuntwork@linuxfromscratch.org">Jeremy
+Huntwork</ulink> &lt;jhuntwork@linuxfromscratch.org&gt; &ndash; ALFS Maintainer, LFS Live-CD maintainer</para></listitem>
+
+<listitem><para><ulink
+url="mailto:nicholas@linuxfromscratch.org">Nicholas Leippe</ulink>
+&lt;nicholas@linuxfromscratch.org&gt; &ndash; Wiki
+maintainer</para></listitem>
+
+<listitem><para><ulink
+url="mailto:lizardo@linuxfromscratch.org">Anderson Lizardo</ulink>
+&lt;lizardo@linuxfromscratch.org&gt; &ndash; Website backend scripts
+maintainer</para></listitem>
+
+<listitem><para><ulink url="mailto:scot@linuxfromscratch.org">Scot
+Mc Pherson</ulink> &lt;scot@linuxfromscratch.org&gt; &ndash; LFS NNTP gateway
+maintainer.</para></listitem>
+
+<listitem><para><ulink url="mailto:ryan@linuxfromscratch.org">Ryan
+Oliver</ulink> &lt;ryan@linuxfromscratch.org&gt; &ndash; Testing Team
+leader, Toolchain maintainer, co-creator of Pure LFS
+(PLFS)</para></listitem>
+
+<listitem><para><ulink url="mailto:semzx@newmail.ru">Alexander
+Patrakov</ulink> &lt;semzx@newmail.ru&gt; &ndash; Former LFS Technical
+Writer</para></listitem>
+
+<listitem><para><ulink url="mailto:jwrober@linuxfromscratch.org">James
+Robertson</ulink> &lt;jwrober@linuxfromscratch.org&gt; &ndash; Bugzilla
+maintainer, Wiki developer, LFS Tecnical Writer</para></listitem>
+
+<listitem><para><ulink url="mailto:tushar@linuxfromscratch.org">Tushar
+Teredesai</ulink> &lt;tushar@linuxfromscratch.org&gt; &ndash; BLFS Book
+Editor, hints and patches projects maintainer</para></listitem>
+
+<listitem><para><ulink url="mailto:jeremy@linuxfromscratch.org">Jeremy
+Utley</ulink> &lt;jeremy@linuxfromscratch.org&gt; &ndash; LFS Technical
+Writer, Bugzilla maintainer, LFS bootscripts maintainer, LFS Server
+co-administrator</para></listitem>
+
+<listitem><para><ulink url="mailto:zwinkles@gmail.com">Zack
+Winkles</ulink> &lt;zwinkles@gmail.com&gt; &ndash; Former LFS Technical
+Writer</para></listitem>
+
+<listitem><para>Countless other people on the various LFS and BLFS mailing lists
+who helped make this book possible by giving their suggestions,
+testing the book, and submitting bug reports, instructions, and their
+experiences with installing various packages.</para></listitem>
+
+</itemizedlist>
+
+<bridgehead renderas="sect2">Translators</bridgehead>
+
+<itemizedlist>
+
+<listitem><para><ulink url="mailto:macana@lfs-es.com">Manuel Canales
+Esparcia</ulink> &lt;macana@lfs-es.com&gt; &ndash; Spanish LFS translation
+project</para></listitem>
+
+<listitem><para><ulink url="mailto:johan@linuxfromscratch.org">Johan
+Lenglet</ulink> &lt;johan@linuxfromscratch.org&gt; &ndash; French LFS
+translation project</para></listitem>
+
+<listitem><para><ulink
+url="mailto:lizardo@linuxfromscratch.org">Anderson Lizardo</ulink>
+&lt;lizardo@linuxfromscratch.org&gt; &ndash; Portuguese LFS translation
+project</para></listitem>
+
+<listitem><para><ulink url="mailto:tr@erdfunkstelle.de">Thomas
+Reitelbach </ulink> &lt;tr@erdfunkstelle.de&gt; &ndash; German LFS
+translation project</para> </listitem>
+
+</itemizedlist>
+
+<bridgehead renderas="sect2">Mirror Maintainers</bridgehead>
+
+<bridgehead renderas="sect3">North American Mirrors</bridgehead>
+
+<itemizedlist>
+
+<listitem><para><ulink url="mailto:scott@osuosl.org">Scott
+Kveton</ulink> &lt;scott@osuosl.org&gt; &ndash; lfs.oregonstate.edu
+mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:miha@xuy.biz">Mikhail
+Pastukhov</ulink> &lt;miha@xuy.biz&gt; &ndash; lfs.130th.net
+mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:lost@l-w.net">William Astle</ulink>
+&lt;lost@l-w.net&gt; &ndash; ca.linuxfromscratch.org
+mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:jpolen@rackspace.com">Jeremy
+Polen</ulink> &lt;jpolen@rackspace.com&gt; &ndash; us2.linuxfromscratch.org
+mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:tim@idge.net">Tim Jackson</ulink>
+&lt;tim@idge.net&gt; &ndash; linuxfromscratch.idge.net
+mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:jeremy@linux-phreak.net">Jeremy
+Utley </ulink> &lt;jeremy@linux-phreak.net&gt; &ndash; lfs.linux-phreak.net
+mirror</para></listitem>
+
+</itemizedlist>
+
+<bridgehead renderas="sect3">South American Mirrors</bridgehead>
+
+<itemizedlist>
+
+<listitem><para><ulink url="mailto:sysop@mesi.com.ar">Andres
+Meggiotto</ulink> &lt;sysop@mesi.com.ar&gt; &ndash; lfs.mesi.com.ar
+mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:manuel@linuxfromscratch.org">Manuel
+Canales Esparcia</ulink> &lt;manuel@linuxfromscratch.org&gt; &ndash;
+www.dattaweb.com/~lfs-eso/lfsmirror mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:ebf@aedsolucoes.com.br">Eduardo B.
+Fonseca</ulink> &lt;ebf@aedsolucoes.com.br&gt; &ndash;
+br.linuxfromscratch.org mirror</para></listitem>
+
+</itemizedlist>
+
+<bridgehead renderas="sect3">European Mirrors</bridgehead>
+
+<itemizedlist>
+
+<listitem><para><ulink url="mailto:barna@siker.hu">Barna
+Koczka</ulink> &lt;barna@siker.hu&gt; &ndash; hu.linuxfromscratch.org
+mirror</para></listitem>
+
+<listitem><para><ulink url="http://www.mirror.ac.uk">UK Mirror
+Service</ulink> &ndash; linuxfromscratch.mirror.ac.uk
+mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:Martin.Voss@ada.de">Martin
+Voss</ulink> &lt;Martin.Voss@ada.de&gt; &ndash; lfs.linux-matrix.net
+mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:guido@primerelay.net">Guido
+Passet</ulink> &lt;guido@primerelay.net&gt; &ndash; nl.linuxfromscratch.org
+mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:baafie@planet.nl">Bastiaan
+Jacques</ulink> &lt;baafie@planet.nl&gt; &ndash; lfs.pagefault.net
+mirror</para></listitem>
+
+<listitem><para><ulink
+url="mailto:lfs-mirror@linuxfromscratch.rave.org">Roel Neefs</ulink>
+&lt;lfs-mirror@linuxfromscratch.rave.org&gt; &ndash;
+linuxfromscratch.rave.org mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:justin@jrknierim.de">Justin
+Knierim</ulink> &lt;justin@jrknierim.de&gt; &ndash; www.lfs-matrix.de
+mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:stevie@stevie20.de">Stephan
+Brendel</ulink> &lt;stevie@stevie20.de&gt; &ndash; lfs.netservice-neuss.de
+mirror</para></listitem>
+
+<listitem><para><ulink
+url="mailto:Antonin.Sprinzl@tuwien.ac.at">Antonin Sprinzl</ulink>
+&lt;Antonin.Sprinzl@tuwien.ac.at&gt; &ndash; at.linuxfromscratch.org
+mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:fredan-lfs@fredan.org">Fredrik
+Danerklint</ulink> &lt;fredan-lfs@fredan.org&gt; &ndash;
+se.linuxfromscratch.org mirror</para></listitem>
+
+<listitem><para><ulink
+url="mailto:archive@doc.cs.univ-paris8.fr">Parisian sysadmins</ulink>
+&lt;archive@doc.cs.univ-paris8.fr&gt; &ndash; www2.fr.linuxfromscratch.org
+mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:velin@zadnik.org">Alexander
+Velin</ulink> &lt;velin@zadnik.org&gt; &ndash; bg.linuxfromscratch.org
+mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:dirk@securewebservices.co.uk"> Dirk
+Webster</ulink> &lt;dirk@securewebservices.co.uk&gt; &ndash;
+lfs.securewebservices.co.uk mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:thomas@sofagang.dk">Thomas
+Skyt</ulink> &lt;thomas@sofagang.dk&gt; &ndash; dk.linuxfromscratch.org
+mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:sime@dot-sime.com">Simon
+Nicoll</ulink> &lt;sime@dot-sime.com&gt; &ndash; uk.linuxfromscratch.org
+mirror</para>
+</listitem>
+
+</itemizedlist>
+
+<bridgehead renderas="sect3">Asian Mirrors</bridgehead>
+
+<itemizedlist>
+
+<listitem><para><ulink url="mailto:pyng@spam.averse.net">Pui
+Yong</ulink> &lt;pyng@spam.averse.net&gt; &ndash; sg.linuxfromscratch.org
+mirror</para></listitem>
+
+<listitem><para><ulink url="mailto:stuart@althalus.me.uk">Stuart
+Harris</ulink> &lt;stuart@althalus.me.uk&gt; &ndash;
+lfs.mirror.intermedia.com.sg mirror</para></listitem>
+
+</itemizedlist>
+
+<bridgehead renderas="sect3">Australian Mirrors</bridgehead>
+
+<itemizedlist>
+
+<listitem><para><ulink url="mailto:jason@dstc.edu.au">Jason
+Andrade</ulink> &lt;jason@dstc.edu.au&gt; &ndash; au.linuxfromscratch.org
+mirror</para></listitem>
+
+</itemizedlist>
+
+<bridgehead renderas="sect2">A very special thank you to our donators</bridgehead>
+
+<itemizedlist>
+
+<listitem><para><ulink url="mailto:dean@vipersoft.co.uk">Dean
+Benson</ulink> &lt;dean@vipersoft.co.uk&gt; for several monetary
+contributions</para></listitem>
+
+<listitem><para><ulink url="mailto:hrx@hrxnet.de">Hagen
+Herrschaft</ulink> &lt;hrx@hrxnet.de&gt; for donating a 2.2 GHz P4
+system, now running under the name of Lorien</para></listitem>
+
+<listitem><para><ulink url="http://www.vasoftware.com">VA
+Software</ulink> who, on behalf of <ulink
+url="http://www.linux.com">Linux.com</ulink>, donated a VA Linux 420
+(former StartX SP2) workstation</para></listitem>
+
+<listitem><para>Mark Stone for donating Belgarath, the
+linuxfromscratch.org server</para></listitem>
+
+</itemizedlist>
</appendix>
diff --git a/chapter01/administrativa.xml b/chapter01/administrativa.xml
index adf02c2b0..6708e8d06 100644
--- a/chapter01/administrativa.xml
+++ b/chapter01/administrativa.xml
@@ -7,6 +7,86 @@
<title>Resources</title>
<?dbhtml filename="resources.html"?>
-<para>See testing</para>
+
+<sect2 id="ch-scatter-faq">
+<title>FAQ</title>
+
+<para>If during the building of the LFS system you encounter any
+errors, have any questions, or think there is a typo in the book,
+please start by consulting the Frequently Asked Questions (FAQ) at
+<ulink url="&faq-root;"/>.</para>
+</sect2>
+
+<sect2 id="ch-scatter-maillists" xreflabel="Chapter 1 - Mailing Lists">
+<title>Mailing Lists</title>
+
+<para>The <uri>linuxfromscratch.org</uri> server hosts a number of
+mailing lists used for the development of the LFS project. These lists
+include the main development and support lists, among others.</para>
+
+<para>For information on the different lists, how to subscribe, archive
+locations, and additional information, visit
+<ulink url="&lfs-root;mail.html"/>.</para>
+</sect2>
+
+<sect2 id="ch-scatter-irc">
+<title>IRC</title>
+
+<para>Several members of the LFS community offer assistance on our
+community Internet Relay Chat (IRC) network. Before using this
+support, please make sure that your question is not already answered in the LFS
+FAQ or the mailing list archives. You can find the IRC network at
+<uri>irc.linuxfromscratch.org</uri>, <uri>irc.linux-phreak.net</uri>
+or <uri>irc.lfs-matrix.de</uri>.
+The support channel is named #LFS-support.</para>
+</sect2>
+
+<sect2 id="ch-scatter-newsserver">
+<title>News Server</title>
+
+<para>The mailing lists hosted at <uri>linuxfromscratch.org</uri> are
+also accessible via the Network News Transfer Protocol (NNTP) server.
+All messages posted to a mailing list are copied to the corresponding
+newsgroup, and vice versa.</para>
+
+<para>The news server is located at
+<uri>news.linuxfromscratch.org</uri>.</para>
+</sect2>
+
+<sect2 id="ch-scatter-wiki">
+<title>Wiki</title>
+
+<para>For more information on packages, updated versions, tweaks, and
+personal experiences, see the LFS Wiki at <ulink url="&wiki-root;"/>.
+Users can also add information there to help others with their future
+LFS activities.</para>
+</sect2>
+
+<sect2 id="ch-scatter-references">
+<title>References</title>
+
+<para>For additional information on the packages, useful tips are
+available at
+<ulink
+url="http://www.linuxfromscratch.org/~matthew/LFS-references.html"/>.</para>
+</sect2>
+
+
+<sect2 id="ch-scatter-mirrors" xreflabel="Chapter 1 - Mirror sites">
+<title>Mirror Sites</title>
+
+<para>The LFS project has a number of world-wide mirrors to make
+accessing the website and downloading the required packages more
+convenient. Please visit the LFS website at <ulink url="&lfs-root;"/>
+for a list of current mirrors.</para>
+</sect2>
+
+<sect2 id="ch-scatter-contactinfo">
+<title>Contact Information</title>
+
+<para>Please direct all your questions and comments to one of the LFS mailing
+lists (see above).</para>
+</sect2>
</sect1>
+
diff --git a/chapter01/askforhelp.xml b/chapter01/askforhelp.xml
index df7e83f11..1dc36c365 100644
--- a/chapter01/askforhelp.xml
+++ b/chapter01/askforhelp.xml
@@ -7,6 +7,110 @@
<title>Help</title>
<?dbhtml filename="askforhelp.html"?>
-<para>See testing</para>
+<para>If an issue or a question is encountered while working
+through this book, check the FAQ page at <ulink url="&faq-root;#generalfaq"/>.
+Questions are often already answered there. If your question is
+not answered on this page, try to find the source of the problem. The
+following hint will give you some guidance for troubleshooting: <ulink
+url="&hints-root;errors.txt"/>.</para>
+
+<para>We also have a wonderful LFS community that is willing to offer
+assistance through IRC and the mailing lists (see the <xref
+linkend="ch-scatter-administrativa"/> section of this book). In order
+to assist with diagnosing and solving the problem, please include
+all relevant information in your request for help.</para>
+
+<sect2>
+<title>Things to Mention</title>
+
+<para>Apart from a brief explanation of the problem being experienced,
+the essential things to include in any request for help are:</para>
+
+<itemizedlist>
+<listitem><para>The version of the book being used (in this case
+&version;)</para></listitem>
+<listitem><para>The host distribution and version being used to
+create LFS</para></listitem>
+<listitem><para>The package or section the problem was encountered in</para></listitem>
+<listitem><para>The exact error message or symptom being received</para></listitem>
+<listitem><para>Note whether you have deviated from the book at all </para></listitem>
+</itemizedlist>
+
+<note><para>Deviating from this book does <emphasis>not</emphasis>
+mean that we will not help you. After all, LFS is about personal
+preference. Being upfront about any changes to the established
+procedure helps us evaluate and determine possible causes of your
+problem.</para></note>
+</sect2>
+
+<sect2>
+<title>Configure Problems</title>
+
+<para>If something goes wrong during the stage where the configure
+script is run, review the <filename>config.log</filename> file. This
+file may contain errors encountered during configure which were not
+printed to the screen. Include those relevant lines if you need to ask
+for help.</para>
+</sect2>
+
+<sect2>
+<title>Compile Problems</title>
+
+<para>Both the screen output and the contents of various files are
+useful in determining the cause of compile issues. The screen output
+from the <command>./configure</command> script and the
+<command>make</command> run can be helpful. It
+is not necessary to include the entire output, but do include enough
+of the relevant information. Below is an example of the type of
+information to include from the screen output from <command>make</command>:</para>
+
+<screen><computeroutput>gcc -DALIASPATH=\"/mnt/lfs/usr/share/locale:.\"
+-DLOCALEDIR=\"/mnt/lfs/usr/share/locale\"
+-DLIBDIR=\"/mnt/lfs/usr/lib\"
+-DINCLUDEDIR=\"/mnt/lfs/usr/include\" -DHAVE_CONFIG_H -I. -I.
+-g -O2 -c getopt1.c
+gcc -g -O2 -static -o make ar.o arscan.o commands.o dir.o
+expand.o file.o function.o getopt.o implicit.o job.o main.o
+misc.o read.o remake.o rule.o signame.o variable.o vpath.o
+default.o remote-stub.o version.o opt1.o
+-lutil job.o: In function `load_too_high':
+/lfs/tmp/make-3.79.1/job.c:1565: undefined reference
+to `getloadavg'
+collect2: ld returned 1 exit status
+make[2]: *** [make] Error 1
+make[2]: Leaving directory `/lfs/tmp/make-3.79.1'
+make[1]: *** [all-recursive] Error 1
+make[1]: Leaving directory `/lfs/tmp/make-3.79.1'
+make: *** [all-recursive-am] Error 2</computeroutput></screen>
+
+<para>In this case, many people would just include the bottom
+section:</para>
+
+<screen><computeroutput>make [2]: *** [make] Error 1</computeroutput></screen>
+
+<para>This is not enough information to properly diagnose the problem
+because it only notes that something went wrong, not
+<emphasis>what</emphasis> went wrong. The entire section, as in the
+example above, is what should be saved because it includes the command
+that was executed and the associated error message(s).</para>
+
+<para>An excellent article about asking for help on the Internet is
+available online at <ulink
+url="http://catb.org/~esr/faqs/smart-questions.html"/>. Read and
+follow the hints in this document to increase the likelihood of getting
+the help you need.</para>
+</sect2>
+
+<sect2>
+<title>Test Suite Problems</title>
+
+<para>Many packages provide a test suite which, depending on the
+importance of the package, should be run. Sometimes packages will
+generate false or expected failures. If these errors are encountered,
+check the LFS Wiki page at <ulink url="&wiki-root;"/> to see if we have
+noted and investigated these issues. If these issues are noted and
+addressed, there is no need to be concerned.</para>
+</sect2>
</sect1>
+
diff --git a/chapter01/bootcd.xml b/chapter01/bootcd.xml
index 773f76c9b..47542fc6f 100644
--- a/chapter01/bootcd.xml
+++ b/chapter01/bootcd.xml
@@ -7,7 +7,60 @@
<title>About the Included CD</title>
<?dbhtml filename="bootcd.html"?>
-<para>See testing</para>
+<para>For your convenience, we have included a CD with this book that
+contains the source packages needed for creating a Linux From Scratch
+system. The CD is bootable and provides a stable working environment
+for building LFS. This book refers to this system as the
+<quote>host system.</quote> The CD images are actively maintained and
+updated versions can be found at
+<ulink url="ftp://ftp.lfs-matrix.net/pub/lfs-livecd/"/></para>
+
+<para>In addition to the tools required to build LFS, the host system
+on the CD has a number of other helpful tools installed:</para>
+
+<itemizedlist>
+ <listitem><para>An HTML version of this book</para></listitem>
+ <listitem><para>The X Window System Environment</para></listitem>
+ <listitem>
+ <para>Web Tools</para>
+ <itemizedlist>
+ <listitem><para>Wget (command line file retriever)</para></listitem>
+ <listitem><para>Lynx (text web browser)</para></listitem>
+ <listitem><para>Irssi (console IRC client)</para></listitem>
+ <listitem><para>Firefox (graphical web browser)</para></listitem>
+ <listitem><para>Xchat (X-based IRC client)</para></listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
+ <para>Text Editors</para>
+ <itemizedlist>
+ <listitem><para>Vim</para></listitem>
+ <listitem><para>Nano</para></listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
+ <para>Network Tools</para>
+ <itemizedlist>
+ <listitem><para>SSH Server and Client</para></listitem>
+ <listitem><para>NFS Server and Client</para></listitem>
+ <listitem><para>Smbmount (mount.cifs) for Windows shares</para></listitem>
+ <listitem><para>Subversion</para></listitem>
+ <listitem><para>Dhcpcd (DHCP client)</para></listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
+ <para>Filesystem Programs</para>
+ <itemizedlist>
+ <listitem><para>Reiserfsprogs</para></listitem>
+ <listitem><para>Xfsprogs</para></listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem><para>nALFS - A tool for automating LFS builds</para></listitem>
+</itemizedlist>
</sect1>
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index 1721d7913..c0f2ba9ed 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -3,7 +3,7 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-scatter-changelog" condition="no-print">
+<sect1 id="ch-scatter-changelog" condition="html">
<title>Changelog</title>
<?dbhtml filename="changelog.html"?>
@@ -12,141 +12,188 @@
version is probably already available. To find out, please check one of the
mirrors via <ulink url="&lfs-root;"/>.</para>
-<para>Below is a list of differences between the Testing and Unstable versions
-of the LFS Book.</para>
+<para>Below is a list of changes made since the previous release of the book,
+first a summary, then a detailed log.</para>
<itemizedlist>
<listitem><para>Upgraded to:</para>
<itemizedlist>
-<listitem><para>automake-1.9.5</para></listitem>
-<listitem><para>e2fsprogs-1.36</para></listitem>
-<listitem><para>expect-5.43.0</para></listitem>
-<listitem><para>file-4.13</para></listitem>
-<listitem><para>findutils-4.2.17</para></listitem>
-<listitem><para>glibc-2.3.4</para></listitem>
-<listitem><para>grub-0.96</para></listitem>
-<listitem><para>lfs-bootscripts-3.1.0</para></listitem>
-<listitem><para>libol-0.3.15</para></listitem>
-<listitem><para>libtool-1.5.14</para></listitem>
-<listitem><para>linux-libc-headers-2.6.10.0</para></listitem>
-<listitem><para>procps-3.2.5</para></listitem>
-<listitem><para>sed-4.1.4</para></listitem>
-<listitem><para>shadow-4.0.7</para></listitem>
-<listitem><para>syslog-ng-1.6.6</para></listitem>
-<listitem><para>util-linux-2.12q</para></listitem>
+<listitem><para>Automake 1.9.5</para></listitem>
+<listitem><para>Binutils 2.15.94.0.2</para></listitem>
+<listitem><para>Bison 2.0</para></listitem>
+<listitem><para>E2fsprogs 1.36</para></listitem>
+<listitem><para>Expect 5.43.0</para></listitem>
+<listitem><para>File 4.13</para></listitem>
+<listitem><para>Findutils 4.2.17</para></listitem>
+<listitem><para>GCC 3.4.3</para></listitem>
+<listitem><para>Glibc 20041011</para></listitem>
+<listitem><para>Grep 2.5.1a</para></listitem>
+<listitem><para>Grub 0.96</para></listitem>
+<listitem><para>Iana-Etc 1.03</para></listitem>
+<listitem><para>Iproute2 2.6.9-041019</para></listitem>
+<listitem><para>LFS-Bootscripts 3.1.0</para></listitem>
+<listitem><para>Libtool 1.5.14</para></listitem>
+<listitem><para>Linux 2.6.10</para></listitem>
+<listitem><para>Linux-libc-headers 2.6.10.0</para></listitem>
+<listitem><para>Man 1.5p</para></listitem>
+<listitem><para>Man-pages 2.01</para></listitem>
+<listitem><para>Module-init-tools 3.1</para></listitem>
+<listitem><para>Perl 5.8.6</para></listitem>
+<listitem><para>Procps 3.2.5</para></listitem>
+<listitem><para>Sed 4.1.4</para></listitem>
+<listitem><para>Shadow 4.0.7</para></listitem>
+<listitem><para>Sysvinit 2.86</para></listitem>
+<listitem><para>Tar 1.15.1</para></listitem>
+<listitem><para>Texinfo 4.8</para></listitem>
+<listitem><para>Tcl 8.4.9</para></listitem>
+<listitem><para>Udev 050</para></listitem>
+<listitem><para>Util-linux 2.12q</para></listitem>
+<listitem><para>Zlib 1.2.2</para></listitem>
</itemizedlist>
</listitem>
<listitem><para>Added:</para>
<itemizedlist>
-<listitem><para>bash-3.0-fixes-3.patch</para></listitem>
+<listitem><para>bash-3.0-fixes-1.patch</para></listitem>
+<listitem><para>bash-3.0-avoid_WCONTINUED-1.patch</para></listitem>
+<listitem><para>Hotplug 2004_09_23</para></listitem>
<listitem><para>iproute2-2.6.9_041019-find_update-1.patch</para></listitem>
+<listitem><para>Libol 0.3.15</para></listitem>
+<listitem><para>linux-2.6.10-security_fix-1.patch</para></listitem>
+<listitem><para>Syslog-ng 1.6.6</para></listitem>
+<listitem><para>util-linux-2.12p-cramfs-1.patch</para></listitem>
+<listitem><para>vim-6.0-security_fix-1.patch</para></listitem>
</itemizedlist>
</listitem>
-
+
<listitem><para>Removed:</para>
<itemizedlist>
-<listitem><para>bash-3.0-fixes-1.patch</para></listitem>
+<listitem><para>bash-3.0-display_wrap-1.patch</para></listitem>
+<listitem><para>man-1.5o1-80cols-1.patch</para></listitem>
+<listitem><para>Sysklogd 1.4.1</para></listitem>
+<listitem><para>sysvinit-2.85-proclen-1.patch</para></listitem>
+<listitem><para>texinfo-4.7-segfault-1.patch</para></listitem>
+<listitem><para>util-linux-2.12b-sfdisk-1.patch</para></listitem>
+<listitem><para>zlib-1.2.1-security-1.patch</para></listitem>
</itemizedlist>
</listitem>
-<listitem><para>February 13, 2005 [matt]: Add a link to BLFS' index of
-packages requiring kernel configuration. Fixes bug 1028.</para></listitem>
+<listitem><para>February 19, 2005 [gerard]: Synchronized Testing
+branch with current Unstable/Trunk. Move Testing branch to Trunk and
+discontinue Testing branch as per lfs-dev discussion on branch
+changes.</para></listitem>
-<listitem><para>February 13, 2005 [matt]: Fix bug 1030 by moving the <quote>Get
-Counted</quote> section to after the user has rebooted for the first time.
-Fixes bug 1030.</para></listitem>
+<listitem><para>February 5, 2005 [matt]: Copy hotplug's pnp.distmap file to
+silence its warnings. Also tidy up some explanatory text</para></listitem>
-<listitem><para>February 13, 2005 [matt]: Upgraded to glibc-2.3.4</para>
-</listitem>
+<listitem><para>January 29, 2005 [matt]: Upgraded to sed-4.1.4</para></listitem>
-<listitem><para>February 13, 2005 [matt]: Upgraded to grub-0.96</para>
+<listitem><para>January 29, 2005 [matt]: Upgraded to procps-3.2.5</para>
</listitem>
-<listitem><para>February 13, 2005 [matt]: Upgraded to e2fsprogs-1.36</para>
+<listitem><para>January 29, 2005 [matt]: Upgraded to shadow-4.0.7</para>
</listitem>
-<listitem><para>February 13, 2005 [matt]: Upgraded to findutils-4.2.17</para>
+<listitem><para>January 29, 2005 [matt]: Upgraded to util-linux-2.12q.</para>
</listitem>
-<listitem><para>February 13, 2005 [matt]: Upgraded to expect-5.43.0</para>
-</listitem>
+<listitem><para>January 27, 2005 [matt]: Added a warning that the
+<filename class="symlink">/usr/src/linux</filename> symlink shouldn't be
+created. Fixes bug 1012.</para></listitem>
-<listitem><para>February 13, 2005 [matt]: Upgraded to libtool-1.5.14</para>
-</listitem>
+<listitem><para>January 27, 2005 [matt]: Added link to the live-cd FTP
+location. Fixes bug 1014.</para></listitem>
-<listitem><para>February 13, 2005 [matt]: Upgraded to automake-1.9.5</para>
-</listitem>
+<listitem><para>January 27, 2005 [matt]: Added bison, flex and m4 to binutils
+dependency list. Fixes Bug 1018.</para></listitem>
-<listitem><para>February 13, 2005 [matt]: Upgraded to file-4.13</para>
-</listitem>
+<listitem><para>January 27, 2005 [manuel]: Updated to gcc-3.4.3-specs-2.patch.</para></listitem>
-<listitem><para>February 5, 2005 [matt]: Added a space to the toolchain
-readjustment <command>perl</command> command. This stops the specs file being
-incorrectly modified if the command is run more than once. Fixes bug 1023.
-</para></listitem>
+<listitem><para>January 19, 2005 [jeremy]: Added an extra symlink for
+libgcc_s.so to chapter 6 - this never migrated from unstable until now.</para></listitem>
-<listitem><para>February 5, 2005 [matt]: Copy hotplug's pnp.distmap file to
-silence its warnings</para></listitem>
+<listitem><para>January 9, 2005 [matt]: Added a security patch for the kernel</para></listitem>
-<listitem><para>February 5, 2005 [matt]: Upgraded to syslog-ng-1.6.6</para>
-</listitem>
+<listitem><para>January 9, 2005 [matt]: Added a security patch for vim</para></listitem>
-<listitem><para>February 5, 2005 [matt]: Upgraded to libol-0.3.15</para>
-</listitem>
+<listitem><para>January 9, 2005 [matt]: Upgraded to man-1.5p</para></listitem>
-<listitem><para>January 29th, 2005 [matt]: Upgraded to findutils 4.2.15</para>
-</listitem>
+<listitem><para>January 9, 2005 [matt]: Upgraded to texinfo-4.8</para></listitem>
-<listitem><para>January 28th, 2005 [matt]: Upgraded to sed-4.1.4</para>
-</listitem>
+<listitem><para>January 9, 2005 [matt]: Upgraded to util-linux-2.12p</para></listitem>
-<listitem><para>January 27th, 2005 [matt]: Upgraded to findutils 4.2.14</para>
-</listitem>
+<listitem><para>January 9, 2005 [matt]: Upgraded to udev-050</para></listitem>
-<listitem><para>January 27th, 2005 [matt]: Upgraded to sed-4.1.3</para>
-</listitem>
+<listitem><para>January 9, 2005 [matt]: Upgraded to tcl-8.4.9</para></listitem>
-<listitem><para>January 27th, 2005 [matt]: Upgraded to procps-3.2.5</para>
-</listitem>
+<listitem><para>January 9, 2005 [matt]: Upgraded to tar-1.15.1</para></listitem>
-<listitem><para>January 27th, 2005 [matt]: Upgraded to shadow-4.0.7</para>
-</listitem>
+<listitem><para>January 9, 2005 [matt]: Upgraded to perl-5.8.6</para></listitem>
-<listitem><para>January 27th, 2005 [matt]: Upgraded to util-linux-2.12q</para>
-</listitem>
+<listitem><para>January 9, 2005 [matt]: Upgraded to man-pages-2.01</para></listitem>
+
+<listitem><para>January 9, 2005 [matt]: Upgraded to linux-libc-headers-2.6.10.0</para></listitem>
+
+<listitem><para>January 9, 2005 [matt]: Upgraded to linux-2.6.10</para></listitem>
+
+<listitem><para>January 9, 2005 [matt]: Upgraded to gcc-3.4.3</para></listitem>
+
+<listitem><para>January 9, 2005 [matt]: Upgraded to bison-2.0</para></listitem>
-<listitem><para>January 9th, 2005 [jeremy]: Removed --enable-shared from libol,
-since the shared library is installed by default for this package - thanks
-Archaic</para></listitem>
+<listitem><para>January 9, 2005 [matt]: Upgraded to autoconf-1.9.4</para></listitem>
-<listitem><para>January 5th, 2005 [jeremy]: Upgraded to findutils 4.2.11</para></listitem>
+<listitem><para>January 5, 2005 [jeremy]: Minor textual correction in network
+configuration, since iproute will not recognize the old eth0:1 format for
+ip aliasing. Closes bug 1013.</para></listitem>
-<listitem><para>December 31st, 2004 [jeremy]: Oops - forgot to remove the
-separate targets for hotplug and syslog-ng - fixed.</para></listitem>
+<listitem><para>January 5, 2005 [jeremy]: Added the --disable-selinux parameter
+to Ch 5 glibc. Allows building from hosts which use SELinux functionality,
+like Fedora Core 3</para></listitem>
-<listitem><para>December 31st, 2004 [jeremy]: Upgrade to LFS-Bootscripts 3.1.0</para></listitem>
+<listitem><para>December 25, 2004 [jeremy]: Added text suggested by MSB,
+closing Bug 943</para></listitem>
-<listitem><para>December 30th, 2004 [jeremy]: Added Archaic's sed to stop
-installation of shadow's groups binary, as well as it's man page.</para></listitem>
+<listitem><para>December 25, 2004 [jeremy]: Upgraded binutils to 2.14.94.0.2 -
+should fix the TLS strip issue that's been seen, at least on X86</para></listitem>
-<listitem><para>December 25th, 2004 [jeremy]: Upgrade to glibc snapshot
-of 20041220</para></listitem>
+<listitem><para>December 22, 2004 [manuel]: Readded to chapter09/reboot.xml a para lost
+from version 5.1.</para></listitem>
-<listitem><para>December 19th, 2004 [jeremy]: Updated GCC-testresults link to
-be appropriate for GCC 3.4.3</para></listitem>
+<listitem><para>December 20, 2004 [manuel]: Made Grub's configuration location
+FHS compliant.</para></listitem>
-<listitem><para>December 6th, 2004 [jim]: Fixes a few typo's done by me.
-Added a patch for IPRoute2 to fix usage with the newer findutils.
-Updated Readline and Zlib library location changes.
-Bumped findutils to 4.2.9 and util-linux 2.12j.
-Used the same methodology used on zlib and readline on shadow.</para></listitem>
+<listitem><para>December 19, 2004 [manuel]: Added the irc.lfs-matrix.de IRC server.</para></listitem>
-<listitem><para>December 3rd, 2004 [jim]: Changed readline and zlib instructions
-to use --libdir for the libraries. Bumped perl to 5.8.6. Corrected wording in
-readline.</para></listitem>
+<listitem><para>December 5, 2004 [jeremy]: Added the DOCBOOKTOMAN parameter
+to Module-init-utils - without this, compilation fails. Thanks Boris Buegling</para></listitem>
+
+<listitem><para>December 2, 2004 [jeremy]: Removed the old display_wrap bash
+patch, in favor of the newer fixes patch, and added the avoid_WCONTINUED
+patch as well</para></listitem>
+
+<listitem><para>December 2, 2004 [jeremy]: Upgraded to TCL 8.4.8, Grep 2.5.1a
+Util-linux 2.12i, Iana-etc 1.03, File 4.12, Module-init-tools 3.1, Procps 3.2.4
+</para></listitem>
+
+<listitem><para>December 2, 2004 [jeremy]: Migrated change from unstable to
+build Glibc against sanitized linux-libc-headers instead of raw kernel headers,
+bringing us more in line with what the kernel developers think should be
+happening.</para></listitem>
+
+<listitem><para>December 1, 2004 [jeremy]: Dropped Udev from being built in
+Chapter 5, in favor of creating a minimal set of devices at the beginning
+of Chapter 6. All devices are created after the installation of Udev near
+the end of Chapter 6</para></listitem>
+
+<listitem><para>December 1, 2004 [jeremy]: Upgraded to Automake 1.9.3,
+Binutils 2.15.92.0.2, Findutils 4.2.3, GCC 3.4.2, Glibc 20041011, Iana-Etc 1.02
+Iproute2 2.6.9-041019, LFS-Bootscripts 2.2.3, Libtool 1.5.10, Linux 2.6.9
+Linux-libc-headers 2.6.9.1, Man 1.5o1, Man-pages 1.70, Shadow 4.0.6,
+Udev 046, Zlib 1.2.2, Hotplug 2004_09_23, Libol 0.3.14, Syslog-ng 1.6.5</para></listitem>
</itemizedlist>
+<para>Branch frozen for LFS 6.0 as of October 10, 2004</para>
+
</sect1>
diff --git a/chapter01/how.xml b/chapter01/how.xml
index 98828fc8a..b2390fb48 100644
--- a/chapter01/how.xml
+++ b/chapter01/how.xml
@@ -7,6 +7,78 @@
<title>How to Build an LFS System</title>
<?dbhtml filename="how.html"?>
-<para>See testing</para>
+<para>The LFS system will be built by using a previously installed
+Linux distribution (such as Debian, Mandrake, Red Hat, or SuSE). This
+existing Linux system (the host) will be used as a starting point to
+provide necessary programs, including a compiler, linker, and shell,
+to build the new system. Select the <quote>development</quote> option
+during the distribution installation to be able to access these
+tools.</para>
+
+<para><xref linkend="chapter-partitioning"/> of this book describes how
+to create a new Linux native partition and file system, the place
+where the new LFS system will be compiled and installed. <xref
+linkend="chapter-getting-materials"/> explains which packages and
+patches need to be downloaded to build an LFS system and how to store
+them on the new file system. <xref linkend="chapter-final-preps"/>
+discusses the setup for an appropriate work environment. Please read
+<xref linkend="chapter-final-preps"/> carefully as it explains several
+important issues the developer should be aware of before beginning to
+work through <xref linkend="chapter-temporary-tools"/> and
+beyond.</para>
+
+<para><xref linkend="chapter-temporary-tools"/> explains the
+installation of a number of packages that will form the basic
+development suite (or toolchain) which is used to build the actual
+system in <xref linkend="chapter-building-system"/>. Some of these
+packages are needed to resolve circular dependencies&mdash;for example,
+to compile a compiler, you need a compiler.</para>
+
+<para><xref linkend="chapter-temporary-tools"/> also shows the user how
+to build a first pass of the toolchain, including Binutils and GCC
+(first pass basically means these two core packages will be
+re-installed a second time). The programs from these packages will be
+linked statically in order to be used independently of the host
+system. The next step is to build Glibc, the C library. Glibc will be
+compiled by the toolchain programs built in the first pass. Then, a
+second pass of the toolchain will be built. This time, the toolchain
+will be dynamically linked against the newly built Glibc. The
+remaining <xref linkend="chapter-temporary-tools"/> packages are built
+using this second pass toolchain. When this is done, the LFS
+installation process will no longer depend on the host distribution,
+with the exception of the running kernel.</para>
+
+<para>While this may initially seem like a lot of work to get away
+from a host distribution, a full technical explanation is provided at
+the beginning of <xref linkend="chapter-temporary-tools"/>,
+including notes on the differences between
+statically and dynamically-linked programs.</para>
+
+<para>In <xref linkend="chapter-building-system"/>, the full LFS system is
+built. The chroot (change root) program is used to enter a virtual
+environment and start a new shell whose root directory will be set to
+the LFS partition. This is very similar to rebooting and instructing
+the kernel to mount the LFS partition as the root partition. The
+system does not actually reboot, but instead chroots because creating a
+bootable system requires additional work which is not necessary just
+yet. The major advantage is that <quote>chrooting</quote> allows the
+builder to continue using the host while LFS is being built. While
+waiting for package compilation to complete, a user can switch to a
+different virtual console (VC) or X desktop and continue using the
+computer as normal.</para>
+
+<para>To finish the installation, the bootscripts are set up in <xref
+linkend="chapter-bootscripts"/>, and the kernel and boot loader are set
+up in <xref linkend="chapter-bootable"/>. <xref
+linkend="chapter-finalizing"/> contains information on furthering the
+LFS experience beyond this book. After the steps in this book have
+been implemented, the computer will be ready to reboot into the new
+LFS system.</para>
+
+<para>This is the process in a nutshell. Detailed information on each
+step is discussed in the following chapters and package descriptions.
+Items that may seem complicated will be clarified, and everything will
+fall into place as the developer embarks on the LFS adventure.</para>
</sect1>
+
diff --git a/chapter02/creatingfilesystem.xml b/chapter02/creatingfilesystem.xml
index 489153e23..f013b9dec 100644
--- a/chapter02/creatingfilesystem.xml
+++ b/chapter02/creatingfilesystem.xml
@@ -7,6 +7,30 @@
<title>Creating a File System on the Partition</title>
<?dbhtml filename="creatingfilesystem.html"?>
-<para>See testing</para>
+<para>Now that a blank partition has been set up, the file system can
+be created. The most widely-used system in the Linux world is the
+second extended file system (ext2), but with the newer high-capacity
+hard disks, the journaling file systems are becoming increasingly
+popular. Here we will create an ext2 file system, but build
+instructions for other file systems can be found at <ulink
+url="&blfs-root;view/svn/postlfs/filesystems.html"/>.</para>
+
+<para>To create an ext2 file system on the LFS partition, run the following:</para>
+
+<screen><userinput>mke2fs /dev/<replaceable>[xxx]</replaceable></userinput></screen>
+
+<para>Replace <replaceable>[xxx]</replaceable> with the name of the LFS
+partition (<filename class="devicefile">hda5</filename> in our previous example).</para>
+
+<para>If a swap partition was created, it will need to be initialized
+as a swap partition too (also known as formatting, as described above
+with <command>mke2fs</command>) by running the following. If you are using an existing
+swap partition, there is no need to format it.</para>
+
+<screen><userinput>mkswap /dev/<replaceable>[yyy]</replaceable></userinput></screen>
+
+<para>Replace <replaceable>[yyy]</replaceable> with the name of the swap
+partition.</para>
</sect1>
+
diff --git a/chapter02/creatingpartition.xml b/chapter02/creatingpartition.xml
index 78c4cbaa6..f3ef3de91 100644
--- a/chapter02/creatingpartition.xml
+++ b/chapter02/creatingpartition.xml
@@ -7,6 +7,51 @@
<title>Creating a New Partition</title>
<?dbhtml filename="creatingpartition.html"?>
-<para>See testing</para>
+<!--Edit Me-->
+<para>Like most other operating systems, LFS is usually installed on
+a dedicated partition. If you have an empty partition or enough
+unpartitioned space on one of your hard disks to make one, using this
+for your LFS installation is recommended. However, an LFS system (in
+fact even multiple LFS systems) may also be installed on a partition
+already occupied by another operating system and the different systems
+will co-exist peacefully. The document
+<ulink url="&hints-root;/lfs_next_to_existing_systems.txt"/> explains
+how to implement this, whereas this book discusses the method of
+using a fresh partition for the installation.</para>
+<!--End Edit Me-->
+
+<para>A minimal system requires a partition of around 1.3 gigabytes
+(GB). This is enough to store all the source tarballs and compile
+the packages. However, if the LFS system is intended to be the primary
+Linux system, additional software will probably be installed which
+will require additional space (2 or 3 GB). The LFS system itself will
+not take up this much space. A large portion of this required amount
+of space is to provide sufficient free temporary space. Compiling
+packages can require a lot of disk space which will be reclaimed after
+the package is installed.</para>
+
+<para>Because there is not always enough Random Access Memory (RAM)
+available for compilation processes, it is a good idea to use a small
+disk partition as swap space. This space is used by the kernel to
+store seldom-used data to make room in memory for active processes.
+The swap partition for an LFS system can be the same as the one used
+by the host system, so another swap partition will not need to be
+created if your host system already has one setup.</para>
+
+<para>Start a disk partitioning program such as
+<command>cfdisk</command> or <command>fdisk</command> with a command
+line option naming the hard disk on which the new partition will be
+created&mdash;for example <filename class="devicefile">/dev/hda</filename> for
+the primary Integrated Drive Electronics (IDE) disk. Create a Linux native
+partition and a swap partition, if needed. Please refer to the man
+pages of <command>cfdisk</command> or <command>fdisk</command> if you
+do not yet know how to use the programs.</para>
+
+<para>Remember the designation of the new partition (e.g.,
+<filename class="devicefile">hda5</filename>). This book will refer to this as the LFS
+partition. Also remember the designation of the swap partition. These
+names will be needed later for the <filename>/etc/fstab</filename>
+file.</para>
</sect1>
+
diff --git a/chapter02/introduction.xml b/chapter02/introduction.xml
index 1619521fa..209e069b8 100644
--- a/chapter02/introduction.xml
+++ b/chapter02/introduction.xml
@@ -7,6 +7,9 @@
<title>Introduction</title>
<?dbhtml filename="introduction.html"?>
-<para>See testing</para>
+<para>In this chapter, the partition which will host the LFS system is
+prepared. We will create the partition itself, create a file system
+on it, and mount it.</para>
</sect1>
+
diff --git a/chapter02/mounting.xml b/chapter02/mounting.xml
index fb31964a7..0ac3f91bf 100644
--- a/chapter02/mounting.xml
+++ b/chapter02/mounting.xml
@@ -7,6 +7,50 @@
<title>Mounting the New Partition</title>
<?dbhtml filename="mounting.html"?>
-<para>See testing</para>
+<para>Now that a file system has been created, the partition needs to
+be made accessible. In order to do this, the partition needs to be
+mounted at a chosen mount point. For the purposes of this book, it is
+assumed that the file system is mounted under <filename
+class="directory">/mnt/lfs</filename>, but the directory choice is up
+to you.</para>
+
+<para>Choose a mount point and assign it to the <envar>LFS</envar>
+environment variable by running:</para>
+
+<screen><userinput>export LFS=/mnt/lfs</userinput></screen>
+
+<para>Next, create the mount point and mount the LFS file system by
+running:</para>
+
+<screen><userinput>mkdir -p $LFS
+mount /dev/<replaceable>[xxx]</replaceable> $LFS</userinput></screen>
+
+<para>Replace <replaceable>[xxx]</replaceable> with the designation of the LFS
+partition.</para>
+
+<para>If using multiple partitions for LFS (e.g., one for <filename
+class="directory">/</filename> and another for <filename
+class="directory">/usr</filename>), mount them using:</para>
+
+<screen><userinput>mkdir -p $LFS
+mount /dev/<replaceable>[xxx]</replaceable> $LFS
+mkdir $LFS/usr
+mount /dev/<replaceable>[yyy]</replaceable> $LFS/usr</userinput></screen>
+
+<para>Replace <replaceable>[xxx]</replaceable> and
+<replaceable>[yyy]</replaceable> with the appropriate partition
+names.</para>
+
+<para>Ensure that this new partition is not mounted with permissions
+that are too restrictive (such as the nosuid, nodev, or noatime
+options). Run the <command>mount</command> command without any
+parameters to see what options are set for the mounted LFS
+partition. If <parameter>nosuid</parameter>, <parameter>nodev</parameter>,
+and/or <parameter>noatime</parameter> are set, the partition will need
+to be remounted.</para>
+
+<para>Now that there is an established place to work, it is time to
+download the packages.</para>
</sect1>
+
diff --git a/chapter03/introduction.xml b/chapter03/introduction.xml
index 2573020b6..5791720a5 100644
--- a/chapter03/introduction.xml
+++ b/chapter03/introduction.xml
@@ -7,12 +7,48 @@
<title>Introduction</title>
<?dbhtml filename="introduction.html"?>
-<para>Create a dir for the sources:</para>
+<para>This chapter includes a list of packages that need to be
+downloaded for building a basic Linux system. The listed version numbers
+correspond to versions of the software that are known to work, and
+this book is based on their use. We highly recommend not using newer
+versions because the build commands for one version may not work with
+a newer version. The newest package versions may also have problems
+that work-arounds have not been developed for yet.</para>
+
+<para>All the URLs, when possible, refer to the package's information
+page at <ulink url="http://www.freshmeat.net/"/>. The Freshmeat pages
+provide easy access to official download sites, as well as project
+websites, mailing lists, FAQ, changelogs, and more.</para>
+
+<para>Download locations may not always be accessible. If a download
+location has changed since this book was published, Google (<ulink
+url="http://www.google.com"/>) provides a useful search engine for
+most packages. If this search is unsuccessful, try one of the
+alternate means of downloading discussed at <ulink
+url="&lfs-root;lfs/packages.html"/>.</para>
+
+<para>Downloaded packages and patches will need to be stored somewhere
+that is conveniently available throughout the entire build. A working
+directory is also required to unpack the sources and build them.
+<filename class="directory">$LFS/sources</filename> can be used both
+as the place to store the tarballs and patches and as a working
+directory. By using this directory, the required elements will be
+located on the LFS partition and will be available during all stages
+of the building process.</para>
+
+<para>To create this directory, execute, as user
+<emphasis>root</emphasis>, the following command before starting the
+download session:</para>
<screen><userinput>mkdir $LFS/sources</userinput></screen>
-<para>Set the permissions of that dir:</para>
+<para>Make this directory writable and sticky. <quote>Sticky</quote>
+means that even if multiple users have write permission on a
+directory, only the owner of a file can delete the file within a
+sticky directory. The following command will enable the write and
+sticky modes:</para>
<screen><userinput>chmod a+wt $LFS/sources</userinput></screen>
</sect1>
+
diff --git a/chapter03/packages.xml b/chapter03/packages.xml
index da281d61d..babbb6e01 100644
--- a/chapter03/packages.xml
+++ b/chapter03/packages.xml
@@ -10,131 +10,136 @@
<para>Download or otherwise obtain the following packages:</para>
<variablelist role="materials">
-<bridgehead renderas="sect3">Packages</bridgehead>
<varlistentry>
-<term>Autoconf (&autoconf-version;) - 903 KB:</term>
+<term>Autoconf (&autoconf-version;) - 903 kilobytes (KB):</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/autoconf/"/></para>
+<para><ulink url="&freshmeat;autoconf/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>Automake (&automake-version;) - 740 KB:</term>
+<term>Automake (&automake-version;) - 681 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/automake/"/></para>
+<para><ulink url="&freshmeat;automake/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Bash (&bash-version;) - 1,910 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/bash/"/></para>
+<para><ulink url="&freshmeat;gnubash/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Binutils (&binutils-version;) - 10,666 KB:</term>
<listitem>
-<para><ulink url="http://www.kernel.org/pub/linux/devel/binutils/"/></para>
+<para><ulink url="&freshmeat;binutils/?branch_id=12688"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Bison (&bison-version;) - 796 KB:</term>
<listitem>
-<para><ulink url="ftp://alpha.gnu.org/gnu/bison/"/></para>
+<para><ulink url="ftp://ftp.linuxfromscratch.org/pub/lfs/lfs-packages/conglomeration/bison/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Bzip2 (&bzip2-version;) - 650 KB:</term>
<listitem>
-<para><ulink url="ftp://sources.redhat.com/pub/bzip2/v102/"/></para>
+<para><ulink url="&freshmeat;bzip2/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Coreutils (&coreutils-version;) - 3,860 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/coreutils/"/></para>
+<para><ulink url="&freshmeat;coreutils/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>DejaGNU (&dejagnu-version;) - 1,055 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/dejagnu/"/></para>
+<para><ulink url="&freshmeat;dejagnu/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Diffutils (&diffutils-version;) - 762 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/diffutils/"/></para>
+<para><ulink url="&freshmeat;diffutils/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>E2fsprogs (&e2fsprogs-version;) - 3,188 KB:</term>
+<term>E2fsprogs (&e2fsprogs-version;) - 3,003 KB:</term>
<listitem>
-<para><ulink url="http://prdownloads.sourceforge.net/e2fsprogs/"/></para>
+<para><ulink url="&freshmeat;e2fsprogs/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>Expect (&expect-version;) - 513 KB:</term>
+<term>Expect (&expect-version;) - 510 KB:</term>
<listitem>
-<para><ulink url="http://expect.nist.gov/src/"/></para>
+<para><ulink url="&freshmeat;expect/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>File (&file-version;) - 411 KB:</term>
+<term>File (&file-version;) - 356 KB:</term>
<listitem>
-<para><ulink url="ftp://ftp.gw.com/mirrors/pub/unix/file/"/></para>
+<para><ulink url="&freshmeat;file/"/></para>
+<note><para>File (&file-version;) may no longer be available at the
+listed location. The site administrators of the master download
+location occasionally remove older versions when new ones are
+released. An alternate download location that may have the correct
+version available is <ulink
+url="ftp://ftp.linuxfromscratch.org/pub/lfs/"/>.</para></note>
</listitem>
</varlistentry>
<varlistentry>
-<term>Findutils (&findutils-version;) - 914 KB:</term>
+<term>Findutils (&findutils-version;) - 760 KB:</term>
<listitem>
-<para><ulink url="ftp://alpha.gnu.org/gnu/findutils/"/></para>
+<para><ulink url="&freshmeat;findutils/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Flex (&flex-version;) - 372 KB:</term>
<listitem>
-<para><ulink url="http://sourceforge.net/projects/lex/"/></para>
+<para><ulink url="&freshmeat;flex/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>Gawk (&gawk-version;) - 1,596 KB:</term>
+<term>Gawk (&gawk-version;) - 1,692 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/gawk/"/></para>
+<para><ulink url="&freshmeat;gnuawk/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>GCC (&gcc-version;) - ~27,000KB:</term>
+<term>GCC (&gcc-version;) - 27,000 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/"/></para>
+<para><ulink url="&freshmeat;gcc/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Gettext (&gettext-version;) - 6,397 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/gettext/"/></para>
+<para><ulink url="&freshmeat;gettext/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>Glibc (&glibc-version;) - 12,904 KB: </term>
+<term>Glibc (&glibc-version;) - 13,101 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/glibc/"/></para>
+<para><ulink url="ftp://sources.redhat.com/pub/glibc/snapshots/"/></para>
</listitem>
</varlistentry>
@@ -148,19 +153,19 @@
<varlistentry>
<term>Grep (&grep-version;) - 545 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/grep/"/></para>
+<para><ulink url="&freshmeat;grep/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Groff (&groff-version;) - 2,360 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/groff/"/></para>
+<para><ulink url="&freshmeat;groff/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>Grub (&grub-version;) - 963 KB:</term>
+<term>Grub (&grub-version;) - 902 KB:</term>
<listitem>
<para><ulink url="ftp://alpha.gnu.org/pub/gnu/grub/"/></para>
</listitem>
@@ -183,19 +188,19 @@
<varlistentry>
<term>Iana-Etc (&iana-etc-version;) - 161 KB:</term>
<listitem>
-<para><ulink url="http://www.sethwklein.net/projects/iana-etc/"/></para>
+<para><ulink url="&freshmeat;iana-etc/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Inetutils (&inetutils-version;) - 1,019 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/inetutils/"/></para>
+<para><ulink url="&freshmeat;inetutils/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>IPRoute2 (&iproute2-version;) - 230 KB:</term>
+<term>IPRoute2 (&iproute2-version;) - 264 KB:</term>
<listitem>
<para><ulink url="http://developer.osdl.org/dev/iproute2/download/"/></para>
</listitem>
@@ -204,84 +209,84 @@
<varlistentry>
<term>Kbd (&kbd-version;) - 617 KB:</term>
<listitem>
-<para><ulink url="http://ftp.kernel.org/pub/linux/utils/kbd/"/></para>
+<para><ulink url="&freshmeat;kbd/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Less (&less-version;) - 259 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/less/"/></para>
+<para><ulink url="&freshmeat;less/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>LFS-Bootscripts (&lfs-bootscripts-version;) - 14 KB:</term>
+<term>LFS-Bootscripts (&lfs-bootscripts-version;) - 16 KB:</term>
<listitem>
<para><ulink url="http://downloads.linuxfromscratch.org/"/></para>
</listitem>
</varlistentry>
-<varlistentry>
-<term>Libol (&libol-version;) - 337 KB:</term>
+<varlistentry>
+<term>Libol (&libol-version;) - 336 KB:</term>
<listitem>
-<para><ulink url="http://www.balabit.com/downloads/syslog-ng/libol/0.3/"/></para>
+<para><ulink url="http://www.balabit.com/downloads/syslog-ng/libol/0.3"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>Libtool (&libtool-version;) - 2,668 KB:</term>
+<term>Libtool (&libtool-version;) - 2,602 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/libtool/"/></para>
+<para><ulink url="&freshmeat;libtool/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>Linux (&linux-version;) - 30,051 KB:</term>
+<term>Linux (&linux-version;) - 34,793 KB:</term>
<listitem>
-<para><ulink url="http://www.kernel.org/pub/linux/kernel/v2.6"/></para>
+<para><ulink url="&freshmeat;linux/?branch_id=46339"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>Linux-Libc-Headers (&linux-libc-headers-version;) - 2,460 KB:</term>
+<term>Linux-Libc-Headers (&linux-libc-headers-version;) - 2,602 KB:</term>
<listitem>
<para><ulink url="http://ep09.pld-linux.org/~mmazur/linux-libc-headers/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>M4 (&m4-version;) - 310 KB:</term>
+<term>M4 (&m4-version;) - 337 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/m4/"/></para>
+<para><ulink url="&freshmeat;gnum4/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Make (&make-version;) - 899 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/make/"/></para>
+<para><ulink url="&freshmeat;gnumake/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>Man (&man-version;) - 228 KB:</term>
+<term>Man (&man-version;) - 223 KB:</term>
<listitem>
-<para><ulink url="ftp://ftp.win.tue.nl/pub/linux-local/utils/man/"/></para>
+<para><ulink url="&freshmeat;man/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>Man-pages (&man-pages-version;) - 1,629 KB:</term>
+<term>Man-pages (&man-pages-version;) - 1,586 KB:</term>
<listitem>
-<para><ulink url="http://ftp.kernel.org/pub/linux/docs/manpages/"/></para>
+<para><ulink url="&freshmeat;man-pages/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Mktemp (&mktemp-version;) - 69 KB:</term>
<listitem>
-<para><ulink url="ftp://ftp.cs.colorado.edu:/pub/mktemp/"/></para>
+<para><ulink url="&freshmeat;mktemp/"/></para>
</listitem>
</varlistentry>
@@ -295,91 +300,91 @@
<varlistentry>
<term>Ncurses (&ncurses-version;) - 2,019 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/ncurses/"/></para>
+<para><ulink url="&freshmeat;ncurses/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Patch (&patch-version;) - 182 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/patch/"/></para>
+<para><ulink url="&freshmeat;patch/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>Perl (&perl-version;) - 9,466 KB:</term>
+<term>Perl (&perl-version;) - 9,373 KB:</term>
<listitem>
-<para><ulink url="http://www.cpan.org/src/"/></para>
+<para><ulink url="&freshmeat;perl/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Procps (&procps-version;) - 271 KB:</term>
<listitem>
-<para><ulink url="http://procps.sourceforge.net/"/></para>
+<para><ulink url="&freshmeat;procps/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Psmisc (&psmisc-version;) - 375 KB:</term>
<listitem>
-<para><ulink url="http://prdownloads.sourceforge.net/psmisc/"/></para>
+<para><ulink url="&freshmeat;psmisc/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Readline (&readline-version;) - 940 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/readline/"/></para>
+<para><ulink url="&freshmeat;gnureadline/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Sed (&sed-version;) - 776 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/sed/"/></para>
+<para><ulink url="&freshmeat;sed/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Shadow (&shadow-version;) - 996 KB:</term>
<listitem>
-<para><ulink url="ftp://ftp.pld.org.pl/software/shadow/"/></para>
+<para><ulink url="&freshmeat;shadow/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>Syslog-ng (&syslog-ng-version;) - 369 KB:</term>
+<term>Syslog-ng (&syslog-ng-version;) - 388 KB:</term>
<listitem>
<para><ulink url="http://www.balabit.com/downloads/syslog-ng/1.6/src/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>Sysvinit (&sysvinit-version;) - 97 KB:</term>
+<term>Sysvinit (&sysvinit-version;) - 91 KB:</term>
<listitem>
-<para><ulink url="ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/"/></para>
+<para><ulink url="&freshmeat;sysvinit/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Tar (&tar-version;) - 1,025 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/tar/"/></para>
+<para><ulink url="&freshmeat;tar/"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>Tcl (&tcl-version;) - 3,414 KB:</term>
+<term>Tcl (&tcl-version;) - 3,363 KB:</term>
<listitem>
-<para><ulink url="http://prdownloads.sourceforge.net/tcl/"/></para>
+<para><ulink url="&freshmeat;tcltk/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Texinfo (&texinfo-version;) - 1,385 KB:</term>
<listitem>
-<para><ulink url="http://ftp.gnu.org/gnu/texinfo/"/></para>
+<para><ulink url="&freshmeat;texinfo/"/></para>
</listitem>
</varlistentry>
@@ -405,37 +410,36 @@
</varlistentry>
<varlistentry>
-<term>Util-linux (&util-linux-version;) - 1,339:</term>
+<term>Util-linux (&util-linux-version;) - 1,339 KB:</term>
<listitem>
-<para><ulink url="http://www.kernel.org/pub/linux/utils/util-linux/"/></para>
+<para><ulink url="&freshmeat;util-linux/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Vim (&vim-version;) - 3,612 KB:</term>
<listitem>
-<para><ulink url="ftp://ftp.vim.org/pub/vim/unix/"/></para>
+<para><ulink url="&freshmeat;vim/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Vim (&vim-version;) language files (optional) - 1,033 KB:</term>
<listitem>
-<para><ulink url="ftp://ftp.vim.org/pub/vim/unix/"/></para>
+<para><ulink url="&freshmeat;vim/"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Zlib (&zlib-version;) - 277 KB:</term>
<listitem>
-<para><ulink url="http://www.zlib.net/"/></para>
+<para><ulink url="&freshmeat;zlib/"/></para>
</listitem>
</varlistentry>
</variablelist>
-<!--
<para>Total size of these packages: 135 MB</para>
--->
</sect1>
+
diff --git a/chapter03/patches.xml b/chapter03/patches.xml
index 28a01a6fc..c7d3efb8f 100644
--- a/chapter03/patches.xml
+++ b/chapter03/patches.xml
@@ -7,17 +7,23 @@
<title>Needed Patches</title>
<?dbhtml filename="patches.html"?>
+<para>In addition to the packages, several patches are also required.
+These patches correct any mistakes in the packages that should be
+fixed by the maintainer. The patches also make small modifications to
+make the packages easier to work with. The following patches will be
+needed to build an LFS system:</para>
+
<variablelist role="materials">
<varlistentry>
-<term>Bash Various Fixes - 23 KB:</term>
+<term>Bash Various Fixes - 21 KB:</term>
<listitem>
-<para><ulink url="&patches-root;bash-&bash-version;-fixes-3.patch"/></para>
+<para><ulink url="&patches-root;bash-&bash-version;-fixes-1.patch"/></para>
</listitem>
</varlistentry>
<varlistentry>
-<term>Bash Avoid Wcontinued Patch - 1KB:</term>
+<term>Bash Avoid Wcontinued Patch - 1 KB:</term>
<listitem>
<para><ulink url="&patches-root;bash-&bash-version;-avoid_WCONTINUED-1.patch"/></para>
</listitem>
@@ -26,7 +32,8 @@
<varlistentry>
<term>Coreutils Suppress Uptime, Kill, Su Patch - 16 KB:</term>
<listitem>
-<para><ulink url="&patches-root;coreutils-&coreutils-version;-suppress_uptime_kill_su-1.patch"/></para>
+<para condition="html"><ulink url="&patches-root;coreutils-&coreutils-version;-suppress_uptime_kill_su-1.patch"/></para>
+<para condition="pdf"><ulink url="&patches-root;coreutils-&coreutils-version;-suppress_uptime_ kill_su-1.patch"/></para>
</listitem>
</varlistentry>
@@ -52,7 +59,7 @@
</varlistentry>
<varlistentry>
-<term> GCC Linkonce Patch - 12KB:</term>
+<term> GCC Linkonce Patch - 12 KB:</term>
<listitem>
<para><ulink url="&patches-root;gcc-&gcc-version;-linkonce-1.patch"/></para>
</listitem>
@@ -75,21 +82,24 @@
<varlistentry>
<term>Inetutils Kernel Headers Patch - 1 KB:</term>
<listitem>
-<para><ulink url="&patches-root;inetutils-&inetutils-version;-kernel_headers-1.patch"/></para>
+<para condition="html"><ulink url="&patches-root;inetutils-&inetutils-version;-kernel_headers-1.patch"/></para>
+<para condition="pdf"><ulink url="&patches-root;inetutils-&inetutils-version;-kernel_headers- 1.patch"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>Inetutils No-Server-Man-Pages Patch - 4 KB:</term>
<listitem>
-<para><ulink url="&patches-root;inetutils-&inetutils-version;-no_server_man_pages-1.patch"/></para>
+<para condition="html"><ulink url="&patches-root;inetutils-&inetutils-version;-no_server_man_pages-1.patch"/></para>
+<para condition="pdf"><ulink url="&patches-root;inetutils-&inetutils-version;-no_server_man_ pages-1.patch"/></para>
</listitem>
</varlistentry>
<varlistentry>
<term>IPRoute2 Disable DB Patch - 1 KB:</term>
<listitem>
-<para><ulink url="&patches-root;iproute2-&iproute2-patch-version;-remove_db-1.patch"/></para>
+<para condition="html"><ulink url="&patches-root;iproute2-&iproute2-patch-version;-remove_db-1.patch"/></para>
+<para condition="pdf"><ulink url="&patches-root;iproute2-&iproute2-patch-version;-remove_ db-1.patch"/></para>
</listitem>
</varlistentry>
@@ -122,9 +132,9 @@
</varlistentry>
<varlistentry>
-<term>Readline Various Fixes - 7 KB:</term>
+<term>Readline Display Wrap Patch - 1 KB:</term>
<listitem>
-<para><ulink url="&patches-root;readline-&readline-version;-fixes-1.patch" /></para>
+<para><ulink url="&patches-root;readline-&readline-version;-fixes-1.patch"/></para>
</listitem>
</varlistentry>
@@ -142,4 +152,12 @@
</variablelist>
+<para>In addition to the above required patches, there exist a number of
+optional patches created by the LFS community. These optional patches
+solve minor problems or enable functionality that is not enabled by
+default. Feel free to peruse the patches database located at
+<ulink url="&lfs-root;patches/"/> and acquire any additional
+patches to suit the system needs.</para>
+
</sect1>
+
diff --git a/chapter04/aboutlfs.xml b/chapter04/aboutlfs.xml
index 2c270a08a..64f20f1b4 100644
--- a/chapter04/aboutlfs.xml
+++ b/chapter04/aboutlfs.xml
@@ -7,6 +7,29 @@
<title>About $LFS</title>
<?dbhtml filename="aboutlfs.html"?>
-<para>See testing</para>
+<para>Throughout this book, the environment variable <envar>LFS</envar> will
+be used several times. It is paramount that this variable is always defined.
+It should be set to the mount point chosen for the LFS partition.
+Check that the <envar>LFS</envar> variable is set up properly with:</para>
+
+<screen><userinput>echo $LFS</userinput></screen>
+
+<para>Make sure the output shows the path to the LFS partition's mount
+point, which is <filename class="directory">/mnt/lfs</filename> if the
+provided example was followed. If the output is incorrect, the
+variable can be set with:</para>
+
+<screen><userinput>export LFS=/mnt/lfs</userinput></screen>
+
+<para>Having this variable set is beneficial in that commands such as
+<command>mkdir $LFS/tools</command> can be typed literally. The shell
+will automatically replace <quote>$LFS</quote> with
+<quote>/mnt/lfs</quote> (or whatever the variable was set to) when it
+processes the command line.</para>
+
+<para>Do not forget to check that <envar>$LFS</envar> is set whenever
+you leave and reenter the current working environment (as when doing a
+<quote>su</quote> to <emphasis>root</emphasis> or another user).</para>
</sect1>
+
diff --git a/chapter04/aboutsbus.xml b/chapter04/aboutsbus.xml
index d99ac1f0f..34e1a1ef4 100644
--- a/chapter04/aboutsbus.xml
+++ b/chapter04/aboutsbus.xml
@@ -7,6 +7,44 @@
<title>About SBUs</title>
<?dbhtml filename="aboutsbus.html"?>
-<para>See testing</para>
+<para>Many people would like to know beforehand approximately how long
+it takes to compile and install each package. Because Linux From
+Scratch can be built on many different systems, it is impossible to
+provide accurate time estimates. The biggest package (Glibc) will
+take approximately 20 minutes on the fastest systems, but could take
+up to three days on slower systems! Instead of providing actual times,
+the Static Build Unit (SBU) measure will be
+used instead.</para>
+
+<para>The SBU measure works as follows. The first package to be compiled
+from this book is the statically-linked Binutils in <xref
+linkend="chapter-temporary-tools"/>. The time it takes to compile
+this package is what will be referred to as the Static Build Unit
+or SBU. All other compile times will be expressed relative to this
+time.</para>
+
+<para>For example, consider a package whose compilation time is 4.5
+SBUs. This means that if a system took 10 minutes to compile and
+install the static Binutils, it will take
+<emphasis>approximately</emphasis> 45 minutes to build this example
+package. Fortunately, most build times are shorter than the one
+for Binutils.</para>
+
+<para>Please note that if the system compiler on the host is GCC-2.x based, the
+SBUs listed may be somewhat understated. This is because the SBU is
+based on the very first package, compiled with the old GCC, while the
+rest of the system is compiled with the newer GCC-&gcc-version; (which is
+known to be approximately 30 percent slower). SBUs are also not
+highly accurate for Symmetric Multi-Processor (SMP)-based machines.</para>
+
+<para>To view actual timings for a number of specific machines, we recommend
+<ulink url="&lfs-root;~bdubbs/"/>.</para>
+
+<para>In general, SBUs are not very accurate because they depend on many
+factors, not just the GCC version. They are provided
+here to give an estimate of how long it might take to
+install a package, but the numbers can vary by as much as dozens of
+minutes in some cases.</para>
</sect1>
+
diff --git a/chapter04/abouttestsuites.xml b/chapter04/abouttestsuites.xml
index cfa1b9705..82ca9b062 100644
--- a/chapter04/abouttestsuites.xml
+++ b/chapter04/abouttestsuites.xml
@@ -7,6 +7,44 @@
<title>About the Test Suites</title>
<?dbhtml filename="abouttestsuites.html"?>
-<para>See testing</para>
+<para>Most packages provide a test suite. Running the test suite for a
+newly built package is a good idea because it can provide a <quote>sanity
+check</quote> indicating that everything compiled correctly. A test suite
+that passes its set of checks usually proves that the package is
+functioning as the developer intended. It does not, however, guarantee
+that the package is totally bug free.</para>
+
+<para>Some test suites are more important than others. For example,
+the test suites for the core toolchain packages&mdash;GCC, Binutils, and
+Glibc&mdash;are of the utmost importance due to their central role in a
+properly functioning system. The test suites for GCC and Glibc can
+take a very long time to complete, especially on slower hardware, but
+are strongly recommended.</para>
+
+<note><para>Experience has shown that there is little to be gained
+from running the test suites in <xref
+linkend="chapter-temporary-tools"/>. There can be no escaping the fact
+that the host system always exerts some influence on the tests in that
+chapter, often causing inexplicable failures. Because the tools built
+in <xref linkend="chapter-temporary-tools"/> are temporary and
+eventually discarded, we do not recommend running the test suites in
+<xref linkend="chapter-temporary-tools"/> for the average reader. The
+instructions for running those test suites are provided for the
+benefit of testers and developers, but they are strictly
+optional.</para></note>
+
+<para>A common issue with running the test suites for Binutils and GCC
+is running out of pseudo terminals (PTYs). This can result in a high
+number of failing tests. This may happen for several reasons, but the
+most likely cause is that the host system does not have the
+<systemitem class="filesystem">devpts</systemitem> file system set up
+correctly. This issue is discussed in greater detail in <xref
+linkend="chapter-temporary-tools"/>.</para>
+
+<para>Sometimes package test suites will give false failures. Consult
+the LFS Wiki at <ulink url="&wiki-root;"/> to verify that these
+failures are expected. This site is valid for all tests throughout this
+book.</para>
</sect1>
+
diff --git a/chapter04/addinguser.xml b/chapter04/addinguser.xml
index 5073eac68..d701566ba 100644
--- a/chapter04/addinguser.xml
+++ b/chapter04/addinguser.xml
@@ -7,17 +7,85 @@
<title>Adding the LFS User</title>
<?dbhtml filename="addinguser.html"?>
-<para>Issue the following commands to add the new user:</para>
+<para>When logged in as user <emphasis>root</emphasis>, making a
+single mistake can damage or destroy a system. Therefore, we recommend
+building the packages in this chapter as an unprivileged user. You
+could use your own user name, but to make it easier to set up a clean
+work environment, create a new user called <emphasis>lfs</emphasis> as
+a member of a new group (also named <emphasis>lfs</emphasis>) and use
+this user during the installation process. As
+<emphasis>root</emphasis>, issue the following commands to add the new
+user:</para>
<screen><userinput>groupadd lfs
useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
+<para>The meaning of the command line options:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>-s /bin/bash</parameter></term>
+<listitem><para>This makes
+<command>bash</command> the default shell for user
+<emphasis>lfs</emphasis>.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>-g lfs</parameter></term>
+<listitem><para>This option adds user <emphasis>lfs</emphasis> to group
+<emphasis>lfs</emphasis>.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>-m</parameter></term>
+<listitem><para>This creates a home
+directory for <emphasis>lfs</emphasis>.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>-k /dev/null</parameter></term>
+<listitem><para>This parameter
+prevents possible copying of files from a skeleton directory (default
+is <filename class="directory">/etc/skel</filename>) by changing the input location to
+the special null device.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>lfs</parameter></term>
+<listitem><para>This is the actual name for the created group and
+user.</para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>To log in as <emphasis>lfs</emphasis> (as opposed to switching
+to user <emphasis>lfs</emphasis> when
+logged in as <emphasis>root</emphasis>, which does not require the
+<emphasis>lfs</emphasis> user to have a
+password), give <emphasis>lfs</emphasis> a password:</para>
+
<screen><userinput>passwd lfs</userinput></screen>
+<para>Grant <emphasis>lfs</emphasis> full access to
+<filename class="directory">$LFS/tools</filename> by making
+<emphasis>lfs</emphasis> the directory owner:</para>
+
<screen><userinput>chown lfs $LFS/tools</userinput></screen>
+<para>If a separate working directory was created as suggested, give
+user <emphasis>lfs</emphasis> ownership of this directory:</para>
+
<screen><userinput>chown lfs $LFS/sources</userinput></screen>
+<para>Next, login as user <emphasis>lfs</emphasis>. This can be done
+via a virtual console, through a display manager, or with the
+following substitute user command:</para>
+
<screen><userinput>su - lfs</userinput></screen>
+<para>The <quote><parameter>-</parameter></quote> instructs
+<command>su</command> to start a login shell as opposed to a non-login
+shell. The difference between these two types of shells can be found
+in detail in the Bash man and info pages.</para>
+
</sect1>
+
diff --git a/chapter04/creatingtoolsdir.xml b/chapter04/creatingtoolsdir.xml
index 36e4fe7a4..8ab7fde3a 100644
--- a/chapter04/creatingtoolsdir.xml
+++ b/chapter04/creatingtoolsdir.xml
@@ -7,8 +7,40 @@
<title>Creating the $LFS/tools Directory</title>
<?dbhtml filename="creatingtoolsdir.html"?>
+<para>All programs compiled in <xref
+linkend="chapter-temporary-tools"/> will be installed under <filename
+class="directory">$LFS/tools</filename> to keep them separate from the
+programs compiled in <xref linkend="chapter-building-system"/>. The
+programs compiled here are temporary tools and will not be a part of
+the final LFS system. By keeping these programs in a separate
+directory, they can easily be discarded later after their use. This
+also prevents these programs from ending up in the host production
+directories (easy to do by accident in <xref
+linkend="chapter-temporary-tools"/>).</para>
+
+<para>Create the required directory by running the following as
+<emphasis>root</emphasis>:</para>
+
<screen><userinput>mkdir $LFS/tools</userinput></screen>
+<para>The next step is to create a <filename class="symlink">/tools</filename>
+symlink on the host system. This will point to the newly-created directory on
+the LFS partition. Run this command as <emphasis>root</emphasis> as
+well:</para>
+
<screen><userinput>ln -s $LFS/tools /</userinput></screen>
+<note><para>The above command is correct. The <command>ln</command>
+command has a few syntactic variations, so be sure to check the info
+and man pages before reporting what you may think is an
+error.</para></note>
+
+<para>The created symlink enables the toolchain to be compiled so that
+it always refers to <filename class="directory">/tools</filename>,
+meaning that the compiler, assembler, and linker will work both in
+this chapter (when we are still using some tools from the host) and in
+the next (when we are <quote>chrooted</quote> to the LFS
+partition).</para>
+
</sect1>
+
diff --git a/chapter04/settingenviron.xml b/chapter04/settingenviron.xml
index ea2672707..247b55e96 100644
--- a/chapter04/settingenviron.xml
+++ b/chapter04/settingenviron.xml
@@ -7,10 +7,35 @@
<title>Setting Up the Environment</title>
<?dbhtml filename="settingenvironment.html"?>
+<para>Set up a good working environment by creating two new startup
+files for the <command>bash</command> shell. While logged in as user
+<emphasis>lfs</emphasis>, issue the
+following command to create a new <filename>.bash_profile</filename>:</para>
+
<screen><userinput>cat &gt; ~/.bash_profile &lt;&lt; "EOF"
<literal>exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash</literal>
EOF</userinput></screen>
+<para>When logged on as user <emphasis>lfs</emphasis>, the
+initial shell is usually a <emphasis>login</emphasis> shell which reads the
+<filename>/etc/profile</filename> of the host (probably containing
+some settings and environment variables) and then
+<filename>.bash_profile</filename>. The <command>exec env
+-i.../bin/bash</command> command in the
+<filename>.bash_profile</filename> file replaces the running shell
+with a new one with a completely empty environment, except for the
+<envar>HOME</envar>, <envar>TERM</envar>, and
+<envar>PS1</envar> variables. This ensures that no unwanted and
+potentially hazardous environment variables from the host system leak
+into the build environment. The technique used here achieves the goal
+of ensuring a clean environment.</para>
+
+<para>The new instance of the shell is a <emphasis>non-login</emphasis>
+shell, which does not read the <filename>/etc/profile</filename> or
+<filename>.bash_profile</filename> files, but rather reads the
+<filename>.bashrc</filename> file instead. Create the
+<filename>.bashrc</filename> file now:</para>
+
<screen><userinput>cat &gt; ~/.bashrc &lt;&lt; "EOF"
<literal>set +h
umask 022
@@ -20,6 +45,49 @@ PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL PATH</literal>
EOF</userinput></screen>
+<para>The <command>set +h</command> command turns off
+<command>bash</command>'s hash function. Hashing is ordinarily a useful
+feature&mdash;<command>bash</command> uses a hash table to remember the
+full path of executable files to avoid searching the <envar>PATH</envar> time
+and again to find the same executable. However, the new tools
+should be used as soon as they are installed. By switching off the
+hash function, the shell will always search the <envar>PATH</envar> when a program is
+to be run. As such, the shell will find the newly compiled
+tools in <filename class="directory">$LFS/tools</filename> as soon as
+they are available without remembering a previous version of the same
+program in a different location.</para>
+
+<para>Setting the user file-creation mask (umask) to 022 ensures that newly
+created files and directories are only writable by their owner, but
+are readable and executable by anyone (assuming default modes are used
+by the open(2) system call, new files will end up with permission mode
+644 and directories with mode 755).</para>
+
+<para>The <envar>LFS</envar> variable should be set to the
+chosen mount point.</para>
+
+<para>The <envar>LC_ALL</envar> variable controls the
+localization of certain programs, making their messages follow the
+conventions of a specified country. If the host system uses a version
+of Glibc older than 2.2.4, having <envar>LC_ALL</envar> set to something other than
+<quote>POSIX</quote> or <quote>C</quote> (during this chapter) may
+cause issues if you exit the chroot environment and wish to return
+later. Setting <envar>LC_ALL</envar> to <quote>POSIX</quote>
+or <quote>C</quote> (the two are equivalent) ensures that
+everything will work as expected in the chroot environment.</para>
+
+<para>By putting <filename class="directory">/tools/bin</filename>
+ahead of the standard <envar>PATH</envar>, all the programs installed in <xref
+linkend="chapter-temporary-tools"/> are picked up by the shell
+immediately after their installation. This, combined with turning off
+hashing, limits the risk that old programs from
+the host are being used when they should not be used any
+longer.</para>
+
+<para>Finally, to have the environment fully prepared for building the
+temporary tools, source the just-created user profile:</para>
+
<screen><userinput>source ~/.bash_profile</userinput></screen>
</sect1>
+
diff --git a/chapter05/adjusting.xml b/chapter05/adjusting.xml
index ac342fe87..834ef166f 100644
--- a/chapter05/adjusting.xml
+++ b/chapter05/adjusting.xml
@@ -7,12 +7,34 @@
<title>Adjusting the Toolchain</title>
<?dbhtml filename="adjusting.html"?>
-<para>Run the following command from within
-the <filename class="directory">binutils-build</filename> directory:</para>
+<para>Now that the temporary C libraries have been installed, all
+tools compiled in the rest of this chapter should be linked against
+these libraries. In order to accomplish this, the linker and the
+compiler's specs file need to be adjusted.</para>
+
+<para>The linker, adjusted at the end of the first pass of Binutils,
+is installed by running the following command from within the
+<filename class="directory">binutils-build</filename> directory:</para>
<screen><userinput>make -C ld install</userinput></screen>
-<para>Amend the GCC specs file:</para>
+<para>From this point onwards, everything will link only
+against the libraries in <filename class="directory">/tools/lib</filename>.</para>
+
+<note><para>If the earlier warning to retain the Binutils source and
+build directories from the first pass was missed, ignore the above
+command. This results in a small chance that the subsequent testing
+programs will link against libraries on the host. This is not ideal,
+but it is not a major problem. The situation is corrected when the
+second pass of Binutils is installed later.</para></note>
+
+<para>Now that the adjusted linker is installed, the Binutils build and source
+directories should be removed.</para>
+
+<para>The next task is to amend the GCC specs file so that it points
+to the new dynamic linker. A simple sed script will accomplish this:</para>
+
+<!-- Ampersands are needed to allow copy and paste -->
<screen><userinput>SPECFILE=`gcc --print-file specs` &amp;&amp;
sed 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' \
@@ -20,24 +42,71 @@ sed 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' \
mv -f tempspecfile $SPECFILE &amp;&amp;
unset SPECFILE</userinput></screen>
-<para>Make clean-up:</para>
+<para><phrase condition="html">It is recommended that the above
+command be copy-and-pasted in order to ensure accuracy.</phrase>
+Alternatively, the specs file can be edited by hand. This is done by
+replacing every occurrence of <quote>/lib/ld-linux.so.2</quote> with
+<quote>/tools/lib/ld-linux.so.2</quote></para>
+
+<para>Be sure to visually inspect the specs file in order to verify the
+intended changes have been made.</para>
+
+<important><para>If working on a platform where the name of the
+dynamic linker is something other than
+<filename class="libraryfile">ld-linux.so.2</filename>, replace
+<quote>ld-linux.so.2</quote> with the name of the platform's
+dynamic linker in the above commands. Refer back to <xref
+linkend="ch-tools-toolchaintechnotes" role=","/> if
+necessary.</para></important>
+
+<para>There is a possibility that some include files from the host
+system have found their way into GCC's private include dir. This can
+happen as a result of GCC's <quote>fixincludes</quote> process, which runs as part
+of the GCC build. This is explained in more detail later in this
+chapter. Run the following command to eliminate this
+possibility:</para>
<screen><userinput>rm -f /tools/lib/gcc/*/*/include/{pthread.h,bits/sigthread.h}</userinput></screen>
-<para>Test the tools:</para>
+<caution><para>At this point, it is imperative to stop and ensure that
+the basic functions (compiling and linking) of the new toolchain are
+working as expected. To perform a sanity check, run the following
+commands:</para>
<screen><userinput>echo 'main(){}' &gt; dummy.c
cc dummy.c
readelf -l a.out | grep ': /tools'</userinput></screen>
-<para>The output of the last command will be of the form:</para>
+<para>If everything is working correctly, there should be no errors,
+and the output of the last command will be of the form:</para>
<screen><computeroutput>[Requesting program interpreter:
/tools/lib/ld-linux.so.2]</computeroutput></screen>
-<para>Remove the test files:</para>
+<para>Note that <filename class="directory">/tools/lib</filename>
+appears as the prefix of the dynamic linker.</para>
-<screen><userinput>rm dummy.c a.out</userinput></screen>
+<para>If the output is not shown as above or there was no output at
+all, then something is wrong. Investigate and retrace the steps to
+find out where the problem is and correct it. This issue must be
+resolved before continuing on. First, perform the sanity check again,
+using <command>gcc</command> instead of <command>cc</command>. If this
+works, then the <filename class="symlink">/tools/bin/cc</filename> symlink is missing.
+Revisit <xref linkend="ch-tools-gcc-pass1" role=","/> and install the symlink.
+Next, ensure that the <envar>PATH</envar> is correct. This can be checked by running
+<command>echo $PATH</command> and verifying that <filename
+class="directory">/tools/bin</filename> is at the head of the list. If
+the <envar>PATH</envar> is wrong it could mean that you are not logged in as user
+<emphasis>lfs</emphasis> or that something went wrong back in <xref
+linkend="ch-tools-settingenviron" role="."/> Another option is that something
+may have gone wrong with the specs file amendment above. In this case,
+redo the specs file amendment<phrase condition="html">, being careful to copy-and-paste the
+commands</phrase>.</para>
+<para>Once all is well, clean up the test files:</para>
+
+<screen><userinput>rm dummy.c a.out</userinput></screen>
+</caution>
</sect1>
+
diff --git a/chapter05/bash.xml b/chapter05/bash.xml
index 62feb7904..930bd964a 100644
--- a/chapter05/bash.xml
+++ b/chapter05/bash.xml
@@ -7,8 +7,12 @@
<title>Bash-&bash-version;</title>
<?dbhtml filename="bash.html"?>
+<indexterm zone="ch-tools-bash">
+<primary sortas="a-Bash">Bash</primary>
+<secondary>tools</secondary></indexterm>
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bash.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -16,12 +20,16 @@
<seglistitem><seg>1.2 SBU</seg><seg>27 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bash.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
<title>Installation of Bash</title>
-<para>Apply a patch:</para>
+<!-- Edit Me -->
+<para>Bash has a problem when compiled against newer versions of Glibc, causing
+it to hang inappropriately. This patch fixes the problem:</para>
<screen><userinput>patch -Np1 -i ../bash-&bash-version;-avoid_WCONTINUED-1.patch</userinput></screen>
@@ -29,21 +37,39 @@
<screen><userinput>./configure --prefix=/tools --without-bash-malloc</userinput></screen>
-<para>Compile the program:</para>
+<para>The meaning of the configure option:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--without-bash-malloc</parameter></term>
+<listitem><para>This options turns off the use of Bash's memory
+allocation (malloc) function which is known to cause segmentation
+faults. By turning this option off, Bash will use the malloc functions
+from Glibc which are more stable.</para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>To test the results, issue:
-<userinput>make test</userinput>.</para>
+<para>To test the results, issue: <userinput>make
+tests</userinput>.</para>
-<para>Then install it :</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<para>Create a symlink:</para>
+<para>Make a link for the programs that use <command>sh</command> for
+a shell:</para>
<screen><userinput>ln -s bash /tools/bin/sh</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref linkend="contents-bash" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/binutils-pass1.xml b/chapter05/binutils-pass1.xml
index 4dc8b3e1a..9f35ae722 100644
--- a/chapter05/binutils-pass1.xml
+++ b/chapter05/binutils-pass1.xml
@@ -7,7 +7,12 @@
<title>Binutils-&binutils-version; - Pass 1</title>
<?dbhtml filename="binutils-pass1.html"?>
+<indexterm zone="ch-tools-binutils-pass1">
+<primary sortas="a-Binutils">Binutils</primary>
+<secondary>tools, pass 1</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/binutils.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,44 +20,134 @@
<seglistitem><seg>1.0 SBU</seg><seg>194 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/binutils.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
<title>Installation of Binutils</title>
-<para>Create a build dir:</para>
+<para>It is important that Binutils be the first package compiled
+because both Glibc and GCC perform various tests on the available
+linker and assembler to determine which of their own features to
+enable.</para>
+
+<para>This package is known to have issues when its default
+optimization flags (including the <parameter>-march</parameter> and
+<parameter>-mcpu</parameter> options) are changed. If any environment
+variables that override default optimizations have been defined, such
+as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
+unset them when building Binutils.</para>
+
+<para>The Binutils documentation recommends building Binutils outside of the
+source directory in a dedicated build directory:</para>
<screen><userinput>mkdir ../binutils-build
cd ../binutils-build</userinput></screen>
-<note><para>If you want the SBU values you could wrap the four commands in a
-<command>time</command> command like this:
-<userinput>time { ./configure ... &amp;&amp; ... &amp;&amp; ...
-&amp;&amp; make install; }</userinput>.</para></note>
+<note><para>In order for the SBU values listed in the rest of the book
+to be of any use, measure the time it takes to build this package from
+the configuration, up to and including the first install. To achieve
+this easily, wrap the four commands in a <command>time</command>
+command like this: <userinput>time { ./configure ... &amp;&amp; ...
+&amp;&amp; ... &amp;&amp; make install; }</userinput>.</para></note>
<para>Now prepare Binutils for compilation:</para>
<screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
--disable-nls</userinput></screen>
+<para>The meaning of the configure options:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--prefix=/tools</parameter></term>
+<listitem><para>This tells the configure script to prepare to install the Binutils
+programs in the <filename class="directory">/tools</filename> directory.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--disable-nls</parameter></term>
+<listitem><para>This disables internationalization. This is not needed
+for the static programs, and NLS can cause problems when linking
+statically.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Continue with compiling the package:</para>
<screen><userinput>make configure-host
make LDFLAGS="-all-static"</userinput></screen>
-<para>Now install the package:</para>
+<para>The meaning of the make parameters:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>configure-host</parameter></term>
+<listitem><para>This forces all subdirectories to be configured
+immediately. A statically-linked build will fail without it. Use this
+option to work around the problem.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>LDFLAGS="-all-static"</parameter></term>
+<listitem><para>This tells the linker that all Binutils programs
+should be linked statically. However, strictly speaking,
+<parameter>"-all-static"</parameter> is passed to the
+<command>libtool</command> program, which then passes
+<parameter>"-static"</parameter> to the linker.</para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>Compilation is now complete. Ordinarily we would now run the
+test suite, but at this early stage the test suite framework (Tcl,
+Expect, and DejaGNU) is not yet in place. The benefits of running the
+tests at this point are minimal since the programs from this
+first pass will soon be replaced by those from the second.</para>
+
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<para>Now prepare the linker for the <quote>Adjusting</quote> phase later on:</para>
+<para>Next, prepare the linker for the <quote>Adjusting</quote> phase
+later on:</para>
<screen><userinput>make -C ld clean
make -C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib</userinput></screen>
-<warning><para><emphasis>Do not yet remove</emphasis> the Binutils build and
-source directories. You will need them again in their current state a bit
-further on in this chapter.</para></warning>
+<para>The meaning of the make parameters:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>-C ld clean</parameter></term>
+<listitem><para>This tells the make program to remove all compiled
+files in the <filename class="directory">ld</filename>
+subdirectory.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>-C ld LDFLAGS="-all-static"
+LIB_PATH=/tools/lib</parameter></term>
+<listitem><para>This option rebuilds everything in the
+<filename class="directory">ld</filename> subdirectory. Specifying
+the <envar>LIB_PATH</envar> Makefile variable on the command
+line allows us to override the default value
+and point it to the temporary tools location. The value of this variable
+specifies the linker's default library search path. This preparation
+is used later in the chapter.</para></listitem>
+</varlistentry>
+</variablelist>
+
+<warning><para><emphasis>Do not</emphasis> remove the Binutils
+build and source directories yet. These will be needed again in their
+current state later in this chapter.</para></warning>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-binutils" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/binutils-pass2.xml b/chapter05/binutils-pass2.xml
index 0c28271f7..85a574309 100644
--- a/chapter05/binutils-pass2.xml
+++ b/chapter05/binutils-pass2.xml
@@ -7,7 +7,14 @@
<title>Binutils-&binutils-version; - Pass 2</title>
<?dbhtml filename="binutils-pass2.html"?>
+<indexterm zone="ch-tools-binutils-pass2">
+<primary sortas="a-Binutils">Binutils</primary>
+<secondary>tools, pass 2</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+ href="../chapter06/binutils.xml"
+ xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,39 +22,57 @@
<seglistitem><seg>1.5 SBU</seg><seg>108 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+ href="../chapter06/binutils.xml"
+ xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
<title>Re-installation of Binutils</title>
+<para>This package is known to have issues when its default
+optimization flags (including the <parameter>-march</parameter> and
+<parameter>-mcpu</parameter> options) are changed. If any environment
+variables that override default optimizations have been defined, such
+as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
+unset them when building Binutils.</para>
+
<para>Create a separate build directory again:</para>
<screen><userinput>mkdir ../binutils-build
cd ../binutils-build</userinput></screen>
-<para>Now prepare Binutils for compilation:</para>
+<para>Prepare Binutils for compilation:</para>
<screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
--enable-shared --with-lib-path=/tools/lib</userinput></screen>
-<para>Compile the package:</para>
+<para>The meaning of the new configure option:</para>
-<screen><userinput>make</userinput></screen>
+<variablelist>
+<varlistentry>
+<term><parameter>--with-lib-path=/tools/lib</parameter></term>
+<listitem><para>This tells the configure script to specify the library
+search path during the compilation of Binutils, resulting in <filename
+class="directory">/tools/lib</filename> being passed to the linker.
+This prevents the linker from searching through library directories on
+the host.</para></listitem>
+</varlistentry>
+</variablelist>
-<para>Test the results:</para>
+<para>Compile the package:</para>
-<!-- NEW -->
-<screen><userinput>make -k check</userinput></screen>
+<screen><userinput>make</userinput></screen>
-<para>Except for a few known failures, the binutils tests should all pass. The
-exceptions to this rule are as follows:</para>
+<para>Compilation is now complete. As discussed earlier, running the
+test suite is not mandatory for the temporary tools here in this
+chapter. To run the Binutils test suite anyway, issue the following
+command:</para>
-<screen><computeroutput>* 5 FAIL (unexpected failure) for visibility
-* 1 FAIL for selective4
-* 1 FAIL for selective5</computeroutput></screen>
-<!-- END NEW-->
+<screen><userinput>make check</userinput></screen>
-<para>And install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -58,10 +83,16 @@ chapter:</para>
make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen>
-<warning><para><emphasis>Do not yet remove</emphasis> the Binutils source and
-build directories. You will need these directories again in the next chapter
-in the state they are in now.</para></warning>
+<warning><para><emphasis>Do not</emphasis> remove the Binutils source and
+build directories yet. These directories will be needed again in the next
+chapter in their current state.</para></warning>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-binutils" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/bison.xml b/chapter05/bison.xml
index e3572e99d..dc237997d 100644
--- a/chapter05/bison.xml
+++ b/chapter05/bison.xml
@@ -7,7 +7,12 @@
<title>Bison-&bison-version;</title>
<?dbhtml filename="bison.html"?>
+<indexterm zone="ch-tools-bison">
+<primary sortas="a-Bison">Bison</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bison.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,6 +20,8 @@
<seglistitem><seg>0.6 SBU</seg><seg>10.6 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bison.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
@@ -28,13 +35,19 @@
<screen><userinput>make</userinput></screen>
-<para>To test the results, issue:
-<userinput>make check</userinput>.</para>
+<para>To test the results, issue: <userinput>make
+check</userinput>.</para>
-<para>Now install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-bison" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/bzip2.xml b/chapter05/bzip2.xml
index fb2ae264e..a45dee979 100644
--- a/chapter05/bzip2.xml
+++ b/chapter05/bzip2.xml
@@ -7,7 +7,12 @@
<title>Bzip2-&bzip2-version;</title>
<?dbhtml filename="bzip2.html"?>
+<indexterm zone="ch-tools-bzip2">
+<primary sortas="a-Bzip2">Bzip2</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bzip2.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,20 +20,28 @@
<seglistitem><seg>0.1 SBU</seg><seg>2.5 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/bzip2.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
<title>Installation of Bzip2</title>
-<para>The Bzip2 package doesn't contain a <command>configure</command>
-script. Compile it with a straightforward:</para>
+<para>The Bzip2 package does not contain a <command>configure</command>
+script. Compile it with:</para>
<screen><userinput>make</userinput></screen>
-<para>And install it:</para>
+<para>Install the package:</para>
<screen><userinput>make PREFIX=/tools install</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-bzip2" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/chapter05.xml b/chapter05/chapter05.xml
index 353071c9d..9c567c530 100644
--- a/chapter05/chapter05.xml
+++ b/chapter05/chapter05.xml
@@ -14,9 +14,6 @@
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils-pass1.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-pass1.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="linux-libc-headers.xml"/>
-<!--
-<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kernel-headers.xml"/>
--->
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="glibc.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="adjusting.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tcl.xml"/>
@@ -44,9 +41,6 @@
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="flex.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="util-linux.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="perl.xml"/>
-<!--
-<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="udev.xml"/>
--->
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="stripping.xml"/>
</chapter>
diff --git a/chapter05/coreutils.xml b/chapter05/coreutils.xml
index f99768465..e7bf67d37 100644
--- a/chapter05/coreutils.xml
+++ b/chapter05/coreutils.xml
@@ -7,7 +7,12 @@
<title>Coreutils-&coreutils-version;</title>
<?dbhtml filename="coreutils.html"?>
+<indexterm zone="ch-tools-coreutils">
+<primary sortas="a-Coreutils">Coreutils</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/coreutils.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,6 +20,8 @@
<seglistitem><seg>0.9 SBU</seg><seg>69 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/coreutils.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
@@ -24,17 +31,44 @@
<screen><userinput>DEFAULT_POSIX2_VERSION=199209 ./configure --prefix=/tools</userinput></screen>
+<para>This package has an issue when compiled against versions of
+Glibc later than 2.3.2. Some of the Coreutils utilities (such as
+<command>head</command>, <command>tail</command>, and
+<command>sort</command>) will reject their traditional syntax, a
+syntax that has been in use for approximately 30 years. This old
+syntax is so pervasive that compatibility should be preserved until
+the many places where it is used can be updated. Backwards
+compatibility is achieved by setting the
+<envar>DEFAULT_POSIX2_VERSION</envar> environment variable to
+<quote>199209</quote> in the above command. If you do not want
+Coreutils to be backwards compatible with the traditional syntax, then
+omit setting the <envar>DEFAULT_POSIX2_VERSION</envar>
+environment variable. It is important to remember that doing so will
+have consequences, including the need to patch the many packages that
+still use the old syntax. Therefore, it is recommended that the
+instructions be followed exactly as given above.</para>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>To test the result, issue:
-<userinput>make RUN_EXPENSIVE_TESTS=yes check</userinput></para>
+<para>To test the results, issue: <userinput>make
+RUN_EXPENSIVE_TESTS=yes check</userinput>. The
+<parameter>RUN_EXPENSIVE_TESTS=yes</parameter> parameter tells the
+test suite to run several additional tests that are considered
+relatively expensive (in terms of CPU power and memory usage) on some
+platforms, but generally are not a problem on Linux.</para>
-<para>And install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-coreutils" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/dejagnu.xml b/chapter05/dejagnu.xml
index 25e3e87b2..2b9703030 100644
--- a/chapter05/dejagnu.xml
+++ b/chapter05/dejagnu.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-tools-dejagnu" xreflabel="DejaGNU" role="wrap">
+<sect1 id="ch-tools-dejagnu" role="wrap">
<title>DejaGNU-&dejagnu-version;</title>
<?dbhtml filename="dejagnu.html"?>
<indexterm zone="ch-tools-dejagnu"><primary sortas="a-DejaGNU">DejaGNU</primary></indexterm>
<sect2 role="package"><title/>
+<para>The DejaGNU package contains a framework for testing other programs.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +18,11 @@
<seglistitem><seg>0.1 SBU</seg><seg>8.6 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>DejaGNU installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -32,11 +38,28 @@
</sect2>
+
<sect2 id="contents-dejagnu" role="content"><title>Contents of DejaGNU</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed program</segtitle>
+<seglistitem><seg>runtest</seg></seglistitem>
+</segmentedlist>
-</sect2>
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="runtest">
+<term><command>runtest</command></term>
+<listitem>
+<para>A wrapper script that locates the proper
+<command>expect</command> shell and then runs DejaGNU</para>
+<indexterm zone="ch-tools-dejagnu runtest"><primary sortas="b-runtest">runtest</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect2>
</sect1>
+
diff --git a/chapter05/diffutils.xml b/chapter05/diffutils.xml
index 7d9d49eb5..b3408d512 100644
--- a/chapter05/diffutils.xml
+++ b/chapter05/diffutils.xml
@@ -7,7 +7,12 @@
<title>Diffutils-&diffutils-version;</title>
<?dbhtml filename="diffutils.html"?>
+<indexterm zone="ch-tools-diffutils">
+<primary sortas="a-Diffutils">Diffutils</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/diffutils.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,6 +20,8 @@
<seglistitem><seg>0.1 SBU</seg><seg>7.5 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/diffutils.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
@@ -28,10 +35,18 @@
<screen><userinput>make</userinput></screen>
-<para>And install it:</para>
+<para>This package does not come with a test suite.</para>
+
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-diffutils" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/expect.xml b/chapter05/expect.xml
index 11887dfd2..5d99eaf4d 100644
--- a/chapter05/expect.xml
+++ b/chapter05/expect.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-tools-expect" xreflabel="Expect" role="wrap">
+<sect1 id="ch-tools-expect" role="wrap">
<title>Expect-&expect-version;</title>
<?dbhtml filename="expect.html"?>
<indexterm zone="ch-tools-expect"><primary sortas="a-Expect">Expect</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Expect package contains a program for carrying out scripted dialogues
+with other interactive programs.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,12 +19,18 @@
<seglistitem><seg>0.1 SBU</seg><seg>3.9 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Expect installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Glibc, Grep, Make, Sed, and Tcl</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Expect</title>
-<para>Apply a patch:</para>
+<para>First, fix a bug that can result in false failures during the GCC test
+suite run:</para>
<screen><userinput>patch -Np1 -i ../expect-&expect-version;-spawn-1.patch</userinput></screen>
@@ -30,26 +38,84 @@
<screen><userinput>./configure --prefix=/tools --with-tcl=/tools/lib --with-x=no</userinput></screen>
+<para>The meaning of the configure options:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--with-tcl=/tools/lib</parameter></term>
+<listitem><para>This ensures that the configure script finds the Tcl installation in
+the temporary tools location instead of possibly locating an existing
+one on the host system.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--with-x=no</parameter></term>
+<listitem><para>This tells the configure script not to search for Tk
+(the Tcl GUI component) or the X Window System libraries, both of
+which may reside on the host system.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Build the package:</para>
<screen><userinput>make</userinput></screen>
-<para>To test the results, issue:
-<userinput>make test</userinput></para>
+<para>To test the results, issue: <userinput>make test</userinput>.
+Note that the Expect test suite is known to experience failures under
+certain host conditions that are not within our control. Therefore,
+test suite failures here are not surprising and are not considered
+critical.</para>
-<para>And install it:</para>
+<para>Install the package:</para>
<screen><userinput>make SCRIPTS="" install</userinput></screen>
-<para>You can now remove the source directories of both Tcl and Expect.</para>
+<para>The meaning of the make parameter:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>SCRIPTS=""</parameter></term>
+<listitem><para>This prevents installation of the supplementary expect
+scripts, which are not needed.</para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>The source directories of both Tcl and Expect can now be removed.</para>
</sect2>
<sect2 id="contents-expect" role="content"><title>Contents of Expect</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed program</segtitle>
+<segtitle>Installed library</segtitle>
+<seglistitem><seg>expect</seg><seg>libexpect-5.42.a</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="expect">
+<term><command>expect</command></term>
+<listitem>
+<para>Communicates with other interactive
+programs according to a script</para>
+<indexterm zone="ch-tools-expect expect"><primary sortas="b-expect">expect</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libexpect">
+<term><filename class="libraryfile">libexpect-5.42.a</filename></term>
+<listitem>
+<para>Contains functions that allow Expect to be used as a Tcl extension or to
+be used directly from C or C++ (without Tcl)</para>
+<indexterm zone="ch-tools-expect libexpect"><primary
+sortas="c-libexpect-5.42">libexpect-5.42</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
-
</sect1>
+
diff --git a/chapter05/findutils.xml b/chapter05/findutils.xml
index 0da1b5bc0..d75f15b90 100644
--- a/chapter05/findutils.xml
+++ b/chapter05/findutils.xml
@@ -7,7 +7,12 @@
<title>Findutils-&findutils-version;</title>
<?dbhtml filename="findutils.html"?>
+<indexterm zone="ch-tools-findutils">
+<primary sortas="a-Findutils">Findutils</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/findutils.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,6 +20,8 @@
<seglistitem><seg>0.2 SBU</seg><seg>7.6 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/findutils.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
@@ -28,13 +35,19 @@
<screen><userinput>make</userinput></screen>
-<para>To test the results, issue:
-<userinput>make check</userinput></para>
+<para>To test the results, issue: <userinput>make
+check</userinput>.</para>
-<para>And install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-findutils" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/flex.xml b/chapter05/flex.xml
index d8f01a11e..c78a52ffc 100644
--- a/chapter05/flex.xml
+++ b/chapter05/flex.xml
@@ -3,11 +3,16 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-tools-flex" xreflabel="Flex" role="wrap">
+<sect1 id="ch-tools-flex" role="wrap">
<title>Flex-&flex-version;</title>
<?dbhtml filename="flex.html"?>
+<indexterm zone="ch-tools-flex">
+<primary sortas="a-Flex">Flex</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/flex.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,16 +20,22 @@
<seglistitem><seg>0.6 SBU</seg><seg>10.6 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/flex.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
<title>Installation of Flex</title>
-<para>Apply a patch:</para>
+<para>Flex contains several known bugs. These can be fixed with the
+following patch:</para>
<screen><userinput>patch -Np1 -i ../flex-&flex-version;-debian_fixes-2.patch</userinput></screen>
-<para>Touch the man-page:</para>
+<para>The GNU autotools will detect that the Flex source code has been
+modified by the previous patch and tries to update the manual page
+accordingly. This does not work on many systems, and the default page is
+fine, so make sure it does not get regenerated:</para>
<screen><userinput>touch doc/flex.1</userinput></screen>
@@ -39,10 +50,16 @@
<para>To test the results, issue:
<userinput>make check</userinput>.</para>
-<para>Now install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-flex" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/gawk.xml b/chapter05/gawk.xml
index 62ad8768d..e72817f81 100644
--- a/chapter05/gawk.xml
+++ b/chapter05/gawk.xml
@@ -7,7 +7,12 @@
<title>Gawk-&gawk-version;</title>
<?dbhtml filename="gawk.html"?>
+<indexterm zone="ch-tools-gawk">
+<primary sortas="a-Gawk">Gawk</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gawk.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,6 +20,8 @@
<seglistitem><seg>0.2 SBU</seg><seg>17 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gawk.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
@@ -28,13 +35,19 @@
<screen><userinput>make</userinput></screen>
-<para>To test the results, issue:
-<userinput>make check</userinput></para>
+<para>To test the results (not necessary), issue: <userinput>make
+check</userinput>.</para>
-<para>And install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-gawk" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml
index 39b343a2e..503438558 100644
--- a/chapter05/gcc-pass1.xml
+++ b/chapter05/gcc-pass1.xml
@@ -7,7 +7,12 @@
<title>GCC-&gcc-version; - Pass 1</title>
<?dbhtml filename="gcc-pass1.html"?>
+<indexterm zone="ch-tools-gcc-pass1">
+<primary sortas="a-GCC">GCC</primary>
+<secondary>tools, pass 1</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gcc.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,36 +20,117 @@
<seglistitem><seg>4.4 SBU</seg><seg>300 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gcc.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
<title>Installation of GCC</title>
-<para>Create a build dir:</para>
+<para>Unpack only the gcc-core tarball because neither the C++
+compiler nor the test suite will be needed here.</para>
+
+<para>This package is known to have issues when its default
+optimization flags (including the <parameter>-march</parameter> and
+<parameter>-mcpu</parameter> options) are changed. If any environment
+variables that override default optimizations have been defined, such
+as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
+unset them when building GCC.</para>
+
+<para>The GCC documentation recommends building GCC outside of the
+source directory in a dedicated build directory:</para>
<screen><userinput>mkdir ../gcc-build
cd ../gcc-build</userinput></screen>
<para>Prepare GCC for compilation:</para>
-<!--NEW-->
-<screen><userinput>CC="gcc -B/usr/bin" ../gcc-&gcc-version;/configure \
- --prefix=/tools --libexecdir=/tools/lib \
- --with-local-prefix=/tools --disable-nls \
- --enable-shared --enable-languages=c</userinput></screen>
+<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
+ --libexecdir=/tools/lib --with-local-prefix=/tools \
+ --disable-nls --enable-shared --enable-languages=c</userinput></screen>
+
+<para>The meaning of the configure options:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--with-local-prefix=/tools</parameter></term>
+<listitem><para>The purpose of this switch is to remove <filename class="directory">/usr/local/include</filename>
+from <command>gcc</command>'s include search path. This is not absolutely
+essential, however, it helps to minimize the influence of the host
+system.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--enable-shared</parameter></term>
+<listitem><para>This switch may seem counter-intuitive at first.
+However, this switch allows the building of
+<filename class="libraryfile">libgcc_s.so.1</filename> and
+<filename class="libraryfile">libgcc_eh.a</filename>, and having
+<filename class="libraryfile">libgcc_eh.a</filename> available ensures that the configure
+script for Glibc (the next package we compile) produces the proper
+results. Note that the GCC binaries will still be linked statically
+because this is controlled by the <parameter>-static</parameter> value of
+the <envar>BOOT_LDFLAGS</envar> variable in the next
+step.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--enable-languages=c</parameter></term>
+<listitem><para>This option ensures that only the C compiler is built.
+This option is only needed when you have downloaded and unpacked the
+full GCC tarball, as opposed to just the gcc-core
+tarball.</para></listitem>
+</varlistentry>
+</variablelist>
<para>Continue with compiling the package:</para>
<screen><userinput>make BOOT_LDFLAGS="-static" bootstrap</userinput></screen>
-<para>Now install the package:</para>
+<para>The meaning of the make parameters:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>BOOT_LDFLAGS="-static"</parameter></term>
+<listitem><para>This tells GCC to link its programs statically.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>bootstrap</parameter></term>
+<listitem><para>This target does not just compile GCC, but compiles it
+several times. It uses the programs compiled in a first round to
+compile itself a second time, and then again a third time. It then
+compares these second and third compiles to make sure it can reproduce
+itself flawlessly. This also implies that it was compiled
+correctly.</para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>Compilation is now complete. At this point, the test suite would
+normally be run, but, as mentioned before, the test suite framework is
+not in place yet. The benefits of running the tests at this point
+are minimal since the programs from this first pass will soon be
+replaced.</para>
+
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<para>Create a symlink:</para>
+<para>As a finishing touch, create a symlink. Many programs and
+scripts run <command>cc</command> instead of <command>gcc</command>, which is used to keep programs generic
+and therefore usable on all kinds of UNIX systems where the GNU C compiler
+is not always installed. Running <command>cc</command> leaves the system administrator
+free to decide which C compiler to install.</para>
<screen><userinput>ln -s gcc /tools/bin/cc</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-gcc" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/gcc-pass2.xml b/chapter05/gcc-pass2.xml
index 9058c02ea..202f9a0d9 100644
--- a/chapter05/gcc-pass2.xml
+++ b/chapter05/gcc-pass2.xml
@@ -7,6 +7,10 @@
<title>GCC-&gcc-version; - Pass 2</title>
<?dbhtml filename="gcc-pass2.html"?>
+<indexterm zone="ch-tools-gcc-pass2">
+<primary sortas="a-GCC">GCC</primary>
+<secondary>tools, pass 2</secondary></indexterm>
+
<sect2 role="package"><title/>
<segmentedlist>
@@ -15,25 +19,88 @@
<seglistitem><seg>11.0 SBU</seg><seg>274 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gcc.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
<title>Re-installation of GCC</title>
-<para>Check if there is PTYs for the test suites:</para>
+<para>This package is known to have issues when its default
+optimization flags (including the <parameter>-march</parameter> and
+<parameter>-mcpu</parameter> options) are changed. If any environment
+variables that override default optimizations have been defined, such
+as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
+unset them when building GCC.</para>
+
+<para>The tools required to test GCC and Binutils&mdash;Tcl, Expect
+and DejaGNU&mdash;are installed now. GCC and Binutils can now be
+rebuilt, linking them against the new Glibc and testing them properly
+(if running the test suites in this chapter). Please note that these
+test suites are highly dependent on properly functioning PTYs which
+are provided by the host. PTYs are most commonly implemented via the
+<systemitem class="filesystem">devpts</systemitem> file system. Check
+to see if the host system is set up correctly in this regard by
+performing a quick test:</para>
<screen><userinput>expect -c "spawn ls"</userinput></screen>
-<para>Apply two patches:</para>
+<para>The response might be:</para>
+
+<screen><computeroutput>The system has no more ptys.
+Ask your system administrator to create more.</computeroutput></screen>
+
+<para>If the above message is received, the host does not have its
+PTYs set up properly. In this case, there is no point in running the
+test suites for GCC and Binutils until this issue is resolved. Please
+consult the LFS Wiki at <ulink url="&wiki-root;"/> for more
+information on how to get PTYs working.</para>
+
+<para>Because the C and the C++ compilers will be built, unpack both
+the core and the g++ tarballs (as well as test suite, if you want to
+run the tests). By unpacking them in the working directory, they will
+all unfold into a single <filename
+class="directory">gcc-&gcc-version;/</filename> subdirectory.</para>
+
+<para>First correct a known problem and make an essential adjustment:</para>
<screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes-1.patch
patch -Np1 -i ../gcc-&gcc-version;-specs-2.patch</userinput></screen>
+<para>The first patch disables the GCC <command>fixincludes</command>
+script. This was briefly mentioned earlier, but a more in-depth
+explanation of the fixincludes process is warranted here. Under normal
+circumstances, the GCC <command>fixincludes</command> script scans the
+system for header files that need to be fixed. It might find that some
+Glibc header files on the host system need to be fixed, and will fix
+them and put them in the GCC private include directory. In <xref
+linkend="chapter-building-system"/>, after the newer Glibc has been
+installed, this private include directory will be searched before the
+system include directory. This may result in GCC finding the fixed
+headers from the host system, which most likely will not match the
+Glibc version used for the LFS system.</para>
+
+<para>The second patch changes GCC's default location of the dynamic
+linker (typically <filename class="libraryfile">ld-linux.so.2</filename>). It also removes
+<filename class="directory">/usr/include</filename> from GCC's include
+search path. Patching now rather than adjusting the specs file after
+installation ensures that the new dynamic linker is used during the
+actual build of GCC. That is, all of the final (and temporary)
+binaries created during the build will link against the new
+Glibc.</para>
+
+<important><para>The above patches are critical in ensuring a
+successful overall build. Do not forget to apply
+them.</para></important>
+
<para>Create a separate build directory again:</para>
<screen><userinput>mkdir ../gcc-build
cd ../gcc-build</userinput></screen>
+<para>Before starting to build GCC, remember to unset any environment
+variables that override the default optimization flags.</para>
+
<para>Now prepare GCC for compilation:</para>
<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
@@ -42,36 +109,105 @@ cd ../gcc-build</userinput></screen>
--enable-threads=posix --enable-__cxa_atexit \
--enable-languages=c,c++ --disable-libstdcxx-pch</userinput></screen>
+<para>The meaning of the new configure options:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--enable-clocale=gnu</parameter></term>
+<listitem><para>This option ensures the correct locale model is
+selected for the C++ libraries under all circumstances. If the
+configure script finds the <emphasis>de_DE</emphasis> locale installed, it will select the
+correct gnu locale model. However, if the <emphasis>de_DE</emphasis> locale is not
+installed, there is the risk of building Application Binary Interface
+(ABI)-incompatible C++ libraries because the incorrect generic locale
+model may be selected.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--enable-threads=posix</parameter></term>
+<listitem><para>This enables C++ exception handling for multi-threaded
+code.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--enable-__cxa_atexit</parameter></term>
+<listitem><para>This option allows use of
+<emphasis>__cxa_atexit</emphasis>, rather than
+<emphasis>atexit</emphasis>, to register C++ destructors for local
+statics and global objects. This option is essential for fully
+standards-compliant handling of destructors. It also effects the C++
+ABI, and therefore results in C++ shared libraries and C++ programs
+that are interoperable with other Linux
+distributions.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--enable-languages=c,c++</parameter></term>
+<listitem><para>This option
+ensures that both the C and C++ compilers are built.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--disable-libstdcxx-pch</parameter></term>
+<listitem><para>Do not build the pre-compiled header (PCH) for
+<filename class="libraryfile">libstdc++</filename>. It takes up a lot of space,
+and we have no use for it.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>Test the results</para>
+<para>There is no need to use the <parameter>bootstrap</parameter>
+target now because the compiler being used to compile this GCC was
+built from the exact same version of the GCC sources used
+earlier.</para>
+
+<para>Compilation is now complete. As previously mentioned, running
+the test suites for the temporary tools compiled in this chapter is
+not mandatory. To run the GCC test suite anyway, use the following
+command:</para>
<screen><userinput>make -k check</userinput></screen>
-<para>To get a summary of the test suite results, run this:</para>
+<para>The <parameter>-k</parameter> flag is used to make the test suite run
+through to completion and not stop at the first failure. The GCC test
+suite is very comprehensive and is almost guaranteed to generate a few
+failures. To receive a summary of the test suite results, run:</para>
<screen><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
<para>For only the summaries, pipe the output through
-<userinput>grep -A7 Summ</userinput></para>
+<userinput>grep -A7 Summ</userinput>.</para>
<para>Results can be compared to those posted to the gcc-testresults
-mailing list to see similar configurations to the one being built. For an example of how
-current GCC-&gcc-version; should look on i686-pc-linux-gnu, see
-<ulink url="http://gcc.gnu.org/ml/gcc-testresults/2004-11/msg00569.html"/>.</para>
+mailing list to see similar configurations to the one being built. For
+an example of how current GCC-&gcc-version; should look on
+i686-pc-linux-gnu, see <ulink
+url="http://gcc.gnu.org/ml/gcc-testresults/2004-07/msg00179.html"/>.</para>
+
+<para>A few unexpected failures cannot always be avoided. The
+GCC developers are usually aware of these issues, but have not
+resolved them yet. Unless the test results are vastly different from
+those at the above URL, it is safe to continue.</para>
-<para>And finally install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<note><para>At this point it is strongly recommended to repeat the sanity check
-we performed earlier in this chapter. Refer back to
-<xref linkend="ch-tools-adjusting"/> and repeat the little test compilation. If
-the result is wrong, then most likely you forgot to apply the above mentioned
-GCC Specs patch.</para></note>
+<note><para>At this point it is strongly recommended to repeat the
+sanity check we performed earlier in this chapter. Refer back to <xref
+linkend="ch-tools-adjusting" role=","/> and repeat the test compilation. If
+the result is wrong, the most likely reason is that the GCC Specs
+patch was not properly applied.</para></note>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-gcc" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/gettext.xml b/chapter05/gettext.xml
index feb4c38ed..ceca963c1 100644
--- a/chapter05/gettext.xml
+++ b/chapter05/gettext.xml
@@ -7,7 +7,12 @@
<title>Gettext-&gettext-version;</title>
<?dbhtml filename="gettext.html"?>
+<indexterm zone="ch-tools-gettext">
+<primary sortas="a-Gettext">Gettext</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gettext.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,6 +20,8 @@
<seglistitem><seg>0.5 SBU</seg><seg>55 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gettext.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
@@ -25,17 +32,46 @@
<screen><userinput>./configure --prefix=/tools --disable-libasprintf \
--disable-csharp</userinput></screen>
+<para>The meaning of the configure options:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--disable-libasprintf</parameter></term>
+<listitem><para>This flag tells Gettext not to build the
+<filename class="libraryfile">asprintf</filename> library. Because nothing in this
+chapter or the next requires this library and Gettext gets rebuilt later,
+exclude it to save time and space.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--disable-csharp</parameter></term>
+<listitem><para>This tells Gettext not to use a C# compiler, even if a
+C# compiler is installed on the host. This needs to be done because
+once we enter the chroot environment, C# will no longer be
+available.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>To test the results, issue:
-<userinput>make check</userinput></para>
+<para>To test the results, issue: <userinput>make check</userinput>.
+This takes quite some time, around 7 SBUs. The Gettext test suite is
+known to experience failures under certain host conditions, for
+example when it finds a Java compiler on the host. An experimental
+patch to disable Java is available from the LFS Patches project at
+<ulink url="&lfs-root;patches/"/>.</para>
-<para>And install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref linkend="contents-gettext" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml
index dcb468a56..1e3d4925b 100644
--- a/chapter05/glibc.xml
+++ b/chapter05/glibc.xml
@@ -7,7 +7,12 @@
<title>Glibc-&glibc-version;</title>
<?dbhtml filename="glibc.html"?>
+<indexterm zone="ch-tools-glibc">
+<primary sortas="a-Glibc">Glibc</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/glibc.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,12 +20,26 @@
<seglistitem><seg>11.8 SBU</seg><seg>800 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/glibc.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
<title>Installation of Glibc</title>
-<para>Create a build dir:</para>
+<para>This package is known to have issues when its default
+optimization flags (including the <parameter>-march</parameter> and
+<parameter>-mcpu</parameter> options) are changed. If any environment
+variables that override default optimizations have been defined, such
+as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
+unset them when building Glibc.</para>
+
+<para>It should be noted that compiling Glibc in any way other than
+the method suggested in this book puts the stability of the system at
+risk.</para>
+
+<para>The Glibc documentation recommends building Glibc outside of the source
+directory in a dedicated build directory:</para>
<screen><userinput>mkdir ../glibc-build
cd ../glibc-build</userinput></screen>
@@ -33,32 +52,153 @@ cd ../glibc-build</userinput></screen>
--without-gd --without-cvs --with-headers=/tools/include \
--disable-selinux</userinput></screen>
+<para>The meaning of the configure options:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--disable-profile</parameter></term>
+<listitem><para>This builds the libraries without profiling
+information. Omit this option if profiling on the temporary tools is
+necessary.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--enable-add-ons</parameter></term>
+<listitem><para>This tells Glibc to use the NPTL add-on as its threading
+library.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--enable-kernel=2.6.0</parameter></term>
+<listitem><para>This tells Glibc to compile the library with support
+for 2.6.x Linux kernels.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--with-binutils=/tools/bin</parameter></term>
+<listitem><para>While not required, this switch ensures that there are
+no errors pertaining to which Binutils programs get used during the
+Glibc build.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--without-gd</parameter></term>
+<listitem><para>This prevents the build of the
+<command>memusagestat</command> program, which insists on linking
+against the host's libraries (libgd, libpng, libz,
+etc.).</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--without-cvs</parameter></term>
+<listitem><para>This prevents the Makefile files from
+attempting automatic CVS checkouts when using a CVS snapshot. While
+this command is not required, it is recommended because it suppresses
+an annoying, but harmless, warning about a missing autoconf
+program.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--with-headers=/tools/include</parameter></term>
+<listitem><para>This tells Glibc to compile itself against the headers recently
+installed to the tools directory, so that it knows exactly what features the
+kernel has and can optimize itself accordingly.</para></listitem>
+</varlistentry>
+
+<!-- Edit Me -->
+<varlistentry>
+<term><parameter>--disable-selinux</parameter></term>
+<listitem><para>When building from hosts using SELinux functionality
+(i.e. Fedora Core 3), glibc will try to integrate this functionality into
+itself, but will fail, because we do not have this functionality in the LFS
+tools enviornment. This option will disable this, allowing glibc to build
+correctly, but will not otherwise affect the build.</para></listitem>
+</varlistentry>
+<!-- -->
+</variablelist>
+
+<para>During this stage the following warning might appear:</para>
+
+<blockquote><screen><computeroutput>configure: WARNING:
+*** These auxiliary programs are missing or
+*** incompatible versions: msgfmt
+*** some features will be disabled.
+*** Check the INSTALL file for required versions.</computeroutput></screen></blockquote>
+
+<para>The missing or incompatible <command>msgfmt</command> program is
+generally harmless, but it can sometimes cause issues when running the
+test suite. This <command>msgfmt</command> program is part of the
+Gettext package which the host distribution should provide. If
+<command>msgfmt</command> is present but deemed incompatible, upgrade
+the host system's Gettext package or continue without it and see if
+the test suite runs without problems regardless.</para>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>Test the results:</para>
+<para>Compilation is now complete. As mentioned earlier, running the
+test suites for the temporary tools installed in this chapter is not
+mandatory. To run the Glibc test suite (if desired), the following
+command will do so:</para>
<screen><userinput>make check</userinput></screen>
<para>For a discussion of test failures that are of particular
-importance, please see <xref linkend="ch-system-glibc"/>.</para>
+importance, please see <xref linkend="ch-system-glibc" role="."/></para>
+
+<para>In this chapter, some tests can be adversely effected by
+existing tools or environmental issues on the host system. Glibc test
+suite failures in this chapter are typically not worrisome. The Glibc
+installed in <xref linkend="chapter-building-system"/> is the one that
+will ultimately end up being used, so that is the one that needs to pass
+most tests (even in <xref linkend="chapter-building-system"/>, some
+failures could still occur, for example, with the math tests).</para>
+
+<para>When experiencing a failure, make a note of it, then continue by
+reissuing the <command>make check</command> command. The test suite should pick up where it left
+off and continue. This stop-start sequence can be circumvented by
+issuing a <command>make -k check</command> command. If using this option, be sure to log the
+output so that the log file can be examined for failures later.</para>
+
+<para>The install stage of Glibc will issue a harmless warning at the
+end about the absence of <filename>/tools/etc/ld.so.conf</filename>.
+Prevent this warning with:</para>
<screen><userinput>mkdir /tools/etc
touch /tools/etc/ld.so.conf</userinput></screen>
-<para>Now install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<para>To install the Glibc locales, use the following
+<para>Different countries and cultures have varying conventions for
+how to communicate. These conventions range from the format for
+representing dates and times to more complex issues, such as the
+language spoken. The <quote>internationalization</quote> of GNU
+programs works by locale.</para>
+
+<note><para>If the test suites are not being run in this chapter (as
+per the recommendation), there is no need to install the locales now.
+The appropriate locales will be installed in the next
+chapter.</para></note>
+
+<para>To install the Glibc locales anyway, use the following
command:</para>
<screen><userinput>make localedata/install-locales</userinput></screen>
-<para>An alternative to running the previous command is to install only those
-locales which you need or want. The following instructions, instead of the
-install-locales target above, will install the minimum set of locales necessary
+<para>To save time, an alternative to running the
+previous command (which generates and installs every locale Glibc is
+aware of) is to install only those locales that are wanted and needed.
+This can be achieved by using the <command>localedef</command>
+command. Information on this command is located in the
+<filename>INSTALL</filename> file in the Glibc source. However, there
+are a number of locales that are essential in order for the tests of
+future packages to pass, in particular, the
+<emphasis>libstdc++</emphasis> tests from GCC. The following
+instructions, instead of the <parameter>install-locales</parameter>
+target used above, will install the minimum set of locales necessary
for the tests to run successfully:</para>
<screen><userinput>mkdir -p /tools/lib/locale
@@ -76,4 +216,10 @@ localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-glibc" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/grep.xml b/chapter05/grep.xml
index 7af37c4b6..6cc9ce553 100644
--- a/chapter05/grep.xml
+++ b/chapter05/grep.xml
@@ -7,7 +7,12 @@
<title>Grep-&grep-version;</title>
<?dbhtml filename="grep.html"?>
+<indexterm zone="ch-tools-grep">
+<primary sortas="a-Grep">Grep</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/grep.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,6 +20,8 @@
<seglistitem><seg>0.1 SBU</seg><seg>5.8 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/grep.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
@@ -25,12 +32,32 @@
<screen><userinput>./configure --prefix=/tools \
--disable-perl-regexp --with-included-regex</userinput></screen>
+<para>The meaning of the configure options:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--disable-perl-regexp</parameter></term>
+<listitem><para>This makes sure that the <command>grep</command>
+program does not get linked against a Perl Compatible Regular
+Expression (PCRE) library that may be present on the host and would
+not be available once we enter the chroot
+environment.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--with-included-regex</parameter></term>
+<listitem><para>This ensures that Grep uses its internal regular
+expression code. Without this switch, Grep will use the code from
+Glibc, which is known to be buggy.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>To test the results, issue:
-<userinput>make check</userinput></para>
+<para>To test the results, issue: <userinput>make
+check</userinput>.</para>
<para>Install the package:</para>
@@ -38,4 +65,10 @@
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-grep" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/gzip.xml b/chapter05/gzip.xml
index f8c86b663..3683d5ff9 100644
--- a/chapter05/gzip.xml
+++ b/chapter05/gzip.xml
@@ -7,7 +7,12 @@
<title>Gzip-&gzip-version;</title>
<?dbhtml filename="gzip.html"?>
+<indexterm zone="ch-tools-gzip">
+<primary sortas="a-Gzip">Gzip</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gzip.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,6 +20,8 @@
<seglistitem><seg>0.1 SBU</seg><seg>2.6 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/gzip.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
@@ -28,10 +35,18 @@
<screen><userinput>make</userinput></screen>
-<para>And install it:</para>
+<para>This package does not come with a test suite.</para>
+
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-gzip" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/hostreqs.xml b/chapter05/hostreqs.xml
index c4a216a24..310d450d1 100644
--- a/chapter05/hostreqs.xml
+++ b/chapter05/hostreqs.xml
@@ -7,6 +7,34 @@
<title>Host System Requirements</title>
<?dbhtml filename="hostreqs.html"?>
-<para>See testing.</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 high
+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. Secondly, 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><userinput>cat /proc/version</userinput></screen>
+
+<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 state that the host kernel
+was not compiled using a GCC-3.0 (or later) compiler, one will need to
+be compiled. The host system will then need to be rebooted to use the
+newly compiled kernel. Instructions for compiling the kernel and
+configuring the boot loader (assuming the host uses GRUB) are located
+in <xref linkend="chapter-bootable"/>.</para>
</sect1>
+
diff --git a/chapter05/introduction.xml b/chapter05/introduction.xml
index e16f460a8..4438bd7a6 100644
--- a/chapter05/introduction.xml
+++ b/chapter05/introduction.xml
@@ -7,6 +7,61 @@
<title>Introduction</title>
<?dbhtml filename="introduction.html"?>
-<para>See testing.</para>
+<para>This chapter shows how to compile and install a minimal Linux
+system. This system will contain just enough tools to start
+constructing the final LFS system in <xref
+linkend="chapter-building-system"/> and allow a working environment
+with more user convenience than a minimum environment would.</para>
+
+<para>There are two steps in building this minimal system. The first
+step is to build a new and host-independent toolchain (compiler,
+assembler, linker, libraries, and a few useful utilities). The second
+step uses this toolchain to build the other essential tools.</para>
+
+<para>The files compiled in this chapter will be installed under the
+<filename class="directory">$LFS/tools</filename> directory to keep
+them separate from the files installed in the next chapter and the
+host production directories. Since the packages compiled here are
+temporary, we do not want them to pollute the soon-to-be LFS
+system.</para>
+
+<para>Before issuing the build instructions for a package, the package
+should be unpacked as user <emphasis>lfs</emphasis>, and a
+<command>cd</command> into the created directory should be performed. The build
+instructions assume that the <command>bash</command> shell is in use.</para>
+
+<para>Several of the packages are patched before compilation, but only
+when the patch is needed to circumvent a problem. A patch is often
+needed in both this and the next chapter, but sometimes in only one or
+the other. Therefore, do not be concerned if instructions for a downloaded
+patch seem to be missing. Warning messages about
+<emphasis>offset</emphasis> or <emphasis>fuzz</emphasis> may
+also be encountered when applying a patch. Do not worry about these
+warnings, as the patch was still successfully applied.</para>
+
+<para>During the compilation of most packages, there will be several
+warnings that scroll by on the screen. These are normal and can safely
+be ignored. These warnings are as they appear&mdash;warnings about
+deprecated, but not invalid, use of the C or C++ syntax. C standards
+change fairly often, and some packages still use the older standard.
+This is not a problem, but does prompt the warning.</para>
+
+<para>After installing each package, delete its source and build
+directories, unless specifically instructed otherwise. Deleting the
+sources saves space and prevents mis-configuration when the same
+package is reinstalled later. Only three of the packages need to
+retain the source and build directories in order for their contents to
+be used by later commands. Pay special attention to these
+reminders.</para>
+
+<para>Check one last time that the <envar>LFS</envar> environment
+variable is set up properly:</para>
+
+<screen><userinput>echo $LFS</userinput></screen>
+
+<para>Make sure the output shows the path to the LFS partition's mount
+point, which is <filename class="directory">/mnt/lfs</filename>, using
+our example.</para>
</sect1>
+
diff --git a/chapter05/linux-libc-headers.xml b/chapter05/linux-libc-headers.xml
index 167dceb57..4370bef9f 100644
--- a/chapter05/linux-libc-headers.xml
+++ b/chapter05/linux-libc-headers.xml
@@ -7,7 +7,14 @@
<title>Linux-Libc-Headers-&linux-libc-headers-version;</title>
<?dbhtml filename="linux-libc-headers.html"?>
+<indexterm zone="ch-tools-linux-libc-headers">
+<primary sortas="a-Linux-Libc-Headers">Linux-Libc-Headers</primary>
+<secondary>tools, headers</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+ href="../chapter06/linux-libc-headers.xml"
+ xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,16 +22,38 @@
<seglistitem><seg>0.1 SBU</seg><seg>22 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+ href="../chapter06/linux-libc-headers.xml"
+ xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
+
</sect2>
<sect2 role="installation">
<title>Installation of Linux-Libc-Headers</title>
+<para>For years it has been common practice to use <quote>raw</quote> kernel
+headers (straight from a kernel tarball) in <filename
+class="directory">/usr/include</filename>, but over the
+last few years, the kernel developers have taken a strong stance that
+this should not be done. This gave birth to the Linux-Libc-Headers
+Project, which was designed to maintain an Application Programming
+Interface (API) stable version of the Linux headers.</para>
+
<para>Install the header files:</para>
<screen><userinput>cp -R include/asm-i386 /tools/include/asm
cp -R include/linux /tools/include</userinput></screen>
+<para>If your architecture is not i386 (compatible), adjust the first command
+accordingly.</para>
+
+</sect2>
+
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-linux-libc-headers" role="."/></para>
</sect2>
</sect1>
+
diff --git a/chapter05/m4.xml b/chapter05/m4.xml
index bab2b6a18..c861f0593 100644
--- a/chapter05/m4.xml
+++ b/chapter05/m4.xml
@@ -3,11 +3,16 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-tools-m4" xreflabel="M4" role="wrap">
+<sect1 id="ch-tools-m4" role="wrap">
<title>M4-&m4-version;</title>
<?dbhtml filename="m4.html"?>
+<indexterm zone="ch-tools-m4">
+<primary sortas="a-M4">M4</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/m4.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,6 +20,8 @@
<seglistitem><seg>0.1 SBU</seg><seg>3.0 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/m4.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
@@ -28,13 +35,19 @@
<screen><userinput>make</userinput></screen>
-<para>To test the results, issue:
-<userinput>make check</userinput>.</para>
+<para>To test the results, issue: <userinput>make
+check</userinput>.</para>
-<para>Now install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-m4" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/make.xml b/chapter05/make.xml
index ea37ca105..d20b8ac0a 100644
--- a/chapter05/make.xml
+++ b/chapter05/make.xml
@@ -7,7 +7,12 @@
<title>Make-&make-version;</title>
<?dbhtml filename="make.html"?>
+<indexterm zone="ch-tools-make">
+<primary sortas="a-Make">Make</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/make.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,6 +20,8 @@
<seglistitem><seg>0.2 SBU</seg><seg>8.8 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/make.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
@@ -28,8 +35,8 @@
<screen><userinput>make</userinput></screen>
-<para>To test the results, issue:
-<userinput>make check</userinput></para>
+<para>To test the results, issue: <userinput>make
+check</userinput>.</para>
<para>Install the package:</para>
@@ -37,4 +44,10 @@
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-make" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/ncurses.xml b/chapter05/ncurses.xml
index 8227b03bb..72538b445 100644
--- a/chapter05/ncurses.xml
+++ b/chapter05/ncurses.xml
@@ -7,7 +7,12 @@
<title>Ncurses-&ncurses-version;</title>
<?dbhtml filename="ncurses.html"?>
+<indexterm zone="ch-tools-ncurses">
+<primary sortas="a-Ncurses">Ncurses</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/ncurses.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,6 +20,8 @@
<seglistitem><seg>0.7 SBU</seg><seg>26 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/ncurses.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
@@ -25,14 +32,43 @@
<screen><userinput>./configure --prefix=/tools --with-shared \
--without-debug --without-ada --enable-overwrite</userinput></screen>
+<para>The meaning of the configure options:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--without-ada</parameter></term>
+<listitem><para>This tells Ncurses not to build its Ada bindings, even
+if an Ada compiler is installed on the host. This needs to be done
+because once we enter the chroot environment, Ada will no longer be
+available.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--enable-overwrite</parameter></term>
+<listitem><para>This tells Ncurses to install its header files into
+<filename class="directory">/tools/include</filename>, instead of
+<filename class="directory">/tools/include/ncurses</filename>, to
+ensure that other packages can find the Ncurses headers
+successfully.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
+<para>This package does not come with a test suite.</para>
+
<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-ncurses" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/patch.xml b/chapter05/patch.xml
index 0f8c62cb5..ec5bc8888 100644
--- a/chapter05/patch.xml
+++ b/chapter05/patch.xml
@@ -7,7 +7,12 @@
<title>Patch-&patch-version;</title>
<?dbhtml filename="patch.html"?>
+<indexterm zone="ch-tools-patch">
+<primary sortas="a-Patch">Patch</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/patch.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,6 +20,8 @@
<seglistitem><seg>0.1 SBU</seg><seg>1.9 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/patch.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
@@ -24,14 +31,26 @@
<screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/tools</userinput></screen>
+<para>The preprocessor flag <parameter>-D_GNU_SOURCE</parameter> is
+only needed on the PowerPC platform. It can be left out on other
+architectures.</para>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
+<para>This package does not come with a test suite.</para>
+
<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-patch" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/perl.xml b/chapter05/perl.xml
index d118bb56f..77d619441 100644
--- a/chapter05/perl.xml
+++ b/chapter05/perl.xml
@@ -7,7 +7,12 @@
<title>Perl-&perl-version;</title>
<?dbhtml filename="perl.html"?>
+<indexterm zone="ch-tools-perl">
+<primary sortas="a-Perl">Perl</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/perl.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,24 +20,45 @@
<seglistitem><seg>0.8 SBU</seg><seg>74 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/perl.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
<title>Installation of Perl</title>
-<para>First adapt some hard-wired paths to the C library:</para>
+<para>First adapt some hard-wired paths to the C library by applying
+the following patch:</para>
<screen><userinput>patch -Np1 -i ../perl-&perl-version;-libc-1.patch</userinput></screen>
-<para>Now prepare Perl for compilation:</para>
+<para>Prepare Perl for compilation (make sure to get the 'IO Fcntl POSIX'
+part of the command correct&mdash;they are all letters):</para>
<screen><userinput>./configure.gnu --prefix=/tools -Dstatic_ext='IO Fcntl POSIX'</userinput></screen>
+<para>The meaning of the configure option:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>-Dstatic_ext='IO Fcntl POSIX'</parameter></term>
+<listitem><para>This tells Perl to build the minimum set of static
+extensions needed for installing and testing the Coreutils package in
+the next chapter.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Compile only the required tools:</para>
<screen><userinput>make perl utilities</userinput></screen>
-<para>Then copy these tools and their libraries:</para>
+<para>Although Perl comes with a test suite, it is not recommended to
+run it at this point. Only part of Perl was built and running
+<userinput>make test</userinput> now will cause the rest of Perl to be
+built as well, which is unnecessary at this point. The test suite can
+be run in the next chapter if desired.</para>
+
+<para>Copy these tools and their libraries:</para>
<screen><userinput>cp perl pod/pod2man /tools/bin
mkdir -p /tools/lib/perl5/&perl-version;
@@ -40,4 +66,10 @@ cp -R lib/* /tools/lib/perl5/&perl-version;</userinput></screen>
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-perl" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/sed.xml b/chapter05/sed.xml
index 271e01d4d..9bb1090e4 100644
--- a/chapter05/sed.xml
+++ b/chapter05/sed.xml
@@ -7,7 +7,12 @@
<title>Sed-&sed-version;</title>
<?dbhtml filename="sed.html"?>
+<indexterm zone="ch-tools-sed">
+<primary sortas="a-Sed">Sed</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/sed.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,6 +20,8 @@
<seglistitem><seg>0.2 SBU</seg><seg>5.2 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/sed.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
@@ -28,8 +35,8 @@
<screen><userinput>make</userinput></screen>
-<para>To test the results, issue:
-<userinput>make check</userinput></para>
+<para>To test the results, issue: <userinput>make
+check</userinput>.</para>
<para>Install the package:</para>
@@ -37,4 +44,10 @@
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-sed" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/stripping.xml b/chapter05/stripping.xml
index 5e7d7a00a..dcafa39da 100644
--- a/chapter05/stripping.xml
+++ b/chapter05/stripping.xml
@@ -7,13 +7,32 @@
<title>Stripping</title>
<?dbhtml filename="stripping.html"?>
-<para>Strip the programs and libraries:</para>
+<para>The steps in this section are optional, but if the LFS partition
+is rather small, it is beneficial to learn that unnecessary items can
+be removed. The executables and libraries built so far contain about
+130 MB of unneeded debugging symbols. Remove those symbols
+with:</para>
<screen><userinput>strip --strip-debug /tools/lib/*
strip --strip-unneeded /tools/{,s}bin/*</userinput></screen>
-<para>Remove the documentation:</para>
+<para>The last of the above commands will skip some twenty files,
+reporting that it does not recognize their file format. Most of these
+are scripts instead of binaries.</para>
+
+<para>Take care <emphasis>not</emphasis> to use
+<parameter>--strip-unneeded</parameter> on the libraries. The static
+ones would be destroyed and the toolchain packages would need to be
+built all over again.</para>
+
+<para>To save another 30 MB, remove the documentation:</para>
<screen><userinput>rm -rf /tools/{doc,info,man}</userinput></screen>
+<para>There will now be at least 850 MB of free space on the LFS file
+system that can be used to build and install Glibc in the next phase.
+If you can build and install Glibc, you can build and install the rest
+too.</para>
+
</sect1>
+
diff --git a/chapter05/tar.xml b/chapter05/tar.xml
index bd279bada..21e59b24c 100644
--- a/chapter05/tar.xml
+++ b/chapter05/tar.xml
@@ -7,7 +7,12 @@
<title>Tar-&tar-version;</title>
<?dbhtml filename="tar.html"?>
+<indexterm zone="ch-tools-tar">
+<primary sortas="a-Tar">Tar</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/tar.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,6 +20,8 @@
<seglistitem><seg>0.2 SBU</seg><seg>10 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/tar.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
@@ -28,8 +35,8 @@
<screen><userinput>make</userinput></screen>
-<para>To test the results, issue:
-<userinput>make check</userinput></para>
+<para>To test the results, issue: <userinput>make
+check</userinput>.</para>
<para>Install the package:</para>
@@ -37,4 +44,10 @@
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-tar" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/tcl.xml b/chapter05/tcl.xml
index 7f15832c2..69dcbdec3 100644
--- a/chapter05/tcl.xml
+++ b/chapter05/tcl.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-tools-tcl" xreflabel="Tcl" role="wrap">
+<sect1 id="ch-tools-tcl" role="wrap">
<title>Tcl-&tcl-version;</title>
<?dbhtml filename="tcl.html"?>
<indexterm zone="ch-tools-tcl"><primary sortas="a-Tcl">Tcl</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Tcl package contains the Tool Command Language.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,11 +18,26 @@
<seglistitem><seg>0.9 SBU</seg><seg>23 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Tcl installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
+
</sect2>
<sect2 role="installation">
<title>Installation of Tcl</title>
+<para>This package and the next two (Expect and DejaGNU) are
+installed to support running the test suites for GCC and Binutils.
+Installing three packages for testing purposes may seem excessive, but
+it is very reassuring, if not essential, to know that the most
+important tools are working properly. Even if the test suites are not
+run in this chapter (they are not mandatory), these packages
+are required to run the test suites in <xref
+linkend="chapter-building-system"/>.</para>
+
<para>Prepare Tcl for compilation:</para>
<screen><userinput>cd unix
@@ -31,14 +47,22 @@
<screen><userinput>make</userinput></screen>
-<para>To test the results, issue:
-<userinput>TZ=UTC make test</userinput>.</para>
+<para>To test the results, issue: <userinput>TZ=UTC make
+test</userinput>. The Tcl test suite is known to experience failures
+under certain host conditions that are not fully understood.
+Therefore, test suite failures here are not surprising, and are not
+considered critical. The <parameter>TZ=UTC</parameter> parameter sets
+the time zone to Coordinated Universal Time (UTC), also known as
+Greenwich Mean Time (GMT), but only for the duration of the test suite
+run. This ensures that the clock tests are exercised correctly.
+Details on the <envar>TZ</envar> environment variable is provided in
+<xref linkend="chapter-bootscripts"/>.</para>
<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<warning><para><emphasis>Do not remove</emphasis> the
+<warning><para><emphasis>Do not</emphasis> remove the
<filename class="directory">tcl&tcl-version;</filename> source directory yet, as the next package
will need its internal headers.</para></warning>
@@ -50,8 +74,41 @@ will need its internal headers.</para></warning>
<sect2 id="contents-tcl" role="content"><title>Contents of Tcl</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed library</segtitle>
+<seglistitem><seg>tclsh (link to tclsh8.4) and tclsh8.4</seg><seg>libtcl8.4.so</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="tclsh8.4">
+<term><command>tclsh8.4</command></term>
+<listitem>
+<para>The Tcl command shell</para>
+<indexterm zone="ch-tools-tcl tclsh8.4"><primary sortas="b-tclsh8.4">tclsh8.4</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tclsh">
+<term><command>tclsh</command></term>
+<listitem>
+<para>A link to tclsh8.4</para>
+<indexterm zone="ch-tools-tcl tclsh"><primary sortas="b-tclsh">tclsh</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libtcl8.4.so">
+<term><filename class="libraryfile">libtcl8.4.so</filename></term>
+<listitem>
+<para>The Tcl library</para>
+<indexterm zone="ch-tools-tcl libtcl8.4.so"><primary sortas="c-libtcl8.4.so">libtcl8.4.so</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter05/texinfo.xml b/chapter05/texinfo.xml
index dce70c00b..3a7ddf4c6 100644
--- a/chapter05/texinfo.xml
+++ b/chapter05/texinfo.xml
@@ -7,7 +7,12 @@
<title>Texinfo-&texinfo-version;</title>
<?dbhtml filename="texinfo.html"?>
+<indexterm zone="ch-tools-texinfo">
+<primary sortas="a-Texinfo">Texinfo</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/texinfo.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,6 +20,8 @@
<seglistitem><seg>0.2 SBU</seg><seg>16 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/texinfo.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
@@ -28,8 +35,8 @@
<screen><userinput>make</userinput></screen>
-<para>To test the results, issue:
-<userinput>make check</userinput></para>
+<para>To test the results, issue: <userinput>make
+check</userinput>.</para>
<para>Install the package:</para>
@@ -37,4 +44,10 @@
</sect2>
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-texinfo" role="."/></para>
+</sect2>
+
</sect1>
+
diff --git a/chapter05/toolchaintechnotes.xml b/chapter05/toolchaintechnotes.xml
index afc621085..9c2951387 100644
--- a/chapter05/toolchaintechnotes.xml
+++ b/chapter05/toolchaintechnotes.xml
@@ -7,6 +7,218 @@
<title>Toolchain Technical Notes</title>
<?dbhtml filename="toolchaintechnotes.html"?>
-<para>See testing</para>
+<para>This section explains some of the rationale and technical
+details behind the overall build method. It is not essential to
+immediately understand everything in this section. Most of this
+information will be clearer after performing an actual build. This
+section can be referred back to at any time during the process.</para>
+
+<para>The overall goal of <xref linkend="chapter-temporary-tools"/> is
+to provide a temporary environment that can be chrooted into and from
+which can be produced a clean, trouble-free build of the target LFS
+system in <xref linkend="chapter-building-system"/>. Along the way, we
+separate from the host system as much as possible, and in doing so,
+build a self-contained and self-hosted toolchain. It should be noted
+that the build process has been designed to minimize the risks for new
+readers and provide maximum educational value at the same time. In
+other words, more advanced techniques could be used to build the
+system.</para>
+
+<important>
+<para>Before continuing, be aware of the name of the working platform,
+often referred to as the target triplet. Many times, the target
+triplet will probably be <emphasis>i686-pc-linux-gnu</emphasis>. A
+simple way to determine the name of the target triplet is to run the
+<command>config.guess</command> script that comes with the source for
+many packages. Unpack the Binutils sources and run the script:
+<userinput>./config.guess</userinput> and note the output.</para>
+
+<para>Also be aware of the name of the platform's dynamic linker,
+often referred to as the dynamic loader (not to be confused with the
+standard linker <command>ld</command> that is part of Binutils). The
+dynamic linker provided by Glibc finds and loads the shared libraries
+needed by a program, prepares the program to run, and then runs it.
+The name of the dynamic linker will usually be
+<filename class="libraryfile">ld-linux.so.2</filename>. On platforms that are less
+prevalent, the name might be <filename class="libraryfile">ld.so.1</filename>,
+and newer 64 bit platforms might be named something else entirely. The name of
+the platform's dynamic linker can be determined by looking in the
+<filename class="directory">/lib</filename> directory on the host
+system. A sure-fire way to determine the name is to inspect a random
+binary from the host system by running: <userinput>readelf -l &lt;name
+of binary&gt; | grep interpreter</userinput> and noting the output.
+The authoritative reference covering all platforms is in the
+<filename>shlib-versions</filename> file in the root of the Glibc
+source tree.</para>
+</important>
+
+<para>Some key technical points of how the <xref linkend="chapter-temporary-tools"/> build
+method works:</para>
+
+<itemizedlist>
+<listitem><para>The process is similar in principle to
+cross-compiling, whereby tools installed in the same prefix work in
+cooperation, and thus utilize a little GNU
+<quote>magic</quote></para></listitem>
+
+<listitem><para>Careful manipulation of the standard linker's library
+search path ensures programs are linked only against chosen
+libraries</para></listitem>
+
+<listitem><para>Careful manipulation of <command>gcc</command>'s
+<filename>specs</filename> file tell the compiler which target dynamic
+linker will be used</para></listitem>
+</itemizedlist>
+
+<para>Binutils is installed first because the
+<command>./configure</command> runs of both GCC and Glibc perform
+various feature tests on the assembler and linker to determine which
+software features to enable or disable. This is more important than
+one might first realize. An incorrectly configured GCC or Glibc can
+result in a subtly broken toolchain, where the impact of such breakage
+might not show up until near the end of the build of an entire
+distribution. A test suite failure will usually alert this error
+before too much additional work is performed.</para>
+
+<para>Binutils installs its assembler and linker in two locations,
+<filename class="directory">/tools/bin</filename> and <filename
+class="directory">/tools/$TARGET_TRIPLET/bin</filename>. The tools in
+one location are hard linked to the other. An important facet of the
+linker is its library search order. Detailed information can be
+obtained from <command>ld</command> by passing it the
+<parameter>--verbose</parameter> flag. For example, an <userinput>ld
+--verbose | grep SEARCH</userinput> will illustrate the current search
+paths and their order. It shows which files are linked by
+<command>ld</command> by compiling a dummy program and passing the
+<parameter>--verbose</parameter> switch to the linker. For example,
+<userinput>gcc dummy.c -Wl,--verbose 2&gt;&amp;1 | grep
+succeeded</userinput> will show all the files successfully opened
+during the linking.</para>
+
+<para>The next package installed is GCC. An example of what can be
+seen during its run of <command>./configure</command> is:</para>
+
+<screen><computeroutput>checking what assembler to use...
+ /tools/i686-pc-linux-gnu/bin/as
+checking what linker to use... /tools/i686-pc-linux-gnu/bin/ld</computeroutput></screen>
+
+<para>This is important for the reasons mentioned above. It also
+demonstrates that GCC's configure script does not search the PATH
+directories to find which tools to use. However, during the actual
+operation of <command>gcc</command> itself, the same
+search paths are not necessarily used. To find out which standard
+linker <command>gcc</command> will use, run: <userinput>gcc
+-print-prog-name=ld</userinput>.</para>
+
+<para>Detailed information can be obtained from <command>gcc</command>
+by passing it the <parameter>-v</parameter> command line option while
+compiling a dummy program. For example, <userinput>gcc -v
+dummy.c</userinput> will show detailed information about the
+preprocessor, compilation, and assembly stages, including
+<command>gcc</command>'s included search paths and their order.</para>
+
+<para>The next package installed is Glibc. The most important
+considerations for building Glibc are the compiler, binary tools, and
+kernel headers. The compiler is generally not an issue since Glibc
+will always use the <command>gcc</command> found in a
+<envar>PATH</envar> directory.
+The binary tools and kernel headers can be a bit more complicated.
+Therefore, take no risks and use the available configure switches to
+enforce the correct selections. After the run of
+<command>./configure</command>, check the contents of the
+<filename>config.make</filename> file in the <filename
+class="directory">glibc-build</filename> directory for all important
+details. Note the use of <parameter>CC="gcc -B/tools/bin/"</parameter>
+to control which binary tools are used and the use of the
+<parameter>-nostdinc</parameter> and <parameter>-isystem</parameter>
+flags to control the compiler's include search path. These items
+highlight an important aspect of the Glibc package&mdash;it is very
+self-sufficient in terms of its build machinery and generally does not
+rely on toolchain defaults.</para>
+
+<para>After the Glibc installation, make some adjustments to ensure
+that searching and linking take place only within the <filename
+class="directory">/tools</filename> prefix. Install an adjusted
+<command>ld</command>, which has a hard-wired search path limited to
+<filename class="directory">/tools/lib</filename>. Then amend
+<command>gcc</command>'s specs file to point to the new dynamic linker
+in <filename class="directory">/tools/lib</filename>. This last step
+is vital to the whole process. As mentioned above, a hard-wired path
+to a dynamic linker is embedded into every Executable and Link Format
+(ELF)-shared executable. This can be inspected by running:
+<userinput>readelf -l &lt;name of binary&gt; | grep
+interpreter</userinput>. Amending gcc's specs file
+ensures that every program compiled from here through the end of this
+chapter will use the new dynamic linker in <filename
+class="directory">/tools/lib</filename>.</para>
+
+<para>The need to use the new dynamic linker is also the reason why
+the Specs patch is applied for the second pass of GCC. Failure to do
+so will result in the GCC programs themselves having the name of the
+dynamic linker from the host system's <filename
+class="directory">/lib</filename> directory embedded into them, which
+would defeat the goal of getting away from the host.</para>
+
+<para>During the second pass of Binutils, we are able to utilize the
+<parameter>--with-lib-path</parameter> configure switch to control
+<command>ld</command>'s library search path. From this point onwards,
+the core toolchain is self-contained and self-hosted. The remainder of
+the <xref linkend="chapter-temporary-tools"/> packages all build
+against the new Glibc in <filename
+class="directory">/tools</filename>.</para>
+
+<para>Upon entering the chroot environment in <xref
+linkend="chapter-building-system"/>, the first major package to be
+installed is Glibc, due to its self-sufficient nature mentioned above.
+Once this Glibc is installed into <filename
+class="directory">/usr</filename>, perform a quick changeover of the
+toolchain defaults, then proceed in building the rest of the target
+LFS system.</para>
+
+<sect2>
+<title>Notes on Static Linking</title>
+
+<para>Besides their specific task, most programs have to perform many
+common and sometimes trivial operations. These include allocating
+memory, searching directories, reading and writing files, string
+handling, pattern matching, arithmetic, and other tasks. Instead of
+obliging each program to reinvent the wheel, the GNU system provides
+all these basic functions in ready-made libraries. The major library
+on any Linux system is Glibc.</para>
+
+<para>There are two primary ways of linking the functions from a
+library to a program that uses them&mdash;statically or dynamically. When
+a program is linked statically, the code of the used functions is
+included in the executable, resulting in a rather bulky program. When
+a program is dynamically linked, it includes a reference to the
+dynamic linker, the name of the library, and the name of the function,
+resulting in a much smaller executable. A third option is to use the
+programming interface of the dynamic linker (see the
+<emphasis>dlopen</emphasis> man page for more information).</para>
+
+<para>Dynamic linking is the default on Linux and has three major
+advantages over static linking. First, only one copy of the executable
+library code is needed on the hard disk, instead of having multiple
+copies of the same code included in several programs, thus saving
+disk space. Second, when several programs use the same library
+function at the same time, only one copy of the function's code is
+required in core, thus saving memory space. Third, when a library
+function gets a bug fixed or is otherwise improved, only the one
+library needs to be recompiled instead of recompiling all programs
+that make use of the improved function.</para>
+
+<para>If dynamic linking has several advantages, why then do we
+statically link the first two packages in this chapter? The reasons
+are threefold&mdash;historical, educational, and technical. The
+historical reason is that earlier versions of LFS statically linked
+every program in this chapter. Educationally, knowing the difference
+between static and dynamic linking is useful. The technical benefit is
+a gained element of independence from the host, meaning that those
+programs can be used independently of the host system. However, it is
+worth noting that an overall successful LFS build can still be
+achieved when the first two packages are built dynamically.</para>
+
+</sect2>
</sect1>
+
diff --git a/chapter05/udev.xml b/chapter05/udev.xml
deleted file mode 100644
index 0809dfd53..000000000
--- a/chapter05/udev.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
-]>
-<sect1 id="ch-tools-udev" role="wrap">
-<title>Udev-&udev-version;</title>
-<?dbhtml filename="udev.html"?>
-
-<sect2 role="package"><title/>
-
-<segmentedlist>
-<segtitle>&buildtime;</segtitle>
-<segtitle>&diskspace;</segtitle>
-<seglistitem><seg>0.2 SBU</seg><seg>5.2 MB</seg></seglistitem>
-</segmentedlist>
-
-</sect2>
-
-<sect2 role="installation">
-<title>Installation of Udev</title>
-
-<para>The following patch makes Udev respect the DESTDIR variable:</para>
-
-<screen><userinput>patch -Np1 -i ../udev-&udev-version;-DESTDIR-1.patch</userinput></screen>
-
-<para>Now compile Udev:</para>
-
-<screen><userinput>make prefix=/tools udevdir=/dev</userinput></screen>
-
-<para>Install the package:</para>
-
-<screen><userinput>make DESTDIR=/tools udevdir=/dev install</userinput></screen>
-
-<screen><userinput>cp ../udev-config-2.permissions /tools/etc/udev/permissions.d/00-lfs.permissions
-cp ../udev-config-1.rules /tools/etc/udev/rules.d/00-lfs.rules</userinput></screen>
-
-</sect2>
-
-</sect1>
diff --git a/chapter05/util-linux.xml b/chapter05/util-linux.xml
index 4349f326f..1c0ae3c19 100644
--- a/chapter05/util-linux.xml
+++ b/chapter05/util-linux.xml
@@ -7,7 +7,12 @@
<title>Util-linux-&util-linux-version;</title>
<?dbhtml filename="util-linux.html"?>
+<indexterm zone="ch-tools-util-linux">
+<primary sortas="a-Util-linux">Util-linux</primary>
+<secondary>tools</secondary></indexterm>
+
<sect2 role="package"><title/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/util-linux.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -15,12 +20,16 @@
<seglistitem><seg>0.2 SBU</seg><seg>16 MB</seg></seglistitem>
</segmentedlist>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../chapter06/util-linux.xml" xpointer="xpointer(/sect1/sect2[1]/segmentedlist[2])"/>
+
</sect2>
<sect2 role="installation">
<title>Installation of Util-linux</title>
-<para>Issue a sed sustitution:</para>
+<para>Util-linux does not use the freshly installed headers and
+libraries from the <filename class="directory">/tools</filename>
+directory. This is fixed by altering the configure script:</para>
<screen><userinput>sed -i 's@/usr/include@/tools/include@g' configure</userinput></screen>
@@ -32,14 +41,23 @@
<screen><userinput>make -C lib</userinput></screen>
-<para>Build the needed utilities:</para>
+<para>Since only a couple of the utilities contained in this package
+are needed, build only those:</para>
<screen><userinput>make -C mount mount umount
make -C text-utils more</userinput></screen>
-<para>Now copy these programs to the temporary tools directory:</para>
+<para>This package does not come with a test suite.</para>
+
+<para>Copy these programs to the temporary tools directory:</para>
<screen><userinput>cp mount/{,u}mount text-utils/more /tools/bin</userinput></screen>
</sect2>
+
+<sect2 role="content"><title/>
+<para>Details on this package are located in <xref
+linkend="contents-utillinux" role="."/></para>
+</sect2>
</sect1>
+
diff --git a/chapter06/aboutdebug.xml b/chapter06/aboutdebug.xml
index f0ac8956f..7ef47d71c 100644
--- a/chapter06/aboutdebug.xml
+++ b/chapter06/aboutdebug.xml
@@ -7,6 +7,45 @@
<title>About Debugging Symbols</title>
<?dbhtml filename="aboutdebug.html"?>
-<para>See testing</para>
+<para>Most programs and libraries are, by default, compiled with
+debugging symbols included (with <command>gcc</command>'s
+<parameter>-g</parameter> option). This means that when debugging a
+program or library that was compiled with debugging information
+included, the debugger can provide not only memory addresses, but also
+the names of the routines and variables.</para>
+
+<para>However, the inclusion of these debugging symbols enlarges a
+program or library significantly. The following is an example of the
+amount of space these symbols occupy:</para>
+
+<itemizedlist>
+
+<listitem><para>a bash binary
+with debugging symbols: 1200 KB</para></listitem>
+
+<listitem><para>a bash binary
+without debugging symbols: 480 KB</para></listitem>
+
+<listitem><para>Glibc and GCC files (<filename class="directory">/lib</filename>
+and <filename class="directory">/usr/lib</filename>)
+with debugging symbols: 87 MB</para></listitem>
+
+<listitem><para>Glibc and GCC files
+without debugging symbols: 16 MB</para></listitem>
+
+</itemizedlist>
+
+<para>Sizes may vary depending on which compiler and C
+library were used, but when comparing programs with and without debugging
+symbols, the difference will usually be a factor between two and
+five.</para>
+
+<para>Because most users will never use a debugger on their system
+software, a lot of disk space can be regained by removing these
+symbols. The next section shows how to strip all debugging symbols
+from the programs and libraries. Additional information on system
+optimization can be found at <ulink url="&hints-root;optimization.txt"><phrase
+condition="pdf">&hints-root; optimization.txt</phrase></ulink>.</para>
</sect1>
+
diff --git a/chapter06/autoconf.xml b/chapter06/autoconf.xml
index ad766f602..790d1408b 100644
--- a/chapter06/autoconf.xml
+++ b/chapter06/autoconf.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-autoconf" xreflabel="Autoconf" role="wrap">
+<sect1 id="ch-system-autoconf" role="wrap">
<title>Autoconf-&autoconf-version;</title>
<?dbhtml filename="autoconf.html"?>
<indexterm zone="ch-system-autoconf"><primary sortas="a-Autoconf">Autoconf</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Autoconf package contains programs for producing shell scripts that
+can automatically configure source code.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +19,11 @@
<seglistitem><seg>0.5 SBU</seg><seg>7.7 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Autoconf installation depends on</segtitle>
+<seglistitem><seg>Bash, Coreutils, Diffutils, Grep,
+M4, Make, Perl, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -31,7 +38,7 @@
<screen><userinput>make</userinput></screen>
<para>To test the results, issue:
-<userinput>make check</userinput></para>
+<userinput>make check</userinput>. This takes a long time, about 2 SBUs.</para>
<para>Install the package:</para>
@@ -39,11 +46,97 @@
</sect2>
-
<sect2 id="contents-autoconf" role="content"><title>Contents of Autoconf</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>autoconf, autoheader, autom4te,
+autoreconf, autoscan, autoupdate, and ifnames</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="autoconf">
+<term><command>autoconf</command></term>
+<listitem>
+<para>Produces shell scripts that automatically
+configure software source code packages to adapt to many kinds of
+Unix-like systems. The configuration scripts it produces are
+independent&mdash;running them does not require the <command>autoconf</command> program.</para>
+<indexterm zone="ch-system-autoconf autoconf"><primary sortas="b-autoconf">autoconf</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="autoheader">
+<term><command>autoheader</command> </term>
+<listitem>
+<para>A tool for creating template files of C
+<emphasis>#define</emphasis> statements for configure to use</para>
+<indexterm zone="ch-system-autoconf autoheader"><primary sortas="b-autoheader">autoheader</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="autom4te">
+<term><command>autom4te</command></term>
+<listitem>
+<para>A wrapper for the M4 macro processor</para>
+<indexterm zone="ch-system-autoconf autom4te"><primary sortas="b-autom4te">autom4te</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="autoreconf">
+<term><command>autoreconf</command></term>
+<listitem>
+<para>Automatically runs <command>autoconf</command>,
+<command>autoheader</command>, <command>aclocal</command>,
+<command>automake</command>, <command>gettextize</command>, and
+<command>libtoolize</command> in the correct order to save time
+when changes are made to <command>autoconf</command> and
+<command>automake</command> template files</para>
+<indexterm zone="ch-system-autoconf autoreconf"><primary sortas="b-autoreconf">autoreconf</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="autoscan">
+<term><command>autoscan</command> </term>
+<listitem>
+<para>Helps to create a <filename>configure.in</filename> file for a
+software package; it examines the source files in a directory tree,
+searching them for common portability issues, and creates a
+<filename>configure.scan</filename> file that serves as as a
+preliminary <filename>configure.in</filename> file for the
+package</para>
+<indexterm zone="ch-system-autoconf autoscan"><primary sortas="b-autoscan">autoscan</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="autoupdate">
+<term><command>autoupdate</command></term>
+<listitem>
+<para>Modifies a <filename>configure.in</filename> file that still
+calls <command>autoconf</command> macros by their old names to use the
+current macro names</para>
+<indexterm zone="ch-system-autoconf autoupdate"><primary sortas="b-autoupdate">autoupdate</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ifnames">
+<term><command>ifnames</command> </term>
+<listitem>
+<para>Helps when writing <filename>configure.in</filename> files
+for a software package; it prints the identifiers that the package
+uses in C preprocessor conditionals. If a package has already been set
+up to have some portability, this program can help determine what
+<command>configure</command> needs to check for. It can also fill in
+gaps in a <filename>configure.in</filename> file generated by
+<command>autoscan</command></para>
+<indexterm zone="ch-system-autoconf ifnames"><primary sortas="b-ifnames">ifnames</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/automake.xml b/chapter06/automake.xml
index ae50cd74b..ebf4ad482 100644
--- a/chapter06/automake.xml
+++ b/chapter06/automake.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-automake" xreflabel="Automake" role="wrap">
+<sect1 id="ch-system-automake" role="wrap">
<title>Automake-&automake-version;</title>
<?dbhtml filename="automake.html"?>
<indexterm zone="ch-system-automake"><primary sortas="a-Automake">Automake</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Automake package contains programs for generating Makefiles for use
+with Autoconf.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +19,11 @@
<seglistitem><seg>0.2 SBU</seg><seg>6.8 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Automake installation depends on</segtitle>
+<seglistitem><seg>Autoconf, Bash, Coreutils,
+Diffutils, Grep, M4, Make, Perl, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -31,7 +38,7 @@
<screen><userinput>make</userinput></screen>
<para>To test the results, issue:
-<userinput>make check</userinput></para>
+<userinput>make check</userinput>. This takes a long time, about 5 SBUs.</para>
<para>Install the package:</para>
@@ -42,8 +49,168 @@
<sect2 id="contents-automake" role="content"><title>Contents of Automake</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>acinstall, aclocal, aclocal-&automake-version;,
+automake, automake-&automake-version;,
+compile, config.guess, config.sub, depcomp, elisp-comp, install-sh, mdate-sh,
+missing, mkinstalldirs, py-compile, symlink-tree, and ylwrap</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="acinstall">
+<term><command>acinstall</command></term>
+<listitem>
+<para>A script that installs aclocal-style M4 files</para>
+<indexterm zone="ch-system-automake acinstall"><primary sortas="b-acinstall">acinstall</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="aclocal">
+<term><command>aclocal</command></term>
+<listitem>
+<para>Generates <filename>aclocal.m4</filename>
+files based on the contents of <filename>configure.in</filename> files</para>
+<indexterm zone="ch-system-automake aclocal"><primary sortas="b-aclocal">aclocal</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="aclocal-version">
+<term><command>aclocal-&automake-version;</command></term>
+<listitem>
+<para>A hard link to <command>aclocal</command></para>
+<indexterm zone="ch-system-automake aclocal-version"><primary
+sortas="b-aclocal-&automake-version;">aclocal-&automake-version;</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="automake">
+<term><command>automake</command></term>
+<listitem>
+<para>A tool for automatically generating
+<filename>Makefile.in</filename> files from
+<filename>Makefile.am</filename> files. To create all the
+<filename>Makefile.in</filename> files for a package, run this program
+in the top-level directory. By scanning the
+<filename>configure.in</filename> file, it automatically finds each
+appropriate <filename>Makefile.am</filename> file and generate the
+corresponding <filename>Makefile.in</filename> file</para>
+<indexterm zone="ch-system-automake automake"><primary sortas="b-automake">automake</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="automake-version">
+<term><command>automake-&automake-version;</command></term>
+<listitem>
+<para>A hard link to <command>automake</command></para>
+<indexterm zone="ch-system-automake automake-version"><primary
+sortas="b-automake-&automake-version;">automake-&automake-version;</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="compile">
+<term><command>compile</command></term>
+<listitem>
+<para>A wrapper for compilers</para>
+<indexterm zone="ch-system-automake compile"><primary sortas="b-compile">compile</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="config.guess">
+<term><command>config.guess</command></term>
+<listitem>
+<para>A script that attempts to guess
+the canonical triplet for the given build, host, or target architecture</para>
+<indexterm zone="ch-system-automake config.guess"><primary sortas="b-config.guess">config.guess</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="config.sub">
+<term><command>config.sub</command></term>
+<listitem>
+<para>A configuration validation subroutine script</para>
+<indexterm zone="ch-system-automake config.sub"><primary sortas="b-config.sub">config.sub</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="depcomp">
+<term><command>depcomp</command></term>
+<listitem>
+<para>A script for compiling a program so that dependency information
+is generated in addition to the desired output</para>
+<indexterm zone="ch-system-automake depcomp"><primary sortas="b-depcomp">depcomp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="elisp-comp">
+<term><command>elisp-comp</command></term>
+<listitem>
+<para>Byte-compiles Emacs Lisp code</para>
+<indexterm zone="ch-system-automake elisp-comp"><primary sortas="b-elisp-comp">elisp-comp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="install-sh">
+<term><command>install-sh</command></term>
+<listitem>
+<para>A script that installs a program, script, or data file</para>
+<indexterm zone="ch-system-automake install-sh"><primary sortas="b-install-sh">install-sh</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mdate-sh">
+<term><command>mdate-sh</command></term>
+<listitem>
+<para>A script that prints the modification time of a file or directory</para>
+<indexterm zone="ch-system-automake mdate-sh"><primary sortas="b-mdate-sh">mdate-sh</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="missing">
+<term><command>missing</command></term>
+<listitem>
+<para>A script acting as a common stub for missing GNU programs during
+an installation</para>
+<indexterm zone="ch-system-automake missing"><primary sortas="b-missing">missing</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mkinstalldirs">
+<term><command>mkinstalldirs</command></term>
+<listitem>
+<para>A script that creates a directory tree</para>
+<indexterm zone="ch-system-automake mkinstalldirs"><primary sortas="b-mkinstalldirs">mkinstalldirs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="py-compile">
+<term><command>py-compile</command></term>
+<listitem>
+<para>Compiles a Python program</para>
+<indexterm zone="ch-system-automake py-compile"><primary sortas="b-py-compile">py-compile</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="symlink-tree">
+<term><command>symlink-tree</command></term>
+<listitem>
+<para>A script to create a symlink tree of a directory tree</para>
+<indexterm zone="ch-system-automake symlink-tree"><primary sortas="b-symlink-tree">symlink-tree</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ylwrap">
+<term><command>ylwrap</command></term>
+<listitem>
+<para>A wrapper for <command>lex</command> and <command>yacc</command></para>
+<indexterm zone="ch-system-automake ylwrap"><primary sortas="b-ylwrap">ylwrap</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/bash.xml b/chapter06/bash.xml
index 8803aad6a..b7c459f1e 100644
--- a/chapter06/bash.xml
+++ b/chapter06/bash.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-bash" xreflabel="Bash" role="wrap">
+<sect1 id="ch-system-bash" role="wrap">
<title>Bash-&bash-version;</title>
<?dbhtml filename="bash.html"?>
<indexterm zone="ch-system-bash"><primary sortas="a-Bash">Bash</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Bash package contains the Bourne-Again SHell.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,16 +18,24 @@
<seglistitem><seg>1.2 SBU</seg><seg>27 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Bash installation depends on</segtitle>
+<seglistitem><seg>Binutils, Coreutils, Diffutils, Gawk,
+GCC, Glibc, Grep, Make, Ncurses, and Sed.</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Bash</title>
-<para>Apply a patch:</para>
+<!-- Edit Me -->
+<para>The following patch fixes various issues, including a problem where Bash
+will sometimes only show 33 characters on a line, then wrap to the next:</para>
<screen><userinput>patch -Np1 -i ../bash-&bash-version;-fixes-1.patch</userinput></screen>
-<para>Apply another patch:</para>
+<para>Bash also has issues when compiled against newer versions of Glibc. The
+following patch resolves this problem:</para>
<screen><userinput>patch -Np1 -i ../bash-&bash-version;-avoid_WCONTINUED-1.patch</userinput></screen>
@@ -35,6 +44,17 @@
<screen><userinput>./configure --prefix=/usr --bindir=/bin \
--without-bash-malloc --with-installed-readline</userinput></screen>
+<para>The meaning of the configure option:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--with-installed-readline</parameter></term>
+<listitem><para>This options tells Bash to use the
+<filename class="libraryfile">readline</filename> library that is already installed
+on the system rather than using its own readline version.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
@@ -46,17 +66,60 @@
<screen><userinput>make install</userinput></screen>
-<para>Run the newly compiled <command>bash</command> program:</para>
+<para>Run the newly compiled <command>bash</command> program (replacing the one that is
+currently being executed):</para>
<screen><userinput>exec /bin/bash --login +h</userinput></screen>
+<note><para>The parameters used make the <command>bash</command>
+process an interactive login shell and continue to disable hashing so
+that new programs are found as they become available.</para></note>
+
</sect2>
<sect2 id="contents-bash" role="content"><title>Contents of Bash</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>bash, bashbug, and sh (link to bash)</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="bash">
+<term><command>bash</command></term>
+<listitem>
+<para>A widely-used command interpreter; it performs many types of
+expansions and substitutions on a given command line before executing
+it, thus making this interpreter a powerful tool</para>
+<indexterm zone="ch-system-bash bash"><primary sortas="b-bash">bash</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="bashbug">
+<term><command>bashbug</command></term>
+<listitem>
+<para>A shell script to help the user compose and mail bug reports
+concerning <command>bash</command> in a standard format</para>
+<indexterm zone="ch-system-bash bashbug"><primary sortas="b-bashbug">bashbug</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="sh">
+<term><command>sh</command></term>
+<listitem>
+<para>A symlink to the <command>bash</command> program; when invoked
+as <command>sh</command>, <command>bash</command> tries to mimic the
+startup behavior of historical versions of <command>sh</command> as
+closely as possible, while conforming to the POSIX standard as well</para>
+<indexterm zone="ch-system-bash sh"><primary sortas="b-sh">sh</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/binutils.xml b/chapter06/binutils.xml
index f749f0864..c3032612a 100644
--- a/chapter06/binutils.xml
+++ b/chapter06/binutils.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-binutils" xreflabel="Binutils" role="wrap">
+<sect1 id="ch-system-binutils" role="wrap">
<title>Binutils-&binutils-version;</title>
<?dbhtml filename="binutils.html"?>
<indexterm zone="ch-system-binutils"><primary sortas="a-Binutils">Binutils</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Binutils package contains a linker, an assembler, and other tools for
+handling object files.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,21 +19,45 @@
<seglistitem><seg>1.4 SBU</seg><seg>167 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Binutils installation depends on</segtitle>
+<seglistitem><seg>Bash, Bison, Coreutils, Diffutils, Flex, GCC, Gettext,
+Glibc, Grep, M4, Make, Perl, Sed, and Texinfo</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Binutils</title>
-<para>Check if there is PTYs for the test suites:</para>
+<para>This package is known to have issues when its default
+optimization flags (including the <parameter>-march</parameter> and
+<parameter>-mcpu</parameter> options) are changed. If any environment
+variables that override default optimizations have been defined, such
+as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
+unset them when building Binutils.</para>
+
+<para>Verify that the PTYs are working properly inside the chroot
+environment. Check that everything is set up correctly by performing a
+simple test:</para>
<screen><userinput>expect -c "spawn ls"</userinput></screen>
-<para>Create the build directory:</para>
+<para>If the following message shows up, the chroot environment is not
+set up for proper PTY operation:</para>
+
+<screen><computeroutput>The system has no more ptys.
+Ask your system administrator to create more.</computeroutput></screen>
+
+<para>This issue needs to be resolved before running the test suites
+for Binutils and GCC.</para>
+
+<para>The Binutils documentation recommends building Binutils outside of the
+source directory in a dedicated build directory:</para>
<screen><userinput>mkdir ../binutils-build
cd ../binutils-build</userinput></screen>
-<para>Now prepare Binutils for compilation:</para>
+<para>Prepare Binutils for compilation:</para>
<screen><userinput>../binutils-&binutils-version;/configure --prefix=/usr \
--enable-shared</userinput></screen>
@@ -40,19 +66,33 @@ cd ../binutils-build</userinput></screen>
<screen><userinput>make tooldir=/usr</userinput></screen>
-<para>Test the results:</para>
+<para>Normally, the tooldir (the directory where the executables will
+ultimately be located) is set to <filename
+class="directory">$(exec_prefix)/$(target_alias)</filename>, which
+expands into <phrase condition="html"><filename
+class="directory">/usr/i686-pc-linux-gnu</filename></phrase><phrase
+condition="pdf"><filename class="directory">/usr/i686-pc-
+linux-gnu</filename></phrase>. Because this is a custom system, this
+target-specific directory in <filename
+class="directory">/usr</filename> is not required. This setup would be
+used if the system was used to cross-compile (for example, compiling a
+package on an Intel machine that generates code that can be executed
+on PowerPC machines).</para>
-<!--NEW-->
-<screen><userinput>make -k check</userinput></screen>
+<important><para>The test suite for Binutils in this section is
+considered critical. Do not skip it under any
+circumstances.</para></important>
-<para>The test suite notes from <xref linkend="ch-tools-binutils-pass2"/> are still
-very much appropriate here..</para>
+<para>Test the results:</para>
+
+<screen><userinput>make check</userinput></screen>
<para>Install the package:</para>
<screen><userinput>make tooldir=/usr install</userinput></screen>
-<para>Install the <filename class="headerfile">libiberty</filename> header file:</para>
+<para>Install the <filename class="headerfile">libiberty</filename> header file that is needed by
+some packages:</para>
<screen><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen>
@@ -61,8 +101,176 @@ very much appropriate here..</para>
<sect2 id="contents-binutils" role="content"><title>Contents of Binutils</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed libraries</segtitle>
+<seglistitem><seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump,
+ranlib, readelf, size, strings, and strip</seg>
+<seg>libiberty.a, libbfd.[a,so], and libopcodes.[a,so]</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="addr2line">
+<term><command>addr2line</command></term>
+<listitem>
+<para>Translates program addresses to file names and line numbers;
+given an address and the name of an executable, it uses the debugging
+information in the executable to determine which source file and line
+number are associated with the address</para>
+<indexterm zone="ch-system-binutils addr2line"><primary sortas="b-addr2line">addr2line</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ar">
+<term><command>ar</command></term>
+<listitem>
+<para>Creates, modifies, and extracts from archives</para>
+<indexterm zone="ch-system-binutils ar"><primary sortas="b-ar">ar</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="as">
+<term><command>as</command></term>
+<listitem>
+<para>An assembler that assembles the output of <command>gcc</command>
+into object files</para>
+<indexterm zone="ch-system-binutils as"><primary sortas="b-as">as</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="c-filt">
+<term><command>c++filt</command></term>
+<listitem>
+<para>Used by the linker to de-mangle C++ and Java symbols and to keep
+overloaded functions from clashing</para>
+<indexterm zone="ch-system-binutils c-filt"><primary sortas="b-c++filt">c++filt</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="gprof">
+<term><command>gprof</command></term>
+<listitem>
+<para>Displays call graph profile data</para>
+<indexterm zone="ch-system-binutils gprof"><primary sortas="b-gprof">gprof</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ld">
+<term><command>ld</command></term>
+<listitem>
+<para>A linker that combines a number of object and archive files into a single file,
+relocating their data and tying up symbol references</para>
+<indexterm zone="ch-system-binutils ld"><primary sortas="b-ld">ld</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="nm">
+<term><command>nm</command></term>
+<listitem>
+<para>Lists the symbols occurring in a given object file</para>
+<indexterm zone="ch-system-binutils nm"><primary sortas="b-nm">nm</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="objcopy">
+<term><command>objcopy</command></term>
+<listitem>
+<para>Translates one type of object file into another</para>
+<indexterm zone="ch-system-binutils objcopy"><primary sortas="b-objcopy">objcopy</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="objdump">
+<term><command>objdump</command></term>
+<listitem>
+<para>Displays information about the given object file, with options
+controlling the particular information to display; the information
+shown is useful to programmers who are working on the compilation
+tools</para>
+<indexterm zone="ch-system-binutils objdump"><primary sortas="b-objdump">objdump</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ranlib">
+<term><command>ranlib</command></term>
+<listitem>
+<para>Generates an index of the contents of an archive and stores it
+in the archive; the index lists all of the symbols defined by archive
+members that are relocatable object files</para>
+<indexterm zone="ch-system-binutils ranlib"><primary sortas="b-ranlib">ranlib</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="readelf">
+<term><command>readelf</command></term>
+<listitem>
+<para>Displays information about ELF type binaries</para>
+<indexterm zone="ch-system-binutils readelf"><primary sortas="b-readelf">readelf</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="size">
+<term><command>size</command></term>
+<listitem>
+<para>Lists the section sizes and the total size for the given object files</para>
+<indexterm zone="ch-system-binutils size"><primary sortas="b-size">size</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="strings">
+<term><command>strings</command></term>
+<listitem>
+<para>Outputs, for each given file, the sequences of printable
+characters that are of at least the specified length (defaulting to
+four); for object files, it prints, by default, only the strings from
+the initializing and loading sections while for other types of files, it
+scans the entire file</para>
+<indexterm zone="ch-system-binutils strings"><primary sortas="b-strings">strings</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="strip">
+<term><command>strip</command></term>
+<listitem>
+<para>Discards symbols from object files</para>
+<indexterm zone="ch-system-binutils strip"><primary sortas="b-strip">strip</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libiberty">
+<term><filename class="libraryfile">libiberty</filename></term>
+<listitem>
+<para>Contains routines used by various GNU programs, including
+<command>getopt</command>, <command>obstack</command>,
+<command>strerror</command>, <command>strtol</command>, and
+<command>strtoul</command></para>
+<indexterm zone="ch-system-binutils libiberty"><primary sortas="c-libiberty">libiberty</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libbfd">
+<term><filename class="libraryfile">libbfd</filename></term>
+<listitem>
+<para>The Binary File Descriptor library</para>
+<indexterm zone="ch-system-binutils libbfd"><primary sortas="c-libbfd">libbfd</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libopcodes">
+<term><filename class="libraryfile">libopcodes</filename></term>
+<listitem>
+<para>A library for dealing with opcodes&mdash;the <quote>readable
+text</quote> versions of instructions for the processor;
+it is used for building utilities like
+<command>objdump</command>.</para>
+<indexterm zone="ch-system-binutils libopcodes"><primary sortas="c-libopcodes">libopcodes</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/bison.xml b/chapter06/bison.xml
index ad2b668bc..8626349bf 100644
--- a/chapter06/bison.xml
+++ b/chapter06/bison.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-bison" xreflabel="Bison" role="wrap">
+<sect1 id="ch-system-bison" role="wrap">
<title>Bison-&bison-version;</title>
<?dbhtml filename="bison.html"?>
<indexterm zone="ch-system-bison"><primary sortas="a-Bison">Bison</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Bison package contains a parser generator.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +18,11 @@
<seglistitem><seg>0.6 SBU</seg><seg>10.6 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Bison installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Gettext, Glibc, Grep, M4, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -33,17 +39,57 @@
<para>To test the results, issue:
<userinput>make check</userinput>.</para>
-<para>Now install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
</sect2>
-
<sect2 id="contents-bison" role="content"><title>Contents of Bison</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed library</segtitle>
+<seglistitem><seg>bison and yacc</seg><seg>liby.a</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="bison">
+<term><command>bison</command></term>
+<listitem>
+<para>generates, from a series of rules, a program for analyzing the
+structure of text files; <application>Bison</application> is a
+replacement for <application>Yacc</application> (Yet Another Compiler
+Compiler)</para>
+<indexterm zone="ch-system-bison bison"><primary sortas="b-bison">bison</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="yacc">
+<term><command>yacc</command></term>
+<listitem>
+<para>a wrapper for <command>bison</command>, meant for programs
+that still call <command>yacc</command> instead of <command>bison</command>;
+it calls <command>bison</command> with the <parameter>-y</parameter> option</para>
+<indexterm zone="ch-system-bison yacc"><primary sortas="b-yacc">yacc</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="liby.a">
+<term><filename class="libraryfile">liby.a</filename></term>
+<listitem>
+<para>the Yacc library containing implementations of Yacc-compatible
+<emphasis>yyerror</emphasis> and <emphasis>main</emphasis> functions;
+this library is normally not very useful, but POSIX requires
+it</para>
+<indexterm zone="ch-system-bison liby.a"><primary sortas="c-liby.a">liby.a</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/bzip2.xml b/chapter06/bzip2.xml
index 2751da0dd..24f83aab9 100644
--- a/chapter06/bzip2.xml
+++ b/chapter06/bzip2.xml
@@ -3,13 +3,16 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-bzip2" xreflabel="Bzip2" role="wrap">
+<sect1 id="ch-system-bzip2" role="wrap">
<title>Bzip2-&bzip2-version;</title>
<?dbhtml filename="bzip2.html"?>
<indexterm zone="ch-system-bzip2"><primary sortas="a-Bzip2">Bzip2</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Bzip2 package contains programs for compressing and decompressing
+files. Text files yield a much better compression than with the
+traditional <command>gzip</command>.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +20,11 @@
<seglistitem><seg>0.1 SBU</seg><seg>3.0 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Bzip2 installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Glibc, and Make</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -27,15 +35,27 @@
<screen><userinput>make -f Makefile-libbz2_so
make clean</userinput></screen>
+<para>The <parameter>-f</parameter> flag will cause Bzip2 to be built
+using a different <filename>Makefile</filename> file, in this case the
+<filename>Makefile-libbz2_so</filename> file, which creates a dynamic
+<filename class="libraryfile">libbz2.so</filename> library and links the Bzip2
+utilities against it.</para>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>Install the package:</para>
+<para>If reinstalling Bzip2, perform
+<userinput>rm -f /usr/bin/bz*</userinput> first, otherwise the following
+<command>make install</command> will fail.</para>
+
+<para>Install the programs:</para>
<screen><userinput>make install</userinput></screen>
-<para>Do some location changes:</para>
+<para>Install the shared <command>bzip2</command> binary into the
+<filename class="directory">/bin</filename> directory, make
+some necessary symbolic links, and clean up:</para>
<screen><userinput>cp bzip2-shared /bin/bzip2
cp -a libbz2.so* /lib
@@ -49,8 +69,120 @@ ln -s bzip2 /bin/bzcat</userinput></screen>
<sect2 id="contents-bzip2" role="content"><title>Contents of Bzip2</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed libraries</segtitle>
+<seglistitem><seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp, bzdiff,
+bzegrep, bzfgrep, bzgrep, bzip2, bzip2recover, bzless, and bzmore</seg>
+<seg>libbz2.a, libbz2.so (link to libbz2.so.1.0), libbz2.so.1.0 (link to
+libbz2.so.&bzip2-version;), and libbz2.so.&bzip2-version;</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="bunzip2">
+<term><command>bunzip2</command></term>
+<listitem>
+<para>Decompresses bzipped files</para>
+<indexterm zone="ch-system-bzip2 bunzip2"><primary sortas="b-bunzip2">bunzip2</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="bzcat">
+<term><command>bzcat</command></term>
+<listitem>
+<para>Decompresses to standard output</para>
+<indexterm zone="ch-system-bzip2 bzcat"><primary sortas="b-bzcat">bzcat</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="bzcmp">
+<term><command>bzcmp</command></term>
+<listitem>
+<para>Runs <command>cmp</command> on bzipped files</para>
+<indexterm zone="ch-system-bzip2 bzcmp"><primary sortas="b-bzcmp">bzcmp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="bzdiff">
+<term><command>bzdiff</command></term>
+<listitem>
+<para>Runs <command>diff</command> on bzipped files</para>
+<indexterm zone="ch-system-bzip2 bzdiff"><primary sortas="b-bzdiff">bzdiff</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="bzgrep">
+<term><command>bzgrep</command></term>
+<listitem>
+<para>Runs <command>grep</command> on bzipped files</para>
+<indexterm zone="ch-system-bzip2 bzgrep"><primary sortas="b-bzgrep">bzgrep</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="bzegrep">
+<term><command>bzegrep</command></term>
+<listitem>
+<para>Runs <command>egrep</command> on bzipped files</para>
+<indexterm zone="ch-system-bzip2 bzegrep"><primary sortas="b-bzegrep">bzegrep</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="bzfgrep">
+<term><command>bzfgrep</command></term>
+<listitem>
+<para>Runs <command>fgrep</command> on bzipped files</para>
+<indexterm zone="ch-system-bzip2 bzfgrep"><primary sortas="b-bzfgrep">bzfgrep</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="bzip2">
+<term><command>bzip2</command></term>
+<listitem>
+<para>Compresses files using the Burrows-Wheeler block sorting text
+compression algorithm with Huffman coding; the compression rate is
+better than that achieved by more conventional compressors using
+<quote>Lempel-Ziv</quote> algorithms, like <command>gzip</command></para>
+<indexterm zone="ch-system-bzip2 bzip2"><primary sortas="b-bzip2">bzip2</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="bzip2recover">
+<term><command>bzip2recover</command></term>
+<listitem>
+<para>Tries to recover data from damaged bzipped files</para>
+<indexterm zone="ch-system-bzip2 bzip2recover"><primary sortas="b-bzip2recover">bzip2recover</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="bzless">
+<term><command>bzless</command></term>
+<listitem>
+<para>Runs <command>less</command> on bzipped files</para>
+<indexterm zone="ch-system-bzip2 bzless"><primary sortas="b-bzless">bzless</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="bzmore">
+<term><command>bzmore</command></term>
+<listitem>
+<para>Runs <command>more</command> on bzipped files</para>
+<indexterm zone="ch-system-bzip2 bzmore"><primary sortas="b-bzmore">bzmore</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libbz2">
+<term><filename class="libraryfile">libbz2*</filename></term>
+<listitem>
+<para>The library implementing lossless, block-sorting data
+compression, using the Burrows-Wheeler algorithm</para>
+<indexterm zone="ch-system-bzip2 libbz2"><primary sortas="c-libbz2*">libbz2*</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/changingowner.xml b/chapter06/changingowner.xml
index 9d53404f6..a22e199c5 100644
--- a/chapter06/changingowner.xml
+++ b/chapter06/changingowner.xml
@@ -7,8 +7,34 @@
<title>Changing Ownership</title>
<?dbhtml filename="changingowner.html"?>
-<para>Change the owner of <filename class="directory">/tools</filename>:</para>
+<para>Currently, the <filename class="directory">/tools</filename>
+directory is owned by the user <emphasis>lfs</emphasis>, a user that
+exists only on the host system. Although the <filename
+class="directory">/tools</filename> directory can be deleted once the
+LFS system has been finished, it can be retained to build additional
+LFS systems. If the <filename class="directory">/tools</filename>
+directory is kept as is, the files are owned by a user ID without a
+corresponding account. This is dangerous because a user account
+created later could get this same user ID and would own the <filename
+class="directory">/tools</filename> directory and all the files
+therein, thus exposing these files to possible malicious
+manipulation.</para>
+
+<para>To avoid this issue, add the <emphasis>lfs</emphasis> user to
+the new LFS system later when creating the
+<filename>/etc/passwd</filename> file, taking care to assign it the
+same user and group IDs as on the host system. Alternatively, assign
+the contents of the <filename class="directory">/tools</filename>
+directory to user <emphasis>root</emphasis> by running the following
+command:</para>
<screen><userinput>chown -R 0:0 /tools</userinput></screen>
+<para>The command uses <parameter>0:0</parameter> instead of
+<parameter>root:root</parameter>, because <command>chown</command>
+is unable to resolve the name <quote>root</quote> until the password
+file has been created. This book assumes you ran this
+<command>chown</command> command.</para>
+
</sect1>
+
diff --git a/chapter06/chroot.xml b/chapter06/chroot.xml
index 9ef1cca3e..c9afcdc13 100644
--- a/chapter06/chroot.xml
+++ b/chapter06/chroot.xml
@@ -7,11 +7,55 @@
<title>Entering the Chroot Environment</title>
<?dbhtml filename="chroot.html"?>
-<para>Enter the chroot environment:</para>
+<para>It is time to enter the chroot environment to begin
+building and installing the final LFS system. As user
+<emphasis>root</emphasis>, run the following command to enter the
+realm that is, at the moment, populated with only the temporary
+tools:</para>
<screen><userinput>chroot "$LFS" /tools/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
/tools/bin/bash --login +h</userinput></screen>
+<para>The <parameter>-i</parameter> option given to the
+<command>env</command> command will clear all variables of the chroot
+environment. After that, only the <envar>HOME</envar>,
+<envar>TERM</envar>, <envar>PS1</envar>, and
+<envar>PATH</envar> variables are set again. The
+<parameter>TERM=$TERM</parameter> construct will set the
+<envar>TERM</envar> variable inside chroot to the same value as
+outside chroot. This variable is needed for programs like
+<command>vim</command> and <command>less</command> to operate
+properly. If other variables are needed, such as
+<envar>CFLAGS</envar> or <envar>CXXFLAGS</envar>, this is
+a good place to set them again.</para>
+
+<para>From this point on, there is no need to use the
+<envar>LFS</envar> variable anymore, because all work will be
+restricted to the LFS file system. This is because the Bash shell is
+told that <filename class="directory">$LFS</filename> is now the root
+(<filename class="directory">/</filename>) directory.</para>
+
+<para>Notice that <filename class="directory">/tools/bin</filename>
+comes last in the <envar>PATH</envar>. This means that a
+temporary tool will not be used anymore as soon as its final version
+is installed. This occurs when the shell does not <quote>remember</quote> the
+locations of executed binaries&mdash;for this reason, hashing is switched
+off by passing the <parameter>+h</parameter> option to <command>bash</command>.</para>
+
+<para>It is important that all the commands throughout the remainder
+of this chapter and the following chapters be run from within the
+chroot environment. If you leave this environment for any reason
+(rebooting for example), remember to first mount the <systemitem
+class="filesystem">proc</systemitem> and <systemitem
+class="filesystem">devpts</systemitem> file systems (discussed in the
+previous section) and enter chroot again before continuing with the
+installations.</para>
+
+<para>Note that the bash prompt will say <quote>I have no
+name!</quote> This is normal because the
+<filename>/etc/passwd</filename> file has not been created yet.</para>
+
</sect1>
+
diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml
index d4c93c84b..6df281e33 100644
--- a/chapter06/coreutils.xml
+++ b/chapter06/coreutils.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-coreutils" xreflabel="Coreutils" role="wrap">
+<sect1 id="ch-system-coreutils" role="wrap">
<title>Coreutils-&coreutils-version;</title>
<?dbhtml filename="coreutils.html"?>
<indexterm zone="ch-system-coreutils"><primary sortas="a-Coreutils">Coreutils</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Coreutils package contains utilities for showing and setting the
+basic system characteristics.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,16 +19,25 @@
<seglistitem><seg>0.9 SBU</seg><seg>69 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Coreutils installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils, GCC,
+Gettext, Glibc, Grep, Make, Perl, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Coreutils</title>
-<para>Apply a patch:</para>
+<para>A known issue with the <command>uname</command> program from
+this package is that the <parameter>-p</parameter> switch always
+returns <computeroutput>unknown</computeroutput>. The following patch
+fixes this behavior for Intel architectures:</para>
<screen><userinput>patch -Np1 -i ../coreutils-&coreutils-version;-uname-2.patch</userinput></screen>
-<para>Apply another patch:</para>
+<para>Prevent Coreutils from installing binaries that will be later be
+installed by other packages:</para>
<screen><userinput>patch -Np1 -i \
../coreutils-&coreutils-version;-suppress_uptime_kill_su-1.patch</userinput></screen>
@@ -39,21 +50,30 @@
<screen><userinput>make</userinput></screen>
+<para>The test suite of Coreutils makes several assumptions about the
+presence of files and users that are not valid this early in the LFS
+build. Therefore, additional items need to be set up before running
+the tests. Skip down to <quote>Install the package</quote> if
+not running the test suite.</para>
+
<para>Create two dummy groups and a dummy user name:</para>
<screen><userinput>echo "dummy1:x:1000:" &gt;&gt; /etc/group
echo "dummy2:x:1001:dummy" &gt;&gt; /etc/group
echo "dummy:x:1000:1000:::/bin/bash" &gt;&gt; /etc/passwd</userinput></screen>
-<para>Run the <emphasis>root</emphasis> tests:</para>
+<para>Now the test suite is ready to be run. First, run the tests that
+are meant to be run as user <emphasis>root</emphasis>:</para>
<screen><userinput>make NON_ROOT_USERNAME=dummy check-root</userinput></screen>
-<para>Run the user tests:</para>
+<para>Then run the remainder of the tests as the
+<emphasis>dummy</emphasis> user:</para>
<screen><userinput>src/su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
-<para>Remove the dummy user and groups:</para>
+<para>When testing is complete, remove the dummy user and
+groups:</para>
<screen><userinput>sed -i '/dummy/d' /etc/passwd /etc/group</userinput></screen>
@@ -61,7 +81,7 @@ echo "dummy:x:1000:1000:::/bin/bash" &gt;&gt; /etc/passwd</userinput></screen>
<screen><userinput>make install</userinput></screen>
-<para>And move some programs to their proper locations:</para>
+<para>Move programs to the proper locations:</para>
<screen><userinput>mv /usr/bin/{[,basename,cat,chgrp,chmod,chown,cp,dd,df} /bin
mv /usr/bin/{date,echo,false,head,hostname,install,ln} /bin
@@ -69,7 +89,7 @@ mv /usr/bin/{ls,mkdir,mknod,mv,pwd,rm,rmdir,sync} /bin
mv /usr/bin/{sleep,stty,test,touch,true,uname} /bin
mv /usr/bin/chroot /usr/sbin</userinput></screen>
-<para>Create a symlink:</para>
+<para>Finally, create a symlink to be FHS-compliant:</para>
<screen><userinput>ln -s ../../bin/install /usr/bin</userinput></screen>
@@ -78,8 +98,755 @@ mv /usr/bin/chroot /usr/sbin</userinput></screen>
<sect2 id="contents-coreutils" role="content"><title>Contents of Coreutils</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>basename, cat, chgrp, chmod, chown, chroot, cksum,
+comm, cp, csplit, cut, date, dd, df, dir, dircolors, dirname, du,
+echo, env, expand, expr, factor, false, fmt, fold, groups, head,
+hostid, hostname, id, install, join, link, ln, logname, ls, md5sum,
+mkdir, mkfifo, mknod, mv, nice, nl, nohup, od, paste, pathchk, pinky,
+pr, printenv, printf, ptx, pwd, readlink, rm, rmdir, seq, sha1sum,
+shred, sleep, sort, split, stat, stty, sum, sync, tac, tail, tee,
+test, touch, tr, true, tsort, tty, uname, unexpand, uniq, unlink,
+users, vdir, wc, who, whoami, and yes</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="basename">
+<term><command>basename</command></term>
+<listitem>
+<para>Strips any path and a given suffix from a file name</para>
+<indexterm zone="ch-system-coreutils basename"><primary sortas="b-basename">basename</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="cat">
+<term><command>cat</command></term>
+<listitem>
+<para>Concatenates files to standard output</para>
+<indexterm zone="ch-system-coreutils cat"><primary sortas="b-cat">cat</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="chgrp">
+<term><command>chgrp</command></term>
+<listitem>
+<para>Changes the group ownership of each given file to the given
+group; the group can either be either given a name or a numeric
+ID</para>
+<indexterm zone="ch-system-coreutils chgrp"><primary sortas="b-chgrp">chgrp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="chmod">
+<term><command>chmod</command></term>
+<listitem>
+<para>Changes the permissions of each file to the given mode; the mode
+can be either a symbolic representation of the changes to make or an
+octal number representing the new permissions</para>
+<indexterm zone="ch-system-coreutils chmod"><primary sortas="b-chmod">chmod</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="chown">
+<term><command>chown</command></term>
+<listitem>
+<para>Changes the user and/or group ownership of
+each given file to the given user/group pair</para>
+<indexterm zone="ch-system-coreutils chown"><primary sortas="b-chown">chown</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="chroot">
+<term><command>chroot</command></term>
+<listitem>
+<para>Runs a command with the specified directory as the
+<filename class="directory">/</filename> directory</para>
+<indexterm zone="ch-system-coreutils chroot"><primary sortas="b-chroot">chroot</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="cksum">
+<term><command>cksum</command></term>
+<listitem>
+<para>Prints the Cyclic Redundancy Check (CRC) checksum and the byte
+counts of each specified file</para>
+<indexterm zone="ch-system-coreutils cksum"><primary sortas="b-cksum">cksum</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="comm">
+<term><command>comm</command></term>
+<listitem>
+<para>Compares two sorted files, outputting in three columns the lines
+that are unique and the lines that are common</para>
+<indexterm zone="ch-system-coreutils comm"><primary sortas="b-comm">comm</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="cp">
+<term><command>cp</command></term>
+<listitem>
+<para>Copies files</para>
+<indexterm zone="ch-system-coreutils cp"><primary sortas="b-cp">cp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="csplit">
+<term><command>csplit</command></term>
+<listitem>
+<para>Splits a given file into several new files, separating them
+according to given patterns or line numbers and outputting the byte
+count of each new file</para>
+<indexterm zone="ch-system-coreutils csplit"><primary sortas="b-csplit">csplit</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="cut">
+<term><command>cut</command></term>
+<listitem>
+<para>Prints sections of lines, selecting the parts according to given
+fields or positions</para>
+<indexterm zone="ch-system-coreutils cut"><primary sortas="b-cut">cut</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="date">
+<term><command>date</command></term>
+<listitem>
+<para>Displays the current time in the given format, or sets the
+system date</para>
+<indexterm zone="ch-system-coreutils date"><primary sortas="b-date">date</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="dd">
+<term><command>dd</command> </term>
+<listitem>
+<para>Copies a file using the given block size and count, while
+optionally performing conversions on it</para>
+<indexterm zone="ch-system-coreutils dd"><primary sortas="b-dd">dd</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="df">
+<term><command>df</command></term>
+<listitem>
+<para>Reports the amount of disk space available (and used) on all
+mounted file systems, or only on the file systems holding the selected
+files</para>
+<indexterm zone="ch-system-coreutils df"><primary sortas="b-df">df</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="dir">
+<term><command>dir</command></term>
+<listitem>
+<para>Lists the contents of each given directory (the same as
+the <command>ls</command> command)</para>
+<indexterm zone="ch-system-coreutils dir"><primary sortas="b-dir">dir</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="dircolors">
+<term><command>dircolors</command></term>
+<listitem>
+<para>Outputs commands to set the <envar>LS_COLOR</envar>
+environment variable to change the color scheme used by
+<command>ls</command></para>
+<indexterm zone="ch-system-coreutils dircolors"><primary sortas="b-dircolors">dircolors</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="dirname">
+<term><command>dirname</command></term>
+<listitem>
+<para>Strips the non-directory suffix from a file name</para>
+<indexterm zone="ch-system-coreutils dirname"><primary sortas="b-dirname">dirname</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="du">
+<term><command>du</command></term>
+<listitem>
+<para>Reports the amount of disk space used by the current directory,
+by each of the given directories (including all subdirectories) or by
+each of the given files</para>
+<indexterm zone="ch-system-coreutils du"><primary sortas="b-du">du</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="echo">
+<term><command>echo</command></term>
+<listitem>
+<para>Displays the given strings</para>
+<indexterm zone="ch-system-coreutils echo"><primary sortas="b-echo">echo</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="env">
+<term><command>env</command></term>
+<listitem>
+<para>Runs a command in a modified environment</para>
+<indexterm zone="ch-system-coreutils env"><primary sortas="b-env">env</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="expand">
+<term><command>expand</command></term>
+<listitem>
+<para>Converts tabs to spaces</para>
+<indexterm zone="ch-system-coreutils expand"><primary sortas="b-expand">expand</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="expr">
+<term><command>expr</command></term>
+<listitem>
+<para>Evaluates expressions</para>
+<indexterm zone="ch-system-coreutils expr"><primary sortas="b-expr">expr</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="factor">
+<term><command>factor</command></term>
+<listitem>
+<para>Prints the prime factors of all specified integer numbers</para>
+<indexterm zone="ch-system-coreutils factor"><primary sortas="b-factor">factor</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="false">
+<term><command>false</command></term>
+<listitem>
+<para>Does nothing, unsuccessfully; it always exits with a status code
+indicating failure</para>
+<indexterm zone="ch-system-coreutils false"><primary sortas="b-false">false</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="fmt">
+<term><command>fmt</command></term>
+<listitem>
+<para>Reformats the paragraphs in the given files</para>
+<indexterm zone="ch-system-coreutils fmt"><primary sortas="b-fmt">fmt</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="fold">
+<term><command>fold</command></term>
+<listitem>
+<para>Wraps the lines in the given files</para>
+<indexterm zone="ch-system-coreutils fold"><primary sortas="b-fold">fold</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="groups-coreutils">
+<term><command>groups</command></term>
+<listitem>
+<para>Reports a user's group memberships</para>
+<indexterm zone="ch-system-coreutils groups-coreutils"><primary sortas="b-groups-coreutils">groups</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="head">
+<term><command>head</command></term>
+<listitem>
+<para>Prints the first ten lines (or the given number of lines) of each given file</para>
+<indexterm zone="ch-system-coreutils head"><primary sortas="b-head">head</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hostid">
+<term><command>hostid</command></term>
+<listitem>
+<para>Reports the numeric identifier (in hexadecimal) of the host</para>
+<indexterm zone="ch-system-coreutils hostid"><primary sortas="b-hostid">hostid</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hostname">
+<term><command>hostname</command></term>
+<listitem>
+<para>Reports or sets the name of the host</para>
+<indexterm zone="ch-system-coreutils hostname"><primary sortas="b-hostname">hostname</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="id">
+<term><command>id</command></term>
+<listitem>
+<para>Reports the effective user ID, group ID, and
+group memberships of the current user or specified user</para>
+<indexterm zone="ch-system-coreutils id"><primary sortas="b-id">id</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="install">
+<term><command>install</command> </term>
+<listitem>
+<para>Copies files while setting their
+permission modes and, if possible, their owner and group</para>
+<indexterm zone="ch-system-coreutils install"><primary sortas="b-install">install</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="join">
+<term><command>join</command></term>
+<listitem>
+<para>Joins the lines that have identical join fields from two
+separate files</para>
+<indexterm zone="ch-system-coreutils join"><primary sortas="b-join">join</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="link">
+<term><command>link</command></term>
+<listitem>
+<para>Creates a hard link with the given name to a file</para>
+<indexterm zone="ch-system-coreutils link"><primary sortas="b-link">link</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ln">
+<term><command>ln</command></term>
+<listitem>
+<para>Makes hard links or soft (symbolic) links between files</para>
+<indexterm zone="ch-system-coreutils ln"><primary sortas="b-ln">ln</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="logname">
+<term><command>logname</command></term>
+<listitem>
+<para>Reports the current user's login name</para>
+<indexterm zone="ch-system-coreutils logname"><primary sortas="b-logname">logname</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ls">
+<term><command>ls</command></term>
+<listitem>
+<para>Lists the contents of each given directory</para>
+<indexterm zone="ch-system-coreutils ls"><primary sortas="b-ls">ls</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="md5sum">
+<term><command>md5sum</command></term>
+<listitem>
+<para>Reports or checks Message Digest 5 (MD5) checksums</para>
+<indexterm zone="ch-system-coreutils md5sum"><primary sortas="b-md5sum">md5sum</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mkdir">
+<term><command>mkdir</command></term>
+<listitem>
+<para>Creates directories with the given names</para>
+<indexterm zone="ch-system-coreutils mkdir"><primary sortas="b-mkdir">mkdir</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mkfifo">
+<term><command>mkfifo</command></term>
+<listitem>
+<para>Creates First-In, First-Outs (FIFOs), a <quote>named
+pipe</quote> in UNIX parlance, with the given names</para>
+<indexterm zone="ch-system-coreutils mkfifo"><primary sortas="b-mkfifo">mkfifo</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mknod">
+<term><command>mknod</command></term>
+<listitem>
+<para>Creates device nodes with the given names; a device node is a
+character special file, a block special file, or a FIFO</para>
+<indexterm zone="ch-system-coreutils mknod"><primary sortas="b-mknod">mknod</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mv">
+<term><command>mv</command></term>
+<listitem>
+<para>Moves or renames files or directories</para>
+<indexterm zone="ch-system-coreutils mv"><primary sortas="b-mv">mv</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="nice">
+<term><command>nice</command></term>
+<listitem>
+<para>Runs a program with modified scheduling priority</para>
+<indexterm zone="ch-system-coreutils nice"><primary sortas="b-nice">nice</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="nl">
+<term><command>nl</command></term>
+<listitem>
+<para>Numbers the lines from the given files</para>
+<indexterm zone="ch-system-coreutils nl"><primary sortas="b-nl">nl</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="nohup">
+<term><command>nohup</command></term>
+<listitem>
+<para>Runs a command immune to hangups, with its output redirected to
+a log file</para>
+<indexterm zone="ch-system-coreutils nohup"><primary sortas="b-nohup">nohup</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="od">
+<term><command>od</command></term>
+<listitem>
+<para>Dumps files in octal and other formats</para>
+<indexterm zone="ch-system-coreutils od"><primary sortas="b-od">od</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="paste">
+<term><command>paste</command></term>
+<listitem>
+<para>Merges the given files, joining sequentially corresponding lines
+side by side, separated by tab characters</para>
+<indexterm zone="ch-system-coreutils paste"><primary sortas="b-paste">paste</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pathchk">
+<term><command>pathchk</command></term>
+<listitem>
+<para>Checks if file names are valid or portable</para>
+<indexterm zone="ch-system-coreutils pathchk"><primary sortas="b-pathchk">pathchk</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pinky">
+<term><command>pinky</command></term>
+<listitem>
+<para>Is a lightweight finger client; it reports some information about the given users</para>
+<indexterm zone="ch-system-coreutils pinky"><primary sortas="b-pinky">pinky</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pr">
+<term><command>pr</command></term>
+<listitem>
+<para>Paginates and columnates files for printing</para>
+<indexterm zone="ch-system-coreutils pr"><primary sortas="b-pr">pr</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="printenv">
+<term><command>printenv</command></term>
+<listitem>
+<para>Prints the environment</para>
+<indexterm zone="ch-system-coreutils printenv"><primary sortas="b-printenv">printenv</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="printf">
+<term><command>printf</command></term>
+<listitem>
+<para>Prints the given arguments according to the given format, much
+like the C printf function</para>
+<indexterm zone="ch-system-coreutils printf"><primary sortas="b-printf">printf</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ptx">
+<term><command>ptx</command></term>
+<listitem>
+<para>Produces a permuted index from the contents of the given files,
+with each keyword in its context</para>
+<indexterm zone="ch-system-coreutils ptx"><primary sortas="b-ptx">ptx</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pwd">
+<term><command>pwd</command></term>
+<listitem>
+<para>Reports the name of the current working directory</para>
+<indexterm zone="ch-system-coreutils pwd"><primary sortas="b-pwd">pwd</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="readlink">
+<term><command>readlink</command></term>
+<listitem>
+<para>Reports the value of the given symbolic link</para>
+<indexterm zone="ch-system-coreutils readlink"><primary sortas="b-readlink">readlink</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="rm">
+<term><command>rm</command></term>
+<listitem>
+<para>Removes files or directories</para>
+<indexterm zone="ch-system-coreutils rm"><primary sortas="b-rm">rm</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="rmdir">
+<term><command>rmdir</command></term>
+<listitem>
+<para>Removes directories if they are empty</para>
+<indexterm zone="ch-system-coreutils rmdir"><primary sortas="b-rmdir">rmdir</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="seq">
+<term><command>seq</command></term>
+<listitem>
+<para>Prints a sequence of numbers within a given range and with a
+given increment</para>
+<indexterm zone="ch-system-coreutils seq"><primary sortas="b-seq">seq</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="sha1sum">
+<term><command>sha1sum</command></term>
+<listitem>
+<para>Prints or checks 160-bit Secure Hash Algorithm 1 (SHA1) checksums</para>
+<indexterm zone="ch-system-coreutils sha1sum"><primary sortas="b-sha1sum">sha1sum</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="shred">
+<term><command>shred</command></term>
+<listitem>
+<para>Overwrites the given files repeatedly with complex patterns,
+making it difficult to recover the data</para>
+<indexterm zone="ch-system-coreutils shred"><primary sortas="b-shred">shred</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="sleep">
+<term><command>sleep</command></term>
+<listitem>
+<para>Pauses for the given amount of time</para>
+<indexterm zone="ch-system-coreutils sleep"><primary sortas="b-sleep">sleep</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="sort">
+<term><command>sort</command></term>
+<listitem>
+<para>Sorts the lines from the given files</para>
+<indexterm zone="ch-system-coreutils sort"><primary sortas="b-sort">sort</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="split">
+<term><command>split</command></term>
+<listitem>
+<para>Splits the given file into pieces, by size or by number of lines</para>
+<indexterm zone="ch-system-coreutils split"><primary sortas="b-split">split</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="stat">
+<term><command>stat</command></term>
+<listitem>
+<para>Displays file or filesystem status</para>
+<indexterm zone="ch-system-coreutils stat"><primary sortas="b-stat">stat</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="stty">
+<term><command>stty</command></term>
+<listitem>
+<para>Sets or reports terminal line settings</para>
+<indexterm zone="ch-system-coreutils stty"><primary sortas="b-stty">stty</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="sum">
+<term><command>sum</command></term>
+<listitem>
+<para>Prints checksum and block counts for each given file</para>
+<indexterm zone="ch-system-coreutils sum"><primary sortas="b-sum">sum</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="sync">
+<term><command>sync</command></term>
+<listitem>
+<para>Flushes file system buffers; it forces changed blocks to disk
+and updates the super block</para>
+<indexterm zone="ch-system-coreutils sync"><primary sortas="b-sync">sync</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tac">
+<term><command>tac</command></term>
+<listitem>
+<para>Concatenates the given files in reverse</para>
+<indexterm zone="ch-system-coreutils tac"><primary sortas="b-tac">tac</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tail">
+<term><command>tail</command></term>
+<listitem>
+<para>Prints the last ten lines (or the given number of lines) of each
+given file</para>
+<indexterm zone="ch-system-coreutils tail"><primary sortas="b-tail">tail</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tee">
+<term><command>tee</command></term>
+<listitem>
+<para>Reads from standard input while writing both to standard output
+and to the given files</para>
+<indexterm zone="ch-system-coreutils tee"><primary sortas="b-tee">tee</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="test">
+<term><command>test</command></term>
+<listitem>
+<para>Compares values and checks file types</para>
+<indexterm zone="ch-system-coreutils test"><primary sortas="b-test">test</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="touch">
+<term><command>touch</command></term>
+<listitem>
+<para>Changes file timestamps, setting the access and modification
+times of the given files to the current time; files that do not exist
+are created with zero length</para>
+<indexterm zone="ch-system-coreutils touch"><primary sortas="b-touch">touch</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tr">
+<term><command>tr</command></term>
+<listitem>
+<para>Translates, squeezes, and deletes the given characters from
+standard input</para>
+<indexterm zone="ch-system-coreutils tr"><primary sortas="b-tr">tr</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="true">
+<term><command>true</command></term>
+<listitem>
+<para>Does nothing, successfully; it always exits with a status code
+indicating success</para>
+<indexterm zone="ch-system-coreutils true"><primary sortas="b-true">true</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tsort">
+<term><command>tsort</command></term>
+<listitem>
+<para>Performs a topological sort; it writes a completely ordered list
+according to the partial ordering in a given file</para>
+<indexterm zone="ch-system-coreutils tsort"><primary sortas="b-tsort">tsort</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tty">
+<term><command>tty</command></term>
+<listitem>
+<para>Reports the file name of the terminal connected to standard
+input</para>
+<indexterm zone="ch-system-coreutils tty"><primary sortas="b-tty">tty</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="uname">
+<term><command>uname</command></term>
+<listitem>
+<para>Reports system information</para>
+<indexterm zone="ch-system-coreutils uname"><primary sortas="b-uname">uname</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="unexpand">
+<term><command>unexpand</command></term>
+<listitem>
+<para>Converts spaces to tabs</para>
+<indexterm zone="ch-system-coreutils unexpand"><primary sortas="b-unexpand">unexpand</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="uniq">
+<term><command>uniq</command></term>
+<listitem>
+<para>Discards all but one of successive identical lines</para>
+<indexterm zone="ch-system-coreutils unexpand"><primary sortas="b-unexpand">unexpand</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="unlink">
+<term><command>unlink</command></term>
+<listitem>
+<para>Removes the given file</para>
+<indexterm zone="ch-system-coreutils unlink"><primary sortas="b-unlink">unlink</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="users">
+<term><command>users</command></term>
+<listitem>
+<para>Reports the names of the users currently logged on</para>
+<indexterm zone="ch-system-coreutils users"><primary sortas="b-users">users</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="vdir">
+<term><command>vdir</command></term>
+<listitem>
+<para>Is the same as <command>ls -l</command></para>
+<indexterm zone="ch-system-coreutils vdir"><primary sortas="b-vdir">vdir</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="wc">
+<term><command>wc</command></term>
+<listitem>
+<para>Reports the number of lines, words, and bytes for each given
+file, as well as a total line when more than one file is given</para>
+<indexterm zone="ch-system-coreutils wc"><primary sortas="b-wc">wc</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="who">
+<term><command>who</command></term>
+<listitem>
+<para>Reports who is logged on</para>
+<indexterm zone="ch-system-coreutils who"><primary sortas="b-who">who</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="whoami">
+<term><command>whoami</command></term>
+<listitem>
+<para>Reports the user name associated with the current effective user ID</para>
+<indexterm zone="ch-system-coreutils whoami"><primary sortas="b-whoami">whoami</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="yes">
+<term><command>yes</command></term>
+<listitem>
+<para>Repeatedly outputs <quote>y</quote> or a given string until
+killed</para>
+<indexterm zone="ch-system-coreutils yes"><primary sortas="b-yes">yes</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/createfiles.xml b/chapter06/createfiles.xml
index de27a6c76..7e5ddc97a 100644
--- a/chapter06/createfiles.xml
+++ b/chapter06/createfiles.xml
@@ -7,7 +7,10 @@
<title>Creating Essential Symlinks</title>
<?dbhtml filename="createfiles.html"?>
-<para>Create some needed links.</para>
+<para>Some programs hard-wire paths to programs which do not yet
+exist. In order to satisfy these programs, create a number of symbolic
+links which will be replaced by real files throughout the course of
+this chapter after the software has been installed.</para>
<screen><userinput>ln -s /tools/bin/{bash,cat,pwd,stty} /bin
ln -s /tools/bin/perl /usr/bin
@@ -15,3 +18,4 @@ ln -s /tools/lib/libgcc_s.so{,.1} /usr/lib
ln -s bash /bin/sh</userinput></screen>
</sect1>
+
diff --git a/chapter06/creatingdirs.xml b/chapter06/creatingdirs.xml
index b989b7879..e7881c982 100644
--- a/chapter06/creatingdirs.xml
+++ b/chapter06/creatingdirs.xml
@@ -7,7 +7,9 @@
<title>Creating Directories</title>
<?dbhtml filename="creatingdirs.html"?>
-<para>Create a dirs tree:</para>
+<para>It is time to create some structure in the LFS file system.
+Create a directory tree. Issuing the following commands will create a
+standard tree:</para>
<screen><userinput>install -d /{bin,boot,dev,etc/opt,home,lib,mnt}
install -d /{sbin,srv,usr/local,var,opt}
@@ -29,4 +31,37 @@ install -d /var/{opt,cache,lib/{misc,locate},local}
install -d /opt/{bin,doc,include,info}
install -d /opt/{lib,man/man{1,2,3,4,5,6,7,8}}</userinput></screen>
+<para>Directories are, by default, created with permission mode 755,
+but this is not desirable for all directories. In the commands above,
+two changes are made&mdash;one to the home directory of user
+<emphasis>root</emphasis>, and another to the directories for
+temporary files.</para>
+
+<para>The first mode change ensures that not just anybody can enter
+the <filename class="directory">/root</filename> directory&mdash;the same
+as a normal user would do with his or her home directory. The second
+mode change makes sure that any user can write to the <filename
+class="directory">/tmp</filename> and <filename
+class="directory">/var/tmp</filename> directories, but cannot remove
+other users' files from them. The latter is prohibited by the
+so-called <quote>sticky bit,</quote> the highest bit (1) in the 1777
+bit mask.</para>
+
+<sect2>
+<title>FHS Compliance Note</title>
+
+<para>The directory tree is based on the Filesystem Hierarchy Standard
+(FHS) standard (available at <ulink
+url="http://www.pathname.com/fhs/"/>). Besides the tree created above,
+this standard stipulates the existence of <filename
+class="directory">/usr/local/games</filename> and <filename
+class="directory">/usr/share/games</filename>. We do not recommend
+these for a base system, however, feel free to make the system
+FHS-compliant. The FHS is not precise as to the structure of the
+<filename class="directory">/usr/local/share</filename> subdirectory,
+so we created only the directories that are needed.</para>
+
+</sect2>
+
</sect1>
+
diff --git a/chapter06/devices.xml b/chapter06/devices.xml
index 4663f4caf..e46cf8ba5 100644
--- a/chapter06/devices.xml
+++ b/chapter06/devices.xml
@@ -3,20 +3,42 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-devices" xreflabel="devices">
+<sect1 id="ch-system-devices">
<title>Populating /dev</title>
<?dbhtml filename="devices.html"?>
-<para>Create the initial device nodes</para>
+<indexterm zone="ch-system-devices"><primary sortas="e-Devices">/dev/*</primary></indexterm>
+
+<sect2>
+<title>Creating Initial Device Nodes</title>
+
+<para>When the kernel boots the system, it requires the presence of a few device
+nodes, in particular the <filename class="devicefile">console</filename> and
+<filename class="devicefile">null</filename> devices. Create these by
+running the following commands:</para>
<screen><userinput>mknod -m 600 /dev/console c 5 1
mknod -m 666 /dev/null c 1 3</userinput></screen>
+</sect2>
+
+<sect2>
+<title>Mounting ramfs and Populating /dev</title>
-<para>Mount a ramfs in /dev</para>
+<para>The ideal way to populate <filename
+class="directory">/dev</filename> is to mount a <systemitem
+class="filesystem">ramfs</systemitem> onto <filename
+class="directory">/dev</filename>, like <systemitem
+class="filesystem">tmpfs</systemitem>, and create the devices on there
+during each bootup. Since the system has not been booted, it is
+necessary to do what the bootscripts would otherwise do and populate
+<filename class="directory">/dev</filename>. Begin by mounting
+<filename class="directory">/dev</filename>:</para>
<screen><userinput>mount -n -t ramfs none /dev</userinput></screen>
-<para>Create a minimal set of device nodes:</para>
+<!-- Edit Me -->
+<para>Since the Udev package will not be installed until later on in the
+process, create a minimal set of device nodes used for building:</para>
<screen><userinput>mknod -m 622 /dev/console c 5 1
mknod -m 666 /dev/null c 1 3
@@ -26,8 +48,10 @@ mknod -m 666 /dev/tty c 5 0
mknod -m 444 /dev/random c 1 8
mknod -m 444 /dev/urandom c 1 9
chown root:tty /dev/{console,ptmx,tty}</userinput></screen>
+<!-- -->
-<para>Create some symlinks and directories:</para>
+<para>There are some symlinks and directories required by LFS that are
+not created by Udev, so create those here:</para>
<screen><userinput>ln -s /proc/self/fd /dev/fd
ln -s /proc/self/fd/0 /dev/stdin
@@ -37,10 +61,21 @@ ln -s /proc/kcore /dev/core
mkdir /dev/pts
mkdir /dev/shm</userinput></screen>
-<para>Mount the virtual file systems:</para>
+<para>Finally, mount the proper virtual (kernel) file systems on the
+newly-created directories:</para>
<screen><userinput>mount -t devpts -o gid=4,mode=620 none /dev/pts
mount -t tmpfs none /dev/shm</userinput></screen>
+<para>The <command>mount</command> commands executed above may result
+in the following warning message:</para>
+
+<screen><computeroutput>can't open /etc/fstab: No such file or directory.</computeroutput></screen>
+
+<para>This file&mdash;<filename>/etc/fstab</filename>&mdash;has not
+been created yet but is also not required for the file systems to be
+properly mounted. As such, the warning can be safely ignored.</para>
+</sect2>
</sect1>
+
diff --git a/chapter06/diffutils.xml b/chapter06/diffutils.xml
index dfe1e4d2d..3649469f2 100644
--- a/chapter06/diffutils.xml
+++ b/chapter06/diffutils.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-diffutils" xreflabel="Diffutils" role="wrap">
+<sect1 id="ch-system-diffutils" role="wrap">
<title>Diffutils-&diffutils-version;</title>
<?dbhtml filename="diffutils.html"?>
<indexterm zone="ch-system-diffutils"><primary sortas="a-Diffutils">Diffutils</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Diffutils package contains programs that show the differences
+between files or directories.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +19,11 @@
<seglistitem><seg>0.1 SBU</seg><seg>7.5 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Diffutils installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils, GCC,
+Gettext, Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -30,7 +37,9 @@
<screen><userinput>make</userinput></screen>
-<para>Install it:</para>
+<para>This package does not come with a test suite.</para>
+
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -39,8 +48,48 @@
<sect2 id="contents-diffutils" role="content"><title>Contents of Diffutils</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>cmp, diff, diff3, and sdiff</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="cmp">
+<term><command>cmp</command></term>
+<listitem>
+<para>Compares two files and reports whether or in which bytes they differ</para>
+<indexterm zone="ch-system-diffutils cmp"><primary sortas="b-cmp">cmp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="diff">
+<term><command>diff</command></term>
+<listitem>
+<para>Compares two files or directories and reports which lines in the files differ</para>
+<indexterm zone="ch-system-diffutils diff"><primary sortas="b-diff">diff</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="diff3">
+<term><command>diff3</command></term>
+<listitem>
+<para>Compares three files line by line</para>
+<indexterm zone="ch-system-diffutils diff3"><primary sortas="b-diff3">diff3</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="sdiff">
+<term><command>sdiff</command></term>
+<listitem>
+<para>Merges two files and interactively outputs the results</para>
+<indexterm zone="ch-system-diffutils sdiff"><primary sortas="b-sdiff">sdiff</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/e2fsprogs.xml b/chapter06/e2fsprogs.xml
index 2a134265c..b3e5ecc30 100644
--- a/chapter06/e2fsprogs.xml
+++ b/chapter06/e2fsprogs.xml
@@ -3,13 +3,16 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-e2fsprogs" xreflabel="E2fsprogs" role="wrap">
+<sect1 id="ch-system-e2fsprogs" role="wrap">
<title>E2fsprogs-&e2fsprogs-version;</title>
<?dbhtml filename="e2fsprogs.html"?>
<indexterm zone="ch-system-e2fsprogs"><primary sortas="a-E2fsprogs">E2fsprogs</primary></indexterm>
<sect2 role="package"><title/>
+<para>The E2fsprogs package contains the utilities for handling the
+<systemitem class="filesystem">ext2</systemitem> file system. It also supports
+the <systemitem class="filesystem">ext3</systemitem> journaling file system.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,12 +20,18 @@
<seglistitem><seg>0.6 SBU</seg><seg>4.9 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>E2fsprogs installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils,
+Diffutils, Gawk, GCC, Gettext, Glibc, Grep, Make, Sed, and Texinfo</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of E2fsprogs</title>
-<para>Create a build directory:</para>
+<para>It is recommended that E2fsprogs be built in a subdirectory of the source tree:
+</para>
<screen><userinput>mkdir build
cd build</userinput></screen>
@@ -32,6 +41,39 @@ cd build</userinput></screen>
<screen><userinput>../configure --prefix=/usr --with-root-prefix="" \
--enable-elf-shlibs --disable-evms</userinput></screen>
+<para>The meaning of the configure options:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--with-root-prefix=""</parameter></term>
+<listitem><para>Certain programs (such as the
+<command>e2fsck</command> program) are considered essential programs.
+When, for example, <filename class="directory">/usr</filename> is not
+mounted, these essential programs need to be available. They belong in
+directories like <filename class="directory">/lib</filename> and
+<filename class="directory">/sbin</filename>. If this option is not
+passed to E2fsprogs' configure, the programs are installed into the
+<filename class="directory">/usr</filename> directory, which is not
+where they should be.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--enable-elf-shlibs</parameter></term>
+<listitem><para>This creates the shared libraries which some programs
+in this package use.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--disable-evms</parameter></term>
+<listitem><para>This disables the building of the Enterprise Volume
+Management System (EVMS) plugin. This plugin is not up-to-date with
+the latest EVMS internal interfaces and EVMS is not installed as part
+of a base LFS system, so the plugin is not required. See the EVMS
+website at <ulink url="http://evms.sourceforge.net/"/> for more
+information regarding EVMS.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
@@ -43,16 +85,296 @@ cd build</userinput></screen>
<screen><userinput>make install</userinput></screen>
-<para>Also install the shared libraries:</para>
+<para>Install the shared libraries:</para>
<screen><userinput>make install-libs</userinput></screen>
</sect2>
+
+
<sect2 id="contents-e2fsprogs" role="content"><title>Contents of E2fsprogs</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed libraries</segtitle>
+<seglistitem><seg>badblocks, blkid, chattr,
+compile_et, debugfs, dumpe2fs, e2fsck, e2image, e2label, findfs, fsck,
+fsck.ext2, fsck.ext3, logsave, lsattr, mk_cmds, mke2fs, mkfs.ext2, mkfs.ext3,
+mklost+found, resize2fs, tune2fs, and uuidgen.</seg>
+<seg>libblkid.[a,so], libcom_err.[a,so], libe2p.[a,so],
+libext2fs.[a,so], libss.[a,so], and libuuid.[a,so]</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="badblocks">
+<term><command>badblocks</command></term>
+<listitem>
+<para>Searches a device (usually a disk partition) for bad blocks</para>
+<indexterm zone="ch-system-e2fsprogs badblocks"><primary sortas="b-badblocks">badblocks</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="blkid">
+<term><command>blkid</command></term>
+<listitem>
+<para>A command line utility to locate and print block device attributes</para>
+<indexterm zone="ch-system-e2fsprogs blkid"><primary sortas="b-blkid">blkid</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="chattr">
+<term><command>chattr</command></term>
+<listitem>
+<para>Changes the attributes of files on an <systemitem
+class="filesystem">ext2</systemitem> file system; it also changes <systemitem
+class="filesystem">ext3</systemitem> file systems, the journaling version of
+<systemitem class="filesystem">ext2</systemitem> file systems</para>
+<indexterm zone="ch-system-e2fsprogs chattr"><primary sortas="b-chattr">chattr</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="compile_et">
+<term><command>compile_et</command></term>
+<listitem>
+<para>An error table compiler; it converts a table of error-code names and
+messages into a C source file suitable for use with the <filename
+class="libraryfile">com_err</filename> library</para>
+<indexterm zone="ch-system-e2fsprogs compile_et"><primary sortas="b-compile_et">compile_et</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="debugfs">
+<term><command>debugfs</command></term>
+<listitem>
+<para>A file system debugger; it can be used to examine and change the
+state of an <systemitem class="filesystem">ext2</systemitem> file system</para>
+<indexterm zone="ch-system-e2fsprogs debugfs"><primary sortas="b-debugfs">debugfs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="dumpe2fs">
+<term><command>dumpe2fs</command></term>
+<listitem>
+<para>Prints the super block and blocks group information for the file
+system present on a given device</para>
+<indexterm zone="ch-system-e2fsprogs dumpe2fs"><primary sortas="b-dumpe2fs">dumpe2fs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="e2fsck">
+<term><command>e2fsck</command></term>
+<listitem>
+<para>Is used to check, and optionally repair <systemitem
+class="filesystem">ext2</systemitem> file systems and <systemitem
+class="filesystem">ext3</systemitem> file systems</para>
+<indexterm zone="ch-system-e2fsprogs e2fsck"><primary sortas="b-e2fsck">e2fsck</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="e2image">
+<term><command>e2image</command></term>
+<listitem>
+<para>Is used to save critical <systemitem class="filesystem">ext2</systemitem>
+file system data to a file</para>
+<indexterm zone="ch-system-e2fsprogs e2image"><primary sortas="b-e2image">e2image</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="e2label">
+<term><command>e2label</command></term>
+<listitem>
+<para>Displays or changes the file system label on the <systemitem
+class="filesystem">ext2</systemitem> file system present on a given device</para>
+<indexterm zone="ch-system-e2fsprogs e2label"><primary sortas="b-e2label">e2label</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="findfs">
+<term><command>findfs</command></term>
+<listitem>
+<para>Finds a file system by label or Universally Unique Identifier (UUID)</para>
+<indexterm zone="ch-system-e2fsprogs findfs"><primary sortas="b-findfs">findfs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="fsck">
+<term><command>fsck</command></term>
+<listitem>
+<para>Is used to check, and optionally repair, file systems</para>
+<indexterm zone="ch-system-e2fsprogs fsck"><primary sortas="b-fsck">fsck</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="fsck.ext2">
+<term><command>fsck.ext2</command></term>
+<listitem>
+<para>By default checks <systemitem class="filesystem">ext2</systemitem>
+file systems</para>
+<indexterm zone="ch-system-e2fsprogs fsck.ext2"><primary
+sortas="b-fsck.ext2">fsck.ext2</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="fsck.ext3">
+<term><command>fsck.ext3</command></term>
+<listitem>
+<para>By default checks <systemitem class="filesystem">ext3</systemitem>
+file systems</para>
+<indexterm zone="ch-system-e2fsprogs fsck.ext3"><primary
+sortas="b-fsck.ext3">fsck.ext3</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="logsave">
+<term><command>logsave</command></term>
+<listitem>
+<para>Saves the output of a command in a log file</para>
+<indexterm zone="ch-system-e2fsprogs logsave"><primary sortas="b-logsave">logsave</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="lsattr">
+<term><command>lsattr</command></term>
+<listitem>
+<para>Lists the attributes of files on a second extended file system</para>
+<indexterm zone="ch-system-e2fsprogs lsattr"><primary sortas="b-lsattr">lsattr</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mk_cmds">
+<term><command>mk_cmds</command></term>
+<listitem>
+<para>Converts a table of command names and helps messages into a C
+source file suitable for use with the <filename
+class="libraryfile">libss</filename> subsystem library</para>
+<indexterm zone="ch-system-e2fsprogs mk_cmds"><primary sortas="b-mk_cmds">mk_cmds</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mke2fs">
+<term><command>mke2fs</command></term>
+<listitem>
+<para>Is used to create a second extended file system on the given
+device</para>
+<indexterm zone="ch-system-e2fsprogs mke2fs"><primary sortas="b-mke2fs">mke2fs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mkfs.ext2">
+<term><command>mkfs.ext2</command></term>
+<listitem>
+<para>By default creates <systemitem class="filesystem">ext2</systemitem>
+file systems</para>
+<indexterm zone="ch-system-e2fsprogs mkfs.ext2"><primary
+sortas="b-mkfs.ext2">mkfs.ext2</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mkfs.ext3">
+<term><command>mkfs.ext3</command></term>
+<listitem>
+<para>By default creates <systemitem class="filesystem">ext3</systemitem>
+file systems</para>
+<indexterm zone="ch-system-e2fsprogs mkfs.ext3"><primary
+sortas="b-mkfs.ext3">mkfs.ext3</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mklost-found">
+<term><command>mklost+found</command></term>
+<listitem>
+<para>Used to create a <filename class="directory">lost+found</filename>
+directory on an <systemitem class="filesystem">ext2</systemitem> file system;
+it pre-allocates disk blocks to this directory to lighten the task of
+<command>e2fsck</command></para>
+<indexterm zone="ch-system-e2fsprogs mklost-found"><primary sortas="b-mklost+found">mklost+found</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="resize2fs">
+<term><command>resize2fs</command></term>
+<listitem>
+<para>Can be used to enlarge or shrink an <systemitem
+class="filesystem">ext2</systemitem> file system</para>
+<indexterm zone="ch-system-e2fsprogs resize2fs"><primary sortas="b-resize2fs">resize2fs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tune2fs">
+<term><command>tune2fs</command></term>
+<listitem>
+<para>Adjusts tunable file system parameters on an <systemitem
+class="filesystem">ext2</systemitem> file system</para>
+<indexterm zone="ch-system-e2fsprogs tune2fs"><primary sortas="b-tune2fs">tune2fs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="uuidgen">
+<term><command>uuidgen</command></term>
+<listitem>
+<para>Creates new UUIDs. Each new UUID can reasonably be considered unique
+among all UUIDs created, on the local system and on other systems, in the
+past and in the future</para>
+<indexterm zone="ch-system-e2fsprogs uuidgen"><primary sortas="b-uuidgen">uuidgen</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libblkid">
+<term><filename class="libraryfile">libblkid</filename></term>
+<listitem>
+<para>Contains routines for device identification and token extraction</para>
+<indexterm zone="ch-system-e2fsprogs libblkid"><primary sortas="c-libblkid">libblkid</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libcom_err">
+<term><filename class="libraryfile">libcom_err</filename></term>
+<listitem>
+<para>The common error display routine</para>
+<indexterm zone="ch-system-e2fsprogs libcom_err"><primary sortas="c-libcom_err">libcom_err</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libe2p">
+<term><filename class="libraryfile">libe2p</filename></term>
+<listitem>
+<para>Used by <command>dumpe2fs</command>, <command>chattr</command>,
+and <command>lsattr</command></para>
+<indexterm zone="ch-system-e2fsprogs libe2p"><primary sortas="c-libe2p">libe2p</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libext2fs">
+<term><filename class="libraryfile">libext2fs</filename></term>
+<listitem>
+<para>Contains routines to enable user-level programs to manipulate an
+<systemitem class="filesystem">ext2</systemitem> file system</para>
+<indexterm zone="ch-system-e2fsprogs libext2fs"><primary sortas="c-libext2fs">libext2fs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libss">
+<term><filename class="libraryfile">libss</filename></term>
+<listitem>
+<para>Used by <command>debugfs</command></para>
+<indexterm zone="ch-system-e2fsprogs libss"><primary sortas="c-libss">libss</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libuuid">
+<term><filename class="libraryfile">libuuid</filename></term>
+<listitem>
+<para>Contains routines for generating unique identifiers for objects
+that may be accessible beyond the local system</para>
+<indexterm zone="ch-system-e2fsprogs libuuid"><primary sortas="c-libuuid">libuuid</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/file.xml b/chapter06/file.xml
index 6079e8ebc..639353cd2 100644
--- a/chapter06/file.xml
+++ b/chapter06/file.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-file" xreflabel="File" role="wrap">
+<sect1 id="ch-system-file" role="wrap">
<title>File-&file-version;</title>
<?dbhtml filename="file.html"?>
<indexterm zone="ch-system-file"><primary sortas="a-File">File</primary></indexterm>
<sect2 role="package"><title/>
+<para>The File package contains a utility for determining the type of files.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +18,11 @@
<seglistitem><seg>0.1 SBU</seg><seg>6.3 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>File installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Glibc, Grep, Make, Sed, and Zlib</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -30,7 +36,7 @@
<screen><userinput>make</userinput></screen>
-<para>Now install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -39,8 +45,36 @@
<sect2 id="contents-file" role="content"><title>Contents of File</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed library</segtitle>
+<seglistitem><seg>file</seg><seg>libmagic.[a,so]</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="file">
+<term><command>file</command></term>
+<listitem>
+<para>Tries to classify each given file; it does this by performing
+several tests&mdash;file system tests, magic number tests, and language
+tests</para>
+<indexterm zone="ch-system-file file"><primary sortas="b-file">file</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libmagic">
+<term><filename class="libraryfile">libmagic</filename></term>
+<listitem>
+<para>Contains routines for magic number recognition, used by the
+<command>file</command> program</para>
+<indexterm zone="ch-system-file libmagic"><primary sortas="c-libmagic">libmagic</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/findutils.xml b/chapter06/findutils.xml
index 15e61801c..1bbbccc06 100644
--- a/chapter06/findutils.xml
+++ b/chapter06/findutils.xml
@@ -3,13 +3,17 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-findutils" xreflabel="Findutils" role="wrap">
+<sect1 id="ch-system-findutils" role="wrap">
<title>Findutils-&findutils-version;</title>
<?dbhtml filename="findutils.html"?>
<indexterm zone="ch-system-findutils"><primary sortas="a-Findutils">Findutils</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Findutils package contains programs to find files. Processes
+are provided to recursively search through a directory tree and to
+create, maintain, and search a database (often faster than the recursive
+find, but unreliable if the database has not been recently updated).</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +21,11 @@
<seglistitem><seg>0.2 SBU</seg><seg>7.5 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Findutils installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils,
+Diffutils, GCC, Gettext, Glibc, Grep, Make and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -27,6 +36,10 @@
<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/lib/locate \
--localstatedir=/var/lib/locate</userinput></screen>
+<para>The <parameter>localstatedir</parameter> directive above changes the
+location of the <command>locate</command> database to be in <filename
+class="directory">/var/lib/locate</filename>, which is FHS-compliant.</para>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
@@ -34,17 +47,86 @@
<para>To test the results, issue:
<userinput>make check</userinput>.</para>
-<para>Now install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
</sect2>
-
<sect2 id="contents-findutils" role="content"><title>Contents of Findutils</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>bigram, code, find, frcode, locate, updatedb, and xargs</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="bigram">
+<term><command>bigram</command></term>
+<listitem>
+<para>Was formerly used to produce <command>locate</command> databases</para>
+<indexterm zone="ch-system-findutils bigram"><primary sortas="b-bigram">bigram</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="code">
+<term><command>code</command></term>
+<listitem>
+<para>Was formerly used to produce <command>locate</command>
+databases; it is the ancestor of <command>frcode</command>.</para>
+<indexterm zone="ch-system-findutils code"><primary sortas="b-code">code</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="find">
+<term><command>find</command></term>
+<listitem>
+<para>Searches given directory trees for files matching the specified criteria</para>
+<indexterm zone="ch-system-findutils find"><primary sortas="b-find">find</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="frcode">
+<term><command>frcode</command></term>
+<listitem>
+<para>Is called by <command>updatedb</command> to compress the list of file names; it uses
+front-compression, reducing the database size by a factor of four to
+five.</para>
+<indexterm zone="ch-system-findutils frcode"><primary sortas="b-frcode">frcode</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="locate">
+<term><command>locate</command></term>
+<listitem>
+<para>Searches through a database of file names and reports the names
+that contain a given string or match a given pattern</para>
+<indexterm zone="ch-system-findutils locate"><primary sortas="b-locate">locate</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="updatedb">
+<term><command>updatedb</command></term>
+<listitem>
+<para>Updates the <command>locate</command> database; it scans
+the entire file system (including other file systems that are currently mounted,
+unless told not to) and puts every file name it finds into the database</para>
+<indexterm zone="ch-system-findutils updatedb"><primary sortas="b-updatedb">updatedb</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="xargs">
+<term><command>xargs</command></term>
+<listitem>
+<para>Can be used to apply a given command to a list of files</para>
+<indexterm zone="ch-system-findutils xargs"><primary sortas="b-xargs">xargs</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/flex.xml b/chapter06/flex.xml
index 9772cfcf4..90282002b 100644
--- a/chapter06/flex.xml
+++ b/chapter06/flex.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-flex" xreflabel="Flex" role="wrap">
+<sect1 id="ch-system-flex" role="wrap">
<title>Flex-&flex-version;</title>
<?dbhtml filename="flex.html"?>
<indexterm zone="ch-system-flex"><primary sortas="a-Flex">Flex</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Flex package contains a utility for generating programs that
+recognize patterns in text.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,20 +19,28 @@
<seglistitem><seg>0.1 SBU</seg><seg>3.4 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Flex installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Bison, Coreutils, Diffutils,
+GCC, Gettext, Glibc, Grep, M4, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Flex</title>
-<para>Apply a patch:</para>
+<para>Flex contains several known bugs. Fix these with the following patch:</para>
<screen><userinput>patch -Np1 -i ../flex-&flex-version;-debian_fixes-2.patch</userinput></screen>
-<para>Touch the man-page:</para>
+<para>The GNU autotools detects that the Flex source code has been
+modified by the previous patch and tries to update the manual page
+accordingly. This does not work correctly on many systems, and the
+default page is fine, so make sure it does not get regenerated:</para>
<screen><userinput>touch doc/flex.1</userinput></screen>
-<para>Now prepare Flex for compilation:</para>
+<para>Prepare Flex for compilation:</para>
<screen><userinput>./configure --prefix=/usr</userinput></screen>
@@ -41,15 +51,21 @@
<para>To test the results, issue:
<userinput>make check</userinput>.</para>
-<para>Now install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<para>Create a symlink:</para>
+<para>There are some packages that expect to find the
+<filename class="libraryfile">lex</filename> library in <filename
+class="directory">/usr/lib</filename>. Create a symlink to account for
+this:</para>
<screen><userinput>ln -s libfl.a /usr/lib/libl.a</userinput></screen>
-<para>Create a lex script:</para>
+<para>A few programs do not know about <command>flex</command> yet and
+try to run its predecessor, <command>lex</command>. To support those
+programs, create a wrapper script named <filename>lex</filename> that
+calls <filename>flex</filename> in <command>lex</command> emulation mode:</para>
<screen><userinput>cat &gt; /usr/bin/lex &lt;&lt; "EOF"
<literal>#!/bin/sh
@@ -66,8 +82,54 @@ chmod 755 /usr/bin/lex</userinput></screen>
<sect2 id="contents-flex" role="content"><title>Contents of Flex</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed library</segtitle>
+<seglistitem><seg>flex, flex++ (link to flex), and lex</seg>
+<seg>libfl.a</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="flex">
+<term><command>flex</command></term>
+<listitem>
+<para>A tool for generating programs that recognize patterns in text;
+it allows for the versatility to specify the rules for
+pattern-finding, eradicating the need to develop a specialized
+program</para>
+<indexterm zone="ch-system-flex flex"><primary sortas="b-flex">flex</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="flex-">
+<term><command>flex++</command></term>
+<listitem>
+<para>Invokes a version of <command>flex</command> that is used exclusively for C++ scanners</para>
+<indexterm zone="ch-system-flex flex-"><primary sortas="b-flex++">flex++</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="lex">
+<term><command>lex</command></term>
+<listitem>
+<para>Script that runs <command>flex</command> in <command>lex</command>
+emulation mode</para>
+<indexterm zone="ch-system-flex lex"><primary sortas="b-lex">lex</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libfl.a">
+<term><filename class="libraryfile">libfl.a</filename></term>
+<listitem>
+<para>The <filename class="libraryfile">flex</filename> library</para>
+<indexterm zone="ch-system-flex libfl.a"><primary sortas="c-libfl.a">libfl.a</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/gawk.xml b/chapter06/gawk.xml
index 02d6cd526..c9968b531 100644
--- a/chapter06/gawk.xml
+++ b/chapter06/gawk.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-gawk" xreflabel="Gawk" role="wrap">
+<sect1 id="ch-system-gawk" role="wrap">
<title>Gawk-&gawk-version;</title>
<?dbhtml filename="gawk.html"?>
<indexterm zone="ch-system-gawk"><primary sortas="a-Gawk">Gawk</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Gawk package contains programs for manipulating text files.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +18,11 @@
<seglistitem><seg>0.2 SBU</seg><seg>17 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Gawk installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils,
+Diffutils, GCC, Gettext, Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -33,7 +39,7 @@
<para>To test the results, issue:
<userinput>make check</userinput>.</para>
-<para>Now install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -42,8 +48,82 @@
<sect2 id="contents-gawk" role="content"><title>Contents of Gawk</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>awk (link to gawk), gawk, gawk-&gawk-version;, grcat, igawk,
+pgawk, pgawk-&gawk-version;, and pwcat</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="awk">
+<term><command>awk</command></term>
+<listitem>
+<para>A link to <command>gawk</command></para>
+<indexterm zone="ch-system-gawk awk"><primary sortas="b-awk">awk</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="gawk">
+<term><command>gawk</command></term>
+<listitem>
+<para>A program for manipulating text files; it is the GNU
+implementation of <command>awk</command></para>
+<indexterm zone="ch-system-gawk gawk"><primary sortas="b-gawk">gawk</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="gawk-version">
+<term><command>gawk-&gawk-version;</command></term>
+<listitem>
+<para>A hard link to <command>gawk</command></para>
+<indexterm zone="ch-system-gawk gawk-version"><primary sortas="b-gawk-&gawk-version;">gawk-&gawk-version;</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="grcat">
+<term><command>grcat</command></term>
+<listitem>
+<para>Dumps the group database <filename>/etc/group</filename></para>
+<indexterm zone="ch-system-gawk grcat"><primary sortas="b-grcat">grcat</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="igawk">
+<term><command>igawk</command></term>
+<listitem>
+<para>Gives <command>gawk</command> the ability to include files</para>
+<indexterm zone="ch-system-gawk igawk"><primary sortas="b-igawk">igawk</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pgawk">
+<term><command>pgawk</command></term>
+<listitem>
+<para>The profiling version of <command>gawk</command></para>
+<indexterm zone="ch-system-gawk pgawk"><primary sortas="b-pgawk">pgawk</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pgawk-version">
+<term><command>pgawk-&gawk-version;</command></term>
+<listitem>
+<para>Hard link to <command>pgawk</command></para>
+<indexterm zone="ch-system-gawk pgawk-version"><primary sortas="b-pgawk-&gawk-version;">pgawk-&gawk-version;</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pwcat">
+<term><command>pwcat</command></term>
+<listitem>
+<para>Dumps the password database <filename>/etc/passwd</filename></para>
+<indexterm zone="ch-system-gawk pwcat"><primary sortas="b-pwcat">pwcat</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml
index bb0e6a172..4015b693a 100644
--- a/chapter06/gcc.xml
+++ b/chapter06/gcc.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-gcc" xreflabel="GCC" role="wrap">
+<sect1 id="ch-system-gcc" role="wrap">
<title>GCC-&gcc-version;</title>
<?dbhtml filename="gcc.html"?>
<indexterm zone="ch-system-gcc"><primary sortas="a-GCC">GCC</primary></indexterm>
<sect2 role="package"><title/>
+<para>The GCC package contains the GNU compiler collection, which includes
+the C and C++ compilers.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,29 +19,54 @@
<seglistitem><seg>11.7 SBU</seg><seg>294 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>GCC installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils, Findutils,
+Gawk, Gettext, Glibc, Grep, Make, Perl, Sed, and Texinfo</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of GCC</title>
-<para>Apply a patch:</para>
+<para>This package is known to have issues when its default
+optimization flags (including the <parameter>-march</parameter> and
+<parameter>-mcpu</parameter> options) are changed. If any environment
+variables that override default optimizations have been defined, such
+as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
+unset them when building GCC.</para>
+
+<para>Unpack both the gcc-core and the gcc-g++ tarballs&mdash;they will
+unpack into the same directory. Likewise, extract the gcc-testsuite
+package. The full GCC package contains additional compilers.
+Instructions for building these can be found at <ulink
+url="&blfs-root;view/svn/general/gcc.html"/>.</para>
+
+<para>Apply only the No-Fixincludes patch (not the Specs patch) also
+used in the previous chapter:</para>
<screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes-1.patch</userinput></screen>
-<para>Apply another patch:</para>
+<para>GCC fails to compile some packages outside of a base Linux From Scratch
+install (e.g., Mozilla and kdegraphics) when used in conjunction with newer
+versions of Binutils. Apply the following patch to fix this issue:</para>
<screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-linkonce-1.patch</userinput></screen>
-<para>Apply a sed substitution:</para>
+<para>Apply a sed substitution that will suppress the installation of
+<filename class="libraryfile">libiberty.a</filename>. The version of
+<filename class="libraryfile">libiberty.a</filename> provided by
+Binutils will be used instead:</para>
<screen><userinput>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</userinput></screen>
-<para>Create a build directory:</para>
+<para>The GCC documentation recommends building GCC outside of the source
+directory in a dedicated build directory:</para>
<screen><userinput>mkdir ../gcc-build
cd ../gcc-build</userinput></screen>
-<para>Now prepare GCC for compilation:</para>
+<para>Prepare GCC for compilation:</para>
<screen><userinput>../gcc-&gcc-version;/configure --prefix=/usr \
--libexecdir=/usr/lib --enable-shared \
@@ -50,35 +77,140 @@ cd ../gcc-build</userinput></screen>
<screen><userinput>make</userinput></screen>
-<para>Test the results):</para>
+<important><para>In this section, the test suite for GCC is considered
+critical. Do not skip it under any circumstance.</para></important>
+
+<para>Test the results, but do not stop at errors:</para>
<screen><userinput>make -k check</userinput></screen>
-<para>The test suite notes from <xref linkend="ch-tools-gcc-pass2"/> are still very
-much appropriate here.</para>
+<para>Some of the errors are known issues and were noted in the
+previous chapter. The test suite notes from <xref
+linkend="ch-tools-gcc-pass2" role=","/> are still relevant here. Be sure to
+refer back to them as necessary.</para>
-<para>Now install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<para>Create this symlink:</para>
+<para>Some packages expect the C PreProcessor to be installed in the
+<filename class="directory">/lib</filename> directory.
+To support those packages, create this symlink:</para>
<screen><userinput>ln -s ../usr/bin/cpp /lib</userinput></screen>
-<para>Create another symlink:</para>
+<para>Many packages use the name <command>cc</command> to call the C
+compiler. To satisfy those packages, create a symlink:</para>
<screen><userinput>ln -s gcc /usr/bin/cc</userinput></screen>
-<note><para>Refer back to <xref linkend="ch-system-readjusting"/>
-and repeat the check.</para></note>
+<note><para>At this point, it is strongly recommended to repeat the
+sanity check performed earlier in this chapter. Refer back to <xref
+linkend="ch-system-readjusting" role=","/> and repeat the check. If the results
+are in error, then the most likely reason is that the GCC Specs patch
+from <xref linkend="chapter-temporary-tools"/> was erroneously applied
+here.</para></note>
</sect2>
<sect2 id="contents-gcc" role="content"><title>Contents of GCC</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed libraries</segtitle>
+<seglistitem><seg>c++, cc (link to gcc), cpp, g++, gcc, gccbug, and
+gcov</seg>
+<seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libstdc++.[a,so], and libsupc++.a</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="cc">
+<term><command>cc</command></term>
+<listitem>
+<para>The C compiler</para>
+<indexterm zone="ch-system-gcc cc"><primary sortas="b-cc">cc</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="cpp">
+<term><command>cpp</command></term>
+<listitem>
+<para>The C preprocessor; it is used by the compiler to expand the
+#include, #define, and similar statements in the source files</para>
+<indexterm zone="ch-system-gcc cpp"><primary sortas="b-cpp">cpp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="c">
+<term><command>c++</command></term>
+<listitem>
+<para>The C++ compiler</para>
+<indexterm zone="ch-system-gcc c"><primary sortas="b-c++">c++</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="g">
+<term><command>g++</command></term>
+<listitem>
+<para>The C++ compiler</para>
+<indexterm zone="ch-system-gcc g"><primary sortas="b-g++">g++</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="gcc">
+<term><command>gcc</command></term>
+<listitem>
+<para>The C compiler</para>
+<indexterm zone="ch-system-gcc gcc"><primary sortas="b-gcc">gcc</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="gccbug">
+<term><command>gccbug</command></term>
+<listitem>
+<para>A shell script used to help create useful bug reports</para>
+<indexterm zone="ch-system-gcc gccbug"><primary sortas="b-gccbug">gccbug</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="gcov">
+<term><command>gcov</command></term>
+<listitem>
+<para>A coverage testing tool; it is used to analyze programs to
+determine where optimizations will have the most effect</para>
+<indexterm zone="ch-system-gcc gcov"><primary sortas="b-gcov">gcov</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libgcc">
+<term><filename class="libraryfile">libgcc</filename></term>
+<listitem>
+<para>Contains run-time support for <command>gcc</command></para>
+<indexterm zone="ch-system-gcc libgcc"><primary sortas="c-libgcc*">libgcc*</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libstdc">
+<term><filename class="libraryfile">libstdc++</filename></term>
+<listitem>
+<para>The standard C++ library</para>
+<indexterm zone="ch-system-gcc libstdc"><primary sortas="c-libstdc++">libstdc++</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libsupc">
+<term><filename class="libraryfile">libsupc++</filename></term>
+<listitem>
+<para>Provides supporting routines for the C++ programming language</para>
+<indexterm zone="ch-system-gcc libsupc"><primary sortas="c-libsupc++">libsupc++</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/gettext.xml b/chapter06/gettext.xml
index 04e6b233e..50d338227 100644
--- a/chapter06/gettext.xml
+++ b/chapter06/gettext.xml
@@ -3,13 +3,16 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-gettext" xreflabel="Gettext" role="wrap">
+<sect1 id="ch-system-gettext" role="wrap">
<title>Gettext-&gettext-version;</title>
<?dbhtml filename="gettext.html"?>
<indexterm zone="ch-system-gettext"><primary sortas="a-Gettext">Gettext</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Gettext package contains utilities for internationalization and
+localization. These allow programs to be compiled with NLS, enabling them
+to output messages in the user's native language.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +20,11 @@
<seglistitem><seg>0.5 SBU</seg><seg>55 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Gettext installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Bison, Coreutils,
+Diffutils, Gawk, GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -31,9 +39,10 @@
<screen><userinput>make</userinput></screen>
<para>To test the results, issue:
-<userinput>make check</userinput>.</para>
+<userinput>make check</userinput>. This takes a very long time, around
+7 SBUs.</para>
-<para>Now install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -42,8 +51,257 @@
<sect2 id="contents-gettext" role="content"><title>Contents of Gettext</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed libraries</segtitle>
+<seglistitem><seg>autopoint, config.charset, config.rpath, envsubst, gettext,
+gettextize, hostname, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen,
+msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq,
+ngettext, and xgettext</seg>
+<seg>libasprintf[a,so], libgettextlib[a,so], libgettextpo[a,so] and libgettextsrc[a,so]</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="autopoint">
+<term><command>autopoint</command></term>
+<listitem>
+<para>Copies standard Gettext infrastructure files into a source package</para>
+<indexterm zone="ch-system-gettext autopoint"><primary sortas="b-autopoint">autopoint</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="config.charset">
+<term><command>config.charset</command></term>
+<listitem>
+<para>Outputs a system-dependent table of character encoding aliases</para>
+<indexterm zone="ch-system-gettext config.charset"><primary sortas="b-config.charset">config.charset</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="config.rpath">
+<term><command>config.rpath</command></term>
+<listitem>
+<para>Outputs a system-dependent set of variables, describing how to set the
+runtime search path of shared libraries in an executable</para>
+<indexterm zone="ch-system-gettext config.rpath"><primary sortas="b-config.rpath">config.rpath</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="envsubst">
+<term><command>envsubst</command></term>
+<listitem>
+<para>Substitutes environment variables in shell format strings</para>
+<indexterm zone="ch-system-gettext envsubst"><primary sortas="b-envsubst">envsubst</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="gettext">
+<term><command>gettext</command></term>
+<listitem>
+<para>Translates a natural language message into the user's language
+by looking up the translation in a message catalog</para>
+<indexterm zone="ch-system-gettext gettext"><primary sortas="b-gettext">gettext</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="gettextize">
+<term><command>gettextize</command></term>
+<listitem>
+<para>Copies all standard Gettext files into the given top-level
+directory of a package to begin internationalizing it</para>
+<indexterm zone="ch-system-gettext gettextize"><primary sortas="b-gettextize">gettextize</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hostname-gettext">
+<term><command>hostname</command></term>
+<listitem>
+<para>Displays a network hostname in various forms</para>
+<indexterm zone="ch-system-gettext hostname-gettext"><primary sortas="b-hostname-gettext">hostname</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="msgattrib">
+<term><command>msgattrib</command></term>
+<listitem>
+<para>Filters the messages of a translation catalog according to their
+attributes and manipulates the attributes</para>
+<indexterm zone="ch-system-gettext msgattrib"><primary sortas="b-msgattrib">msgattrib</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="msgcat">
+<term><command>msgcat</command></term>
+<listitem>
+<para>Concatenates and merges the given <filename class="extension">.po</filename> files</para>
+<indexterm zone="ch-system-gettext msgcat"><primary sortas="b-msgcat">msgcat</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="msgcmp">
+<term><command>msgcmp</command></term>
+<listitem>
+<para>Compares two <filename class="extension">.po</filename>
+files to check that both contain the same set of msgid strings</para>
+<indexterm zone="ch-system-gettext msgcmp"><primary sortas="b-msgcmp">msgcmp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="msgcomm">
+<term><command>msgcomm</command></term>
+<listitem>
+<para>Finds the messages that are common to
+to the given <filename class="extension">.po</filename> files</para>
+<indexterm zone="ch-system-gettext msgcomm"><primary sortas="b-msgcomm">msgcomm</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="msgconv">
+<term><command>msgconv</command></term>
+<listitem>
+<para>Converts a translation catalog to a different character encoding</para>
+<indexterm zone="ch-system-gettext msgconv"><primary sortas="b-msgconv">msgconv</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="msgen">
+<term><command>msgen</command></term>
+<listitem>
+<para>Creates an English translation catalog</para>
+<indexterm zone="ch-system-gettext msgen"><primary sortas="b-msgen">msgen</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="msgexec">
+<term><command>msgexec</command></term>
+<listitem>
+<para>Applies a command to all translations of a translation catalog</para>
+<indexterm zone="ch-system-gettext msgexec"><primary sortas="b-msgexec">msgexec</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="msgfilter">
+<term><command>msgfilter</command></term>
+<listitem>
+<para>Applies a filter to all translations of a translation catalog</para>
+<indexterm zone="ch-system-gettext msgfilter"><primary sortas="b-msgfilter">msgfilter</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="msgfmt">
+<term><command>msgfmt</command></term>
+<listitem>
+<para>Generates a binary message catalog from from a translation catalog</para>
+<indexterm zone="ch-system-gettext msgfmt"><primary sortas="b-msgfmt">msgfmt</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="msggrep">
+<term><command>msggrep</command></term>
+<listitem>
+<para>Extracts all messages of a translation catalog that match a
+given pattern or belong to some given source files</para>
+<indexterm zone="ch-system-gettext msggrep"><primary sortas="b-msggrep">msggrep</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="msginit">
+<term><command>msginit</command></term>
+<listitem>
+<para>Creates a new <filename class="extension">.po</filename> file, initializing the meta
+information with values from the user's environment</para>
+<indexterm zone="ch-system-gettext msginit"><primary sortas="b-msginit">msginit</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="msgmerge">
+<term><command>msgmerge</command></term>
+<listitem>
+<para>Combines two raw translations into a single file</para>
+<indexterm zone="ch-system-gettext msgmerge"><primary sortas="b-msgmerge">msgmerge</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="msgunfmt">
+<term><command>msgunfmt</command></term>
+<listitem>
+<para>Decompiles a binary message catalog into raw translation text</para>
+<indexterm zone="ch-system-gettext msgunfmt"><primary sortas="b-msgunfmt">msgunfmt</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="msguniq">
+<term><command>msguniq</command></term>
+<listitem>
+<para>Unifies duplicate translations in a translation catalog</para>
+<indexterm zone="ch-system-gettext msguniq"><primary sortas="b-msguniq">msguniq</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ngettext">
+<term><command>ngettext</command></term>
+<listitem>
+<para>Displays native language translations of a textual message whose
+grammatical form depends on a number</para>
+<indexterm zone="ch-system-gettext ngettext"><primary sortas="b-ngettext">ngettext</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="xgettext">
+<term><command>xgettext</command></term>
+<listitem>
+<para>Extracts the translatable message lines from the given source
+files to make the first translation template</para>
+<indexterm zone="ch-system-gettext xgettext"><primary sortas="b-xgettext">xgettext</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libasprintf">
+<term><filename class="libraryfile">libasprintf</filename></term>
+<listitem>
+<para>defines the <emphasis>autosprintf</emphasis> class, which makes
+C formatted output routines usable in C++ programs, for use with the
+<emphasis>&lt;string&gt;</emphasis> strings and the
+<emphasis>&lt;iostream&gt;</emphasis> streams</para>
+<indexterm zone="ch-system-gettext libasprintf"><primary sortas="c-libasprintf">libasprintf</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libgettextlib">
+<term><filename class="libraryfile">libgettextlib</filename></term>
+<listitem>
+<para>a private library containing common routines used by the various Gettext
+programs; these are not intended for general use</para>
+<indexterm zone="ch-system-gettext libgettextlib"><primary sortas="c-libgettextlib">libgettextlib</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libgettextpo">
+<term><filename class="libraryfile">libgettextpo</filename></term>
+<listitem>
+<para>Used to write specialized programs that process <filename
+class="extension">.po</filename> files; this library is used when the
+standard applications shipped with Gettext (such as
+<command>msgcomm</command>, <command>msgcmp</command>,
+<command>msgattrib</command>, and <command>msgen</command>) will not
+suffice</para>
+<indexterm zone="ch-system-gettext libgettextpo"><primary sortas="c-libgettextpo">libgettextpo</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libgettextsrc">
+<term><filename class="libraryfile">libgettextsrc</filename></term>
+<listitem>
+<para>A private library containing common routines used by the various Gettext
+programs; these are not intended for general use</para>
+<indexterm zone="ch-system-gettext libgettextsrc"><primary sortas="c-libgettextsrc">libgettextsrc</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml
index c2bd6519c..8e7732795 100644
--- a/chapter06/glibc.xml
+++ b/chapter06/glibc.xml
@@ -3,13 +3,17 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-glibc" xreflabel="Glibc" role="wrap">
+<sect1 id="ch-system-glibc" role="wrap">
<title>Glibc-&glibc-version;</title>
<?dbhtml filename="glibc.html"?>
<indexterm zone="ch-system-glibc"><primary sortas="a-Glibc">Glibc</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Glibc package contains the main C library. This library provides
+the basic routines for allocating memory, searching directories, opening and
+closing files, reading and writing files, string handling, pattern matching,
+arithmetic, and so on.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,56 +21,131 @@
<seglistitem><seg>12.3 SBU</seg><seg>784 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Glibc installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+Gawk, GCC, Gettext, Grep, Make, Perl, Sed, and Texinfo</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Glibc</title>
-<para>The linuxthreads tarball contains the man pages for the threading
-libraries installed by glibc. Unpack the tarball from within the glibc source
-directory:</para>
+<para>This package is known to have issues when its default
+optimization flags (including the <parameter>-march</parameter> and
+<parameter>-mcpu</parameter> options) are changed. If any environment
+variables that override default optimizations have been defined, such
+as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
+unset them when building Glibc.</para>
+
+<para>The Glibc build system is self-contained and will install
+perfectly, even though the compiler specs file and linker are still
+pointing at <filename class="directory">/tools</filename>. The specs
+and linker cannot be adjusted before the Glibc install because the
+Glibc autoconf tests would give false results and defeat the goal
+of achieving a clean build.</para>
-<screen><userinput>tar xjvf ../glibc-linuxthreads-&glibc-version;.tar.bz2</userinput></screen>
+<para>The linuxthreads tarball contains the man pages for the
+threading libraries installed by glibc. Unpack the tarball from
+within the glibc source directory:</para>
-<para>Create a build directory:</para>
+<screen><userinput>tar xjvf /sources/glibc-linuxthreads-&glibc-version;.tar.bz2</userinput></screen>
+
+<para>The Glibc documentation recommends building Glibc outside of the source
+directory in a dedicated build directory:</para>
<screen><userinput>mkdir ../glibc-build
cd ../glibc-build</userinput></screen>
-<para>Now prepare Glibc for compilation:</para>
+<para>Prepare Glibc for compilation:</para>
<screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
--disable-profile --enable-add-ons \
--enable-kernel=2.6.0 --without-cvs \
--libexecdir=/usr/lib/glibc</userinput></screen>
+<para>The meaning of the new configure option:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--libexecdir=/usr/lib/glibc</parameter></term>
+<listitem><para>This changes the location of the
+<command>pt_chown</command> program from its default of <filename
+class="directory">/usr/libexec</filename> to <filename
+class="directory">/usr/lib/glibc</filename>.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
+<important><para>In this section, the test suite for Glibc is
+considered critical. Do not skip it under any
+circumstance.</para></important>
+
<para>Test the results:</para>
<screen><userinput>make check</userinput></screen>
-<para>The Glibc test suite is highly dependent on certain functions of your host
-system. See testing for explanations.</para>
-
-<para>Fix an annoying little warning with:</para>
+<para>The Glibc test suite is highly dependent on certain functions of
+the host system, in particular the kernel. In general, the Glibc test
+suite is always expected to pass. However, in certain circumstances,
+some failures are unavoidable. This is a list of the most common
+issues:</para>
+
+<itemizedlist>
+<listitem><para>The <emphasis>math</emphasis> tests sometimes fail when running
+on systems where the CPU is not a relatively new genuine Intel or authentic AMD.
+Certain optimization settings are also known to be a factor here.</para></listitem>
+
+<listitem><para>The <emphasis>gettext</emphasis> test sometimes fails due to
+host system issues. The exact reasons are not yet clear.</para></listitem>
+
+<listitem><para>The <emphasis>atime</emphasis> test sometimes fails
+when the LFS partition is mounted with the
+<parameter>noatime</parameter> option.</para></listitem>
+
+<listitem><para>The <emphasis>shm</emphasis> test can fail when the
+host system is using the <systemitem
+class="filesystem">devfs</systemitem> file system but does not have
+the <systemitem class="filesystem">tmpfs</systemitem> file system
+mounted at <filename class="directory">/dev/shm</filename>. This
+occurs because of a lack of support for <systemitem
+class="filesystem">tmpfs</systemitem> in the
+kernel.</para></listitem>
+
+<listitem><para>When running on older and slower hardware, some tests
+can fail because of test timeouts being exceeded.</para></listitem>
+</itemizedlist>
+
+<para>Though it is a harmless message, the install stage of Glibc will
+complain about the absence of <filename>/etc/ld.so.conf</filename>.
+Prevent this warning with:</para>
<screen><userinput>touch /etc/ld.so.conf</userinput></screen>
-<para>And install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<para>To install the Glibc locales, use the following
-command:</para>
+<para>The locales that can make the system respond in a different
+language were not installed by the above command. Install this
+with:</para>
<screen><userinput>make localedata/install-locales</userinput></screen>
-<para>An alternative to running the previous command is to install only those
-locales which you need or want. The following instructions, instead of the
-install-locales target above, will install the minimum set of locales necessary
+<para>To save time, an alternative to running the
+previous command (which generates and installs every locale Glibc is
+aware of) is to install only those locales that are wanted and needed.
+This can be achieved by using the <command>localedef</command>
+command. Information on this command is located in the
+<filename>INSTALL</filename> file in the Glibc source. However, there
+are a number of locales that are essential in order for the tests of
+future packages to pass, in particular, the
+<emphasis>libstdc++</emphasis> tests from GCC. The following
+instructions, instead of the <parameter>install-locales</parameter>
+target used above, will install the minimum set of locales necessary
for the tests to run successfully:</para>
<screen><userinput>mkdir -p /usr/lib/locale
@@ -82,18 +161,40 @@ localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
localedef -i it_IT -f ISO-8859-1 it_IT
localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen>
-<para>Build the linuxthreads man pages:</para>
+<para>Some locales installed by the <command>make
+localedata/install-locales</command> command above are not properly
+supported by some applications that are in the LFS and BLFS books.
+Because of the various problems that arise due to application
+programmers making assumptions that break in such locales, LFS should
+not be used in locales that utilize multibyte character sets
+(including UTF-8) or right-to-left writing order. Numerous unofficial
+and unstable patches are required to fix these problems, and it has
+been decided by the LFS developers not to support such complex locales. This applies to the
+ja_JP and fa_IR locales as well&mdash;they have been installed only for
+GCC and Gettext tests to pass, and the <command>watch</command> program
+(part of the Procps package) does not work properly in them. Various
+attempts to circumvent these restrictions are documented in
+internationalization-related hints.</para>
+
+<para>Build the linuxthreads man pages, which are a great reference
+on the threading API (applicable to NPTL as well):</para>
<screen><userinput>make -C ../glibc-&glibc-version;/linuxthreads/man</userinput></screen>
-<para>And install these pages:</para>
+<para>Install these pages:</para>
<screen><userinput>make -C ../glibc-&glibc-version;/linuxthreads/man install</userinput></screen>
</sect2>
-
<sect2 id="conf-glibc" role="configuration"><title>Configuring Glibc</title>
+<indexterm zone="conf-glibc"><primary sortas="e-/etc/nsswitch.conf">/etc/nsswitch.conf</primary></indexterm>
+<indexterm zone="conf-glibc"><primary sortas="e-/etc/localtime">/etc/localtime</primary></indexterm>
+
+<para>The <filename>/etc/nsswitch.conf</filename> file needs to be
+created because, although Glibc provides defaults when this file is
+missing or corrupt, the Glibc defaults do not work well with
+networking. The time zone also needs to be set up.</para>
<para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
following:</para>
@@ -116,20 +217,56 @@ rpc: files
# End /etc/nsswitch.conf</literal>
EOF</userinput></screen>
-<para>To find out what time zone you're in, run the following script:</para>
+<para>To determine the local time zone, run the following script:</para>
<screen><userinput>tzselect</userinput></screen>
-<para>Then create the <filename>/etc/localtime</filename> file by running:</para>
+<para>After answering a few questions about the location, the script
+will output the name of the time zone (e.g.,
+<emphasis>EST5EDT</emphasis> or <emphasis>Canada/Eastern</emphasis>).
+Then create the <filename>/etc/localtime</filename> file by
+running:</para>
<screen><userinput>cp --remove-destination /usr/share/zoneinfo/<replaceable>[xxx]</replaceable> \
/etc/localtime</userinput></screen>
+<para>Replace <replaceable>[xxx]</replaceable> with the name of the time zone that the
+<command>tzselect</command> provided (e.g., Canada/Eastern).</para>
+
+<para>The meaning of the cp option:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--remove-destination</parameter></term>
+<listitem><para>This is needed to force removal of the already
+existing symbolic link. The reason for copying the file instead of
+using a symlink is to cover the situation where <filename
+class="directory">/usr</filename> is on a separate partition. This
+could be important when booted into single user
+mode.</para></listitem>
+</varlistentry>
+</variablelist>
+
</sect2>
<sect2 id="conf-ld" role="configuration">
<title>Configuring Dynamic Loader</title>
+<indexterm zone="conf-ld"><primary sortas="e-/etc/ld.so.conf">/etc/ld.so.conf</primary></indexterm>
+
+<para>By default, the dynamic loader (<filename
+class="libraryfile">/lib/ld-linux.so.2</filename>) searches through
+<filename class="directory">/lib</filename> and <filename
+class="directory">/usr/lib</filename> for dynamic libraries that are
+needed by programs as they are run. However, if there are libraries in
+directories other than <filename class="directory">/lib</filename> and
+<filename class="directory">/usr/lib</filename>, these need to be
+added to the <filename>/etc/ld.so.conf</filename> file in order
+for the dynamic loader to find them. Two directories that are commonly
+known to contain additional libraries are <filename
+class="directory">/usr/local/lib</filename> and <filename
+class="directory">/opt/lib</filename>, so add those directories to the
+dynamic loader's search path.</para>
<para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
following:</para>
@@ -145,11 +282,413 @@ EOF</userinput></screen>
</sect2>
-
<sect2 id="contents-glibc" role="content"><title>Contents of Glibc</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed libraries</segtitle>
+<seglistitem><seg>catchsegv, gencat, getconf,
+getent, iconv, iconvconfig, ldconfig, ldd, lddlibc4, locale,
+localedef, mtrace, nscd, nscd_nischeck, pcprofiledump, pt_chown, rpcgen,
+rpcinfo, sln, sprof, tzselect, xtrace, zdump, and zic</seg>
+<seg>ld.so, libBrokenLocale.[a,so],
+libSegFault.so, libanl.[a,so], libbsd-compat.a, libc.[a,so],
+libcrypt.[a,so], libdl.[a,so], libg.a, libieee.a, libm.[a,so], libmcheck.a,
+libmemusage.so, libnsl.a, libnss_compat.so, libnss_dns.so, libnss_files.so,
+libnss_hesiod.so, libnss_nis.so, libnss_nisplus.so, libpcprofile.so,
+libpthread.[a,so], libresolv.[a,so], librpcsvc.a, librt.[a,so],
+libthread_db.so, and libutil.[a,so]</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="catchsegv">
+<term><command>catchsegv</command></term>
+<listitem>
+<para>Can be used to create a stack trace when a program
+terminates with a segmentation fault</para>
+<indexterm zone="ch-system-glibc catchsegv"><primary sortas="b-catchsegv">catchsegv</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="gencat">
+<term><command>gencat</command></term>
+<listitem>
+<para>Generates message catalogues</para>
+<indexterm zone="ch-system-glibc gencat"><primary sortas="b-gencat">gencat</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="getconf">
+<term><command>getconf</command></term>
+<listitem>
+<para>Displays the system configuration values for file system specific variables</para>
+<indexterm zone="ch-system-glibc getconf"><primary sortas="b-getconf">getconf</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="getent">
+<term><command>getent</command></term>
+<listitem>
+<para>Gets entries from an administrative database</para>
+<indexterm zone="ch-system-glibc getent"><primary sortas="b-getent">getent</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="iconv">
+<term><command>iconv</command></term>
+<listitem>
+<para>Performs character set conversion</para>
+<indexterm zone="ch-system-glibc iconv"><primary sortas="b-iconv">iconv</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="iconvconfig">
+<term><command>iconvconfig</command></term>
+<listitem>
+<para>Creates fastloading <command>iconv</command> module configuration files</para>
+<indexterm zone="ch-system-glibc iconvconfig"><primary sortas="b-iconvconfig">iconvconfig</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ldconfig">
+<term><command>ldconfig</command></term>
+<listitem>
+<para>Configures the dynamic linker runtime bindings</para>
+<indexterm zone="ch-system-glibc ldconfig"><primary sortas="b-ldconfig">ldconfig</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ldd">
+<term><command>ldd</command></term>
+<listitem>
+<para>Reports which shared libraries are required
+by each given program or shared library</para>
+<indexterm zone="ch-system-glibc ldd"><primary sortas="b-ldd">ldd</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="lddlibc4">
+<term><command>lddlibc4</command></term>
+<listitem>
+<para>Assists <command>ldd</command> with object files</para>
+<indexterm zone="ch-system-glibc lddlibc4"><primary sortas="b-lddlibc4">lddlibc4</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="locale">
+<term><command>locale</command></term>
+<listitem>
+<para>Tells the compiler to enable or disable the use of POSIX locales
+for built-in operations</para>
+<indexterm zone="ch-system-glibc locale"><primary sortas="b-locale">locale</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="localedef">
+<term><command>localedef</command></term>
+<listitem>
+<para>Compiles locale specifications</para>
+<indexterm zone="ch-system-glibc localedef"><primary sortas="b-localedef">localedef</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mtrace">
+<term><command>mtrace</command></term>
+<listitem>
+<para>Reads and interprets a memory trace file and
+ouputs a summary in human-readable format</para>
+<indexterm zone="ch-system-glibc mtrace"><primary sortas="b-mtrace">mtrace</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="nscd">
+<term><command>nscd</command></term>
+<listitem>
+<para>A daemon that provides a cache for the most common name
+service requests</para>
+<indexterm zone="ch-system-glibc nscd"><primary sortas="b-nscd">nscd</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="nscd_nischeck">
+<term><command>nscd_nischeck</command></term>
+<listitem>
+<para>Checks whether or not secure mode is necessary for NIS+ lookup</para>
+<indexterm zone="ch-system-glibc nscd_nischeck"><primary sortas="b-nscd_nischeck">nscd_nischeck</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pcprofiledump">
+<term><command>pcprofiledump</command></term>
+<listitem>
+<para>Dumps information generated by PC profiling</para>
+<indexterm zone="ch-system-glibc pcprofiledump"><primary sortas="b-pcprofiledump">pcprofiledump</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pt_chown">
+<term><command>pt_chown</command></term>
+<listitem>
+<para>A helper program for <command>grantpt</command> to set
+the owner, group and access permissions of a slave pseudo terminal</para>
+<indexterm zone="ch-system-glibc pt_chown"><primary sortas="b-pt_chown">pt_chown</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="rpcgen">
+<term><command>rpcgen</command></term>
+<listitem>
+<para>Generates C code to implement the Remote Procecure Call (RPC) protocol</para>
+<indexterm zone="ch-system-glibc rpcgen"><primary sortas="b-rpcgen">rpcgen</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="rpcinfo">
+<term><command>rpcinfo</command></term>
+<listitem>
+<para>Makes an RPC call to an RPC server</para>
+<indexterm zone="ch-system-glibc rpcinfo"><primary sortas="b-rpcinfo">rpcinfo</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="sln">
+<term><command>sln</command></term>
+<listitem>
+<para>A statically linked <command>ln</command> program</para>
+<indexterm zone="ch-system-glibc sln"><primary sortas="b-sln">sln</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="sprof">
+<term><command>sprof</command></term>
+<listitem>
+<para>Reads and displays shared object profiling data</para>
+<indexterm zone="ch-system-glibc sprof"><primary sortas="b-sprof">sprof</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tzselect">
+<term><command>tzselect</command></term>
+<listitem>
+<para>Asks the user about the location of the
+system and reports the corresponding time zone description</para>
+<indexterm zone="ch-system-glibc tzselect"><primary sortas="b-tzselect">tzselect</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="xtrace">
+<term><command>xtrace</command></term>
+<listitem>
+<para>Traces the execution of a program by
+printing the currently executed function</para>
+<indexterm zone="ch-system-glibc xtrace"><primary sortas="b-xtrace">xtrace</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="zdump">
+<term><command>zdump</command></term>
+<listitem>
+<para>The time zone dumper</para>
+<indexterm zone="ch-system-glibc zdump"><primary sortas="b-zdump">zdump</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="zic">
+<term><command>zic</command></term>
+<listitem>
+<para>The time zone compiler</para>
+<indexterm zone="ch-system-glibc zic"><primary sortas="b-zic">zic</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ld.so">
+<term><filename class="libraryfile">ld.so</filename></term>
+<listitem>
+<para>The helper program for shared library executables</para>
+<indexterm zone="ch-system-glibc ld.so"><primary sortas="c-ld.so">ld.so</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libBrokenLocale">
+<term><filename class="libraryfile">libBrokenLocale</filename></term>
+<listitem>
+<para>Used by programs, such as Mozilla, to solve broken locales</para>
+<indexterm zone="ch-system-glibc libBrokenLocale"><primary sortas="c-libBrokenLocale">libBrokenLocale</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libSegFault">
+<term><filename class="libraryfile">libSegFault</filename></term>
+<listitem>
+<para>The segmentation fault signal handler</para>
+<indexterm zone="ch-system-glibc libSegFault"><primary sortas="c-libSegFault">libSegFault</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libanl">
+<term><filename class="libraryfile">libanl</filename></term>
+<listitem>
+<para>An asynchronous name lookup library</para>
+<indexterm zone="ch-system-glibc libanl"><primary sortas="c-libanl">libanl</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libbsd-compat">
+<term><filename class="libraryfile">libbsd-compat</filename></term>
+<listitem>
+<para>Provides the portability needed
+in order to run certain Berkey Software Distribution (BSD) programs under Linux</para>
+<indexterm zone="ch-system-glibc libbsd-compat"><primary sortas="c-libbsd-compat">libbsd-compat</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libc">
+<term><filename class="libraryfile">libc</filename></term>
+<listitem>
+<para>The main C library</para>
+<indexterm zone="ch-system-glibc libc"><primary sortas="c-libc">libc</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libcrypt">
+<term><filename class="libraryfile">libcrypt</filename></term>
+<listitem>
+<para>The cryptography library</para>
+<indexterm zone="ch-system-glibc libcrypt"><primary sortas="c-libcrypt">libcrypt</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libdl">
+<term><filename class="libraryfile">libdl</filename></term>
+<listitem>
+<para>The dynamic linking interface library</para>
+<indexterm zone="ch-system-glibc libdl"><primary sortas="c-libdl">libdl</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libg">
+<term><filename class="libraryfile">libg</filename></term>
+<listitem>
+<para>A runtime library for <command>g++</command></para>
+<indexterm zone="ch-system-glibc libg"><primary sortas="c-libg">libg</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libieee">
+<term><filename class="libraryfile">libieee</filename></term>
+<listitem>
+<para>The Institute of Electrical and Electronic Engineers (IEEE) floating point library</para>
+<indexterm zone="ch-system-glibc libieee"><primary sortas="c-libieee">libieee</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libm">
+<term><filename class="libraryfile">libm</filename></term>
+<listitem>
+<para>The mathematical library</para>
+<indexterm zone="ch-system-glibc libm"><primary sortas="c-libm">libm</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libmcheck">
+<term><filename class="libraryfile">libmcheck</filename></term>
+<listitem>
+<para>Contains code run at boot</para>
+<indexterm zone="ch-system-glibc libmcheck"><primary sortas="c-libmcheck">libmcheck</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libmemusage">
+<term><filename class="libraryfile">libmemusage</filename></term>
+<listitem>
+<para>Used by <command>memusage</command> to help collect
+information about the memory usage of a program</para>
+<indexterm zone="ch-system-glibc libmemusage"><primary sortas="c-libmemusage">libmemusage</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libnsl">
+<term><filename class="libraryfile">libnsl</filename></term>
+<listitem>
+<para>The network services library</para>
+<indexterm zone="ch-system-glibc libnsl"><primary sortas="c-libnsl">libnsl</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libnss">
+<term><filename class="libraryfile">libnss</filename></term>
+<listitem>
+<para>The Name Service Switch libraries,
+containing functions for resolving host names, user names, group names,
+aliases, services, protocols, etc</para>
+<indexterm zone="ch-system-glibc libnss"><primary sortas="c-libnss">libnss</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libpcprofile">
+<term><filename class="libraryfile">libpcprofile</filename></term>
+<listitem>
+<para>Contains profiling functions used
+to track the amount of CPU time spent in specific source code lines</para>
+<indexterm zone="ch-system-glibc libpcprofile"><primary sortas="c-libpcprofile">libpcprofile</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libpthread">
+<term><filename class="libraryfile">libpthread</filename></term>
+<listitem>
+<para>The POSIX threads library</para>
+<indexterm zone="ch-system-glibc libpthread"><primary sortas="c-libpthread">libpthread</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libresolv">
+<term><filename class="libraryfile">libresolv</filename></term>
+<listitem>
+<para>Contains functions for creating,
+sending, and interpreting packets to the Internet domain name servers</para>
+<indexterm zone="ch-system-glibc libresolv"><primary sortas="c-libresolv">libresolv</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="librpcsvc">
+<term><filename class="libraryfile">librpcsvc</filename></term>
+<listitem>
+<para>Contains functions providing miscellaneous RPC services</para>
+<indexterm zone="ch-system-glibc librpcsvc"><primary sortas="c-librpcsvc">librpcsvc</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="librt">
+<term><filename class="libraryfile">librt</filename></term>
+<listitem>
+<para>Contains functions providing most of the
+interfaces specified by the POSIX.1b Realtime Extension</para>
+<indexterm zone="ch-system-glibc librt"><primary sortas="c-librt">librt</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libthread_db">
+<term><filename class="libraryfile">libthread_db</filename></term>
+<listitem>
+<para>Contains functions useful for
+building debuggers for multi-threaded programs</para>
+<indexterm zone="ch-system-glibc libthread_db"><primary sortas="c-libthread_db">libthread_db</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libutil">
+<term><filename class="libraryfile">libutil</filename></term>
+<listitem>
+<para>Contains code for <quote>standard</quote> functions used in many different Unix utilities</para>
+<indexterm zone="ch-system-glibc libutil"><primary sortas="c-libutil">libutil</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/grep.xml b/chapter06/grep.xml
index 2753ceca4..2a526d400 100644
--- a/chapter06/grep.xml
+++ b/chapter06/grep.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-grep" xreflabel="Grep" role="wrap">
+<sect1 id="ch-system-grep" role="wrap">
<title>Grep-&grep-version;</title>
<?dbhtml filename="grep.html"?>
<indexterm zone="ch-system-grep"><primary sortas="a-Grep">Grep</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Grep package contains programs for searching through files.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +18,11 @@
<seglistitem><seg>0.1 SBU</seg><seg>5.8 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Grep installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils,
+Diffutils, GCC, Gettext, Glibc, Make, Sed, and Texinfo</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -33,7 +39,7 @@
<para>To test the results, issue:
<userinput>make check</userinput>.</para>
-<para>Now install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -42,8 +48,40 @@
<sect2 id="contents-grep" role="content"><title>Contents of Grep</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>egrep (link to grep), fgrep (link to grep), and grep</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="egrep">
+<term><command>egrep</command></term>
+<listitem>
+<para>Prints lines matching an extended regular expression</para>
+<indexterm zone="ch-system-grep egrep"><primary sortas="b-egrep">egrep</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="fgrep">
+<term><command>fgrep</command></term>
+<listitem>
+<para>Prints lines matching a list of fixed strings</para>
+<indexterm zone="ch-system-grep fgrep"><primary sortas="b-fgrep">fgrep</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="grep">
+<term><command>grep</command></term>
+<listitem>
+<para>Prints lines matching a basic regular expression</para>
+<indexterm zone="ch-system-grep grep"><primary sortas="b-grep">grep</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/groff.xml b/chapter06/groff.xml
index eae23fc23..5289367b8 100644
--- a/chapter06/groff.xml
+++ b/chapter06/groff.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-groff" xreflabel="Groff" role="wrap">
+<sect1 id="ch-system-groff" role="wrap">
<title>Groff-&groff-version;</title>
<?dbhtml filename="groff.html"?>
<indexterm zone="ch-system-groff"><primary sortas="a-Groff">Groff</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Groff package contains programs for processing and formatting text.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,11 +18,21 @@
<seglistitem><seg>0.5 SBU</seg><seg>43 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Groff installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+Gawk, GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Groff</title>
+<para>Groff expects the environment variable <envar>PAGE</envar>
+to contain the default paper size. For users in the United States,
+<parameter>PAGE=letter</parameter> is appropriate. Elsewhere,
+<parameter>PAGE=A4</parameter> may be more suitable.</para>
+
<para>Prepare Groff for compilation:</para>
<screen><userinput>PAGE=<replaceable>[paper_size]</replaceable> ./configure --prefix=/usr</userinput></screen>
@@ -30,11 +41,12 @@
<screen><userinput>make</userinput></screen>
-<para>Now install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<para>Create the following symlinks:</para>
+<para>Some documentation programs, such as <command>xman</command>,
+will not work properly without the following symlinks:</para>
<screen><userinput>ln -s soelim /usr/bin/zsoelim
ln -s eqn /usr/bin/geqn
@@ -45,8 +57,315 @@ ln -s tbl /usr/bin/gtbl</userinput></screen>
<sect2 id="contents-groff" role="content"><title>Contents of Groff</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>addftinfo, afmtodit, eqn, eqn2graph, geqn (link to eqn), grn,
+grodvi, groff, groffer, grog, grolbp, grolj4, grops, grotty, gtbl (link to tbl), hpftodit,
+indxbib, lkbib, lookbib, mmroff, neqn, nroff, pfbtops, pic, pic2graph, post-grohtml,
+pre-grohtml, refer, soelim, tbl, tfmtodit, troff, and zsoelim (link to soelim)</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="addftinfo">
+<term><command>addftinfo</command></term>
+<listitem>
+<para>Reads a troff font file and adds some
+additional font-metric information that is used by the <command>groff</command> system</para>
+<indexterm zone="ch-system-groff addftinfo"><primary sortas="b-addftinfo">addftinfo</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="afmtodit">
+<term><command>afmtodit</command></term>
+<listitem>
+<para>Creates a font file for use with <command>groff</command> and <command>grops</command></para>
+<indexterm zone="ch-system-groff afmtodit"><primary sortas="b-afmtodit">afmtodit</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="eqn">
+<term><command>eqn</command></term>
+<listitem>
+<para>Compiles descriptions of equations embedded
+within troff input files into commands that are understood by <command>troff</command></para>
+<indexterm zone="ch-system-groff eqn"><primary sortas="b-eqn">eqn</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="eqn2graph">
+<term><command>eqn2graph</command></term>
+<listitem>
+<para>Converts a troff EQN (equation) into a cropped image</para>
+<indexterm zone="ch-system-groff eqn2graph"><primary sortas="b-eqn2graph">eqn2graph</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="geqn">
+<term><command>eqn</command></term>
+<listitem>
+<para>A link to <command>eqn</command></para>
+<indexterm zone="ch-system-groff geqn"><primary sortas="b-geqn">geqn</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="grn">
+<term><command>grn</command></term>
+<listitem>
+<para>A <command>groff</command> preprocessor for gremlin files</para>
+<indexterm zone="ch-system-groff grn"><primary sortas="b-grn">grn</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="grodvi">
+<term><command>grodvi</command></term>
+<listitem>
+<para>A driver for <command>groff</command> that produces TeX dvi format</para>
+<indexterm zone="ch-system-groff grodvi"><primary sortas="b-grodvi">grodvi</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="groff">
+<term><command>groff</command></term>
+<listitem>
+<para>A front-end to the groff document
+formatting system; normally, it runs the <command>troff</command> program and a post-processor
+appropriate for the selected device</para>
+<indexterm zone="ch-system-groff groff"><primary sortas="b-groff">groff</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="groffer">
+<term><command>groffer</command></term>
+<listitem>
+<para>Displays groff files and man pages on X and tty terminals</para>
+<indexterm zone="ch-system-groff groffer"><primary sortas="b-groffer">groffer</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="grog">
+<term><command>grog</command></term>
+<listitem>
+<para>Reads files and guesses which of the <command>groff</command>
+options <parameter>-e</parameter>, <parameter>-man</parameter>,
+<parameter>-me</parameter>, <parameter>-mm</parameter>,
+<parameter>-ms</parameter>, <parameter>-p</parameter>, <parameter>-s</parameter>,
+and <parameter>-t</parameter> are required for printing
+files, and reports the <command>groff</command> command including those options</para>
+<indexterm zone="ch-system-groff grog"><primary sortas="b-grog">grog</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="grolbp">
+<term><command>grolbp</command></term>
+<listitem>
+<para>Is a <command>groff</command> driver for Canon CAPSL printers
+(LBP-4 and LBP-8 series laser printers)</para>
+<indexterm zone="ch-system-groff grolbp"><primary sortas="b-grolbp">grolbp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="grolj4">
+<term><command>grolj4</command></term>
+<listitem>
+<para>Is a driver for <command>groff</command> that produces output
+in PCL5 format suitable for an HP Laserjet 4 printer</para>
+<indexterm zone="ch-system-groff grolj4"><primary sortas="b-grolj4">grolj4</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="grops">
+<term><command>grops</command></term>
+<listitem>
+<para>Translates the output of GNU <command>troff</command> to PostScript</para>
+<indexterm zone="ch-system-groff grops"><primary sortas="b-grops">grops</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="grotty">
+<term><command>grotty</command></term>
+<listitem>
+<para>Translates the output of GNU <command>troff</command> into
+a form suitable for typewriter-like devices</para>
+<indexterm zone="ch-system-groff grotty"><primary sortas="b-grotty">grotty</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="gtbl">
+<term><command>gtbl</command></term>
+<listitem>
+<para>Is the GNU implementation of <command>tbl</command></para>
+<indexterm zone="ch-system-groff gtbl"><primary sortas="b-gtbl">gtbl</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hpftodit">
+<term><command>hpftodit</command></term>
+<listitem>
+<para>Creates a font file for use with
+<command>groff -Tlj4</command> from an HP-tagged font metric file</para>
+<indexterm zone="ch-system-groff hpftodit"><primary sortas="b-hpftodit">hpftodit</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="indxbib">
+<term><command>indxbib</command></term>
+<listitem>
+<para>Creates an inverted index for the bibliographic databases with a specified file for
+use with <command>refer</command>, <command>lookbib</command>, and <command>lkbib</command></para>
+<indexterm zone="ch-system-groff indxbib"><primary sortas="b-indxbib">indxbib</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="lkbib">
+<term><command>lkbib</command></term>
+<listitem>
+<para>Searches bibliographic databases for references that contain
+specified keys and reports any references found</para>
+<indexterm zone="ch-system-groff lkbib"><primary sortas="b-lkbib">lkbib</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="lookbib">
+<term><command>lookbib</command></term>
+<listitem>
+<para>Prints a prompt on the standard error (unless the standard input
+is not a terminal), reads a line containing a
+set of keywords from the standard input, searches the bibliographic databases in a specified
+file for references containing those keywords, prints any references
+found on the standard output, and repeats this process until the end
+of input</para>
+<indexterm zone="ch-system-groff lookbib"><primary sortas="b-lookbib">lookbib</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mmroff">
+<term><command>mmroff</command></term>
+<listitem>
+<para>A simple preprocessor for <command>groff</command></para>
+<indexterm zone="ch-system-groff mmroff"><primary sortas="b-mmroff">mmroff</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="neqn">
+<term><command>neqn</command></term>
+<listitem>
+<para>Formats equations for American Standard Code for Information
+Interchange (ASCII) output</para>
+<indexterm zone="ch-system-groff neqn"><primary sortas="b-neqn">neqn</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="nroff">
+<term><command>nroff</command></term>
+<listitem>
+<para>A script that emulates the <command>nroff</command> command using <command>groff</command></para>
+<indexterm zone="ch-system-groff nroff"><primary sortas="b-nroff">nroff</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pfbtops">
+<term><command>pfbtops</command></term>
+<listitem>
+<para>Translates a PostScript font in <filename class="extension">.pfb</filename> format to ASCII</para>
+<indexterm zone="ch-system-groff pfbtops"><primary sortas="b-pfbtops">pfbtops</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pic">
+<term><command>pic</command></term>
+<listitem>
+<para>Compiles descriptions of pictures embedded
+within troff or TeX input files into commands understood by TeX or <command>troff</command></para>
+<indexterm zone="ch-system-groff pic"><primary sortas="b-pic">pic</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pic2graph">
+<term><command>pic2graph</command></term>
+<listitem>
+<para>Converts a PIC diagram into a cropped image</para>
+<indexterm zone="ch-system-groff pic2graph"><primary sortas="b-pic2graph">pic2graph</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="post-grohtml">
+<term><command>post-grohtml</command></term>
+<listitem>
+<para>Translates the output of GNU <command>troff</command> to html</para>
+<indexterm zone="ch-system-groff post-grohtml"><primary sortas="b-post-grohtml">post-grohtml</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pre-grohtml">
+<term><command>pre-grohtml </command></term>
+<listitem>
+<para>Translates the output of GNU <command>troff</command> to html</para>
+<indexterm zone="ch-system-groff pre-grohtml"><primary sortas="b-pre-grohtml">pre-grohtml</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="refer">
+<term><command>refer</command></term>
+<listitem>
+<para>Copies the contents of a file to the standard output, except
+that lines between <emphasis>.[</emphasis> and <emphasis>.]</emphasis>
+are interpreted as citations, and lines between
+<emphasis>.R1</emphasis> and <emphasis>.R2</emphasis> are interpreted
+as commands for how citations are to be processed</para>
+<indexterm zone="ch-system-groff refer"><primary sortas="b-refer">refer</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="soelim">
+<term><command>soelim</command></term>
+<listitem>
+<para>Reads files and replaces lines of the form
+<emphasis>.so file</emphasis> by the contents of the mentioned
+<emphasis>file</emphasis></para>
+<indexterm zone="ch-system-groff soelim"><primary sortas="b-soelim">soelim</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tbl">
+<term><command>tbl</command></term>
+<listitem>
+<para>Compiles descriptions of tables embedded
+within troff input files into commands that are understood by <command>troff</command></para>
+<indexterm zone="ch-system-groff tbl"><primary sortas="b-tbl">tbl</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tfmtodit">
+<term><command>tfmtodit</command></term>
+<listitem>
+<para>Creates a font file for use with <command>groff -Tdvi</command></para>
+<indexterm zone="ch-system-groff tfmtodit"><primary sortas="b-tfmtodit">tfmtodit</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="troff">
+<term><command>troff</command></term>
+<listitem>
+<para>Is highly compatible with Unix <command>troff</command>; it
+should usually be invoked using the
+<command>groff</command> command, which will also run preprocessors and post-processors in the
+appropriate order and with the appropriate options</para>
+<indexterm zone="ch-system-groff troff"><primary sortas="b-troff">troff</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="zsoelim">
+<term><command>zsoelim</command></term>
+<listitem>
+<para>Is the GNU implementation of <command>soelim</command></para>
+<indexterm zone="ch-system-groff zsoelim"><primary sortas="b-zsoelim">zsoelim</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/grub.xml b/chapter06/grub.xml
index 721c2731e..9f5a0efe0 100644
--- a/chapter06/grub.xml
+++ b/chapter06/grub.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-grub" xreflabel="Grub" role="wrap">
+<sect1 id="ch-system-grub" role="wrap">
<title>Grub-&grub-version;</title>
<?dbhtml filename="grub.html"?>
<indexterm zone="ch-system-grub"><primary sortas="a-Grub">Grub</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Grub package contains the Grand Unified Bootloader.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,28 +18,49 @@
<seglistitem><seg>0.2 SBU</seg><seg>10 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Grub installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Glibc, Grep, Make, Ncurses, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Grub</title>
+<para>This package is known to have issues when its default
+optimization flags (including the <parameter>-march</parameter> and
+<parameter>-mcpu</parameter> options) are changed. If any environment
+variables that override default optimizations have been defined, such
+as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
+unset them when building Grub.</para>
+
<para>Prepare Grub for compilation:</para>
<screen><userinput>./configure --prefix=/usr</userinput></screen>
-<para>Now compile the package:</para>
+<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
<para>To test the results, issue:
<userinput>make check</userinput>.</para>
-<para>Now install it:</para>
+<para>Note that the test results will always show the error
+<quote>ufs2_stage1_5 is too big.</quote> This is due to a compiler
+issue, but can be ignored unless you plan to boot from an UFS
+partition. The partitions are normally only used by Sun
+workstations.</para>
+
+<para>Install the package:</para>
<screen><userinput>make install
mkdir /boot/grub
cp /usr/lib/grub/i386-pc/stage{1,2} /boot/grub</userinput></screen>
+<para>Replace <filename class="directory">i386-pc</filename> with whatever
+directory is appropriate for the hardware in use.</para>
+
<para>The <filename class="directory">i386-pc</filename> directory
contains a number of <filename>*stage1_5</filename> files, different
ones for different file systems. Review the files available and copy
@@ -52,9 +74,58 @@ copy the <filename>e2fs_stage1_5</filename> and/or
<sect2 id="contents-grub" role="content"><title>Contents of Grub</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>grub, grub-install,
+grub-md5-crypt, grub-terminfo, and mbchk</seg></seglistitem>
+</segmentedlist>
-</sect2>
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="grub">
+<term><command>grub</command></term>
+<listitem>
+<para>The Grand Unified Bootloader's command shell</para>
+<indexterm zone="ch-system-grub grub"><primary sortas="b-grub">grub</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="grub-install">
+<term><command>grub-install</command></term>
+<listitem>
+<para>Installs GRUB on the given device</para>
+<indexterm zone="ch-system-grub grub-install"><primary sortas="b-grub-install">grub-install</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="grub-md5-crypt">
+<term><command>grub-md5-crypt</command></term>
+<listitem>
+<para>Encrypts a password in MD5 format</para>
+<indexterm zone="ch-system-grub grub-md5-crypt"><primary sortas="b-grub-md5-crypt">grub-md5-crypt</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="grub-terminfo">
+<term><command>grub-terminfo</command></term>
+<listitem>
+<para>Generates a terminfo command from a terminfo name; it can be
+employed if an unknown terminal is being used</para>
+<indexterm zone="ch-system-grub grub-terminfo"><primary sortas="b-grub-terminfo">grub-terminfo</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mbchk">
+<term><command>mbchk</command></term>
+<listitem>
+<para>Checks the format of a multi-boot kernel</para>
+<indexterm zone="ch-system-grub mbchk"><primary sortas="b-mbchk">mbchk</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect2>
</sect1>
+
diff --git a/chapter06/gzip.xml b/chapter06/gzip.xml
index ea1c677b1..e7e35fa3f 100644
--- a/chapter06/gzip.xml
+++ b/chapter06/gzip.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-gzip" xreflabel="Gzip" role="wrap">
+<sect1 id="ch-system-gzip" role="wrap">
<title>Gzip-&gzip-version;</title>
<?dbhtml filename="gzip.html"?>
<indexterm zone="ch-system-gzip"><primary sortas="a-Gzip">Gzip</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Gzip package contains programs for compressing and decompressing
+files.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +19,11 @@
<seglistitem><seg>0.1 SBU</seg><seg>2.6 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Gzip installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -26,7 +33,10 @@
<screen><userinput>./configure --prefix=/usr</userinput></screen>
-<para>Issue a sed command:</para>
+<para>The <command>gzexe</command> script has the location of the
+<command>gzip</command> binary hard-wired into it. Because the
+location of the binary is changed later, the following command ensures
+that the new location gets placed into the script:</para>
<screen><userinput>sed -i 's@"BINDIR"@/bin@g' gzexe.in</userinput></screen>
@@ -51,8 +61,134 @@ ln -s gunzip /bin/uncompress</userinput></screen>
<sect2 id="contents-gzip" role="content"><title>Contents of Gzip</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>gunzip (link to gzip), gzexe,
+gzip, uncompress (link to gunzip), zcat (link to gzip), zcmp, zdiff,
+zegrep, zfgrep, zforce, zgrep, zless, zmore, and znew</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="gunzip">
+<term><command>gunzip</command></term>
+<listitem>
+<para>Decompresses gzipped files</para>
+<indexterm zone="ch-system-gzip gunzip"><primary sortas="b-gunzip">gunzip</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="gzexe">
+<term><command>gzexe</command></term>
+<listitem>
+<para>Creates self-uncompressing executable files</para>
+<indexterm zone="ch-system-gzip gzexe"><primary sortas="b-gzexe">gzexe</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="gzip">
+<term><command>gzip</command></term>
+<listitem>
+<para>Compresses the given files using Lempel-Ziv (LZ77) coding</para>
+<indexterm zone="ch-system-gzip gzip"><primary sortas="b-gzip">gzip</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="uncompress">
+<term><command>uncompress</command></term>
+<listitem>
+<para>Decompresses compressed files</para>
+<indexterm zone="ch-system-gzip uncompress"><primary sortas="b-uncompress">uncompress</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="zcat">
+<term><command>zcat</command></term>
+<listitem>
+<para>Uncompresses the given gzipped files to standard output</para>
+<indexterm zone="ch-system-gzip zcat"><primary sortas="b-zcat">zcat</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="zcmp">
+<term><command>zcmp</command></term>
+<listitem>
+<para>Runs <command>cmp</command> on gzipped files</para>
+<indexterm zone="ch-system-gzip zcmp"><primary sortas="b-zcmp">zcmp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="zdiff">
+<term><command>zdiff</command></term>
+<listitem>
+<para>Runs <command>diff</command> on gzipped files</para>
+<indexterm zone="ch-system-gzip zdiff"><primary sortas="b-zdiff">zdiff</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="zegrep">
+<term><command>zegrep</command></term>
+<listitem>
+<para>Runs <command>egrep</command> on gzipped files</para>
+<indexterm zone="ch-system-gzip zegrep"><primary sortas="b-zegrep">zegrep</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="zfgrep">
+<term><command>zfgrep</command></term>
+<listitem>
+<para>Runs <command>fgrep</command> on gzipped files</para>
+<indexterm zone="ch-system-gzip zfgrep"><primary sortas="b-zfgrep">zfgrep</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="zforce">
+<term><command>zforce</command></term>
+<listitem>
+<para>Forces a <filename class="extension">.gz</filename> extension on all given files
+that are gzipped files, so that <command>gzip</command> will not compress them again; this can be
+useful when file names were truncated during a file transfer</para>
+<indexterm zone="ch-system-gzip zforce"><primary sortas="b-zforce">zforce</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="zgrep">
+<term><command>zgrep</command></term>
+<listitem>
+<para>Runs <command>grep</command> on gzipped files</para>
+<indexterm zone="ch-system-gzip zgrep"><primary sortas="b-zgrep">zgrep</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="zless">
+<term><command>zless</command></term>
+<listitem>
+<para>Runs <command>less</command> on gzipped files</para>
+<indexterm zone="ch-system-gzip zless"><primary sortas="b-zless">zless</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="zmore">
+<term><command>zmore</command></term>
+<listitem>
+<para>Runs <command>more</command> on gzipped files</para>
+<indexterm zone="ch-system-gzip zmore"><primary sortas="b-zmore">zmore</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="znew">
+<term><command>znew</command></term>
+<listitem>
+<para>Re-compresses files from <command>compress</command> format to
+<command>gzip</command> format&mdash;<filename class="extension">.Z</filename>
+to <filename class="extension">.gz</filename></para>
+<indexterm zone="ch-system-gzip znew"><primary sortas="b-znew">znew</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/hotplug.xml b/chapter06/hotplug.xml
index 12a3e0d0f..cfa04326d 100644
--- a/chapter06/hotplug.xml
+++ b/chapter06/hotplug.xml
@@ -10,6 +10,12 @@
<indexterm zone="ch-system-hotplug"><primary sortas="a-Hotplug">Hotplug</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Hotplug package contains scripts that react upon hotplug events
+generated by the kernel. Such events correspond to every change in the kernel
+state visible in the <systemitem class="filesystem">sysfs</systemitem>
+filesystem, e.g., the addition and removal of hardware. This package also
+detects existing hardware during boot and inserts the relevant modules into the
+running kernel.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +23,10 @@
<seglistitem><seg>0.01 SBU</seg><seg>0.1 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Hotplug installation depends on</segtitle>
+<seglistitem><seg>Unchecked</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -26,15 +36,17 @@
<screen><userinput>make install</userinput></screen>
-<para>Copy a file that the &quot;install&quot; target omits.</para>
+<para>Copy a file that the <quote>install</quote> target omits.</para>
<screen><userinput>cp etc/hotplug/pnp.distmap /etc/hotplug</userinput></screen>
-<para>Remove Hotplug's init script:</para>
+<para>Remove the init script that Hotplug installs, since we're going to be
+using the script included with LFS-Bootscripts:</para>
<screen><userinput>rm -rf /etc/init.d</userinput></screen>
-<para>Remove the network hotplug agent:</para>
+<para>Network device hotplugging is not supported by LFS bootscripts yet. For
+that reason, remove the network hotplug agent:</para>
<screen><userinput>rm -f /etc/hotplug/net.agent</userinput></screen>
</sect2>
@@ -42,7 +54,113 @@
<sect2 id="contents-hotplug" role="content"><title>Contents of Hotplug</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed program</segtitle>
+<segtitle>Installed scripts</segtitle>
+<segtitle>Installed files</segtitle>
+<seglistitem><seg>hotplug</seg>
+<seg>/etc/hotplug/*.rc, /etc/hotplug/*.agent</seg>
+<seg>/etc/hotplug/hotplug.functions, /etc/hotplug/blacklist, /etc/hotplug/{pci,usb},
+/etc/hotplug/usb.usermap, /etc/hotplug.d</seg></seglistitem>
+</segmentedlist>
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="hotplug">
+<term><command>hotplug</command></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug"><primary
+sortas="b-hotplug">hotplug</primary></indexterm>
+<para>This script is called by default by Linux kernel when something
+changes in its internal state (e.g., a new device is added or removed).</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hotplug-rc">
+<term><command>/etc/hotplug/*.rc</command></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug-rc"><primary
+sortas="d-/etc/hotplug/*.rc">/etc/hotplug/*.rc</primary></indexterm>
+<para>These scripts are used for cold plugging, i.e., detection and other
+specific actions upon hardware already present during system startup.
+They are called by the <filename>hotplug</filename> initscript that comes
+from the LFS-Bootscripts package.
+The <command>*.rc</command>
+scripts try to recover hotplug events that were lost during system boot
+because, e.g., the root filesystem was not mounted by the kernel.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hotplug-agent">
+<term><command>/etc/hotplug/*.agent</command></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug-agent"><primary
+sortas="d-/etc/hotplug/*.agent">/etc/hotplug/*.agent</primary></indexterm>
+<para>These scripts are called by <command>hotplug</command>
+in response to different types of hotplug events generated by the kernel.
+Their action is to insert corresponding kernel modules and call user-provided
+scripts, if any.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hotplug-functions">
+<term><filename>/etc/hotplug/hotplug.functions</filename></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug-functions"><primary
+sortas="e-/etc/hotplug/hotplug.functions">/etc/hotplug/hotplug.functions</primary></indexterm>
+<para>This file contains common functions used by other scripts in Hotplug
+package.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hotplug-blacklist">
+<term><filename>/etc/hotplug/blacklist</filename></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug-blacklist"><primary
+sortas="e-/etc/hotplug/blacklist">/etc/hotplug/blacklist</primary></indexterm>
+<para>This file contains the list of modules that should never be
+inserted into the kernel by hotplug scripts.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hotplug-subdirs">
+<term><filename class="directory">/etc/hotplug/{pci,usb}</filename></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug-subdirs"><primary
+sortas="e-/etc/hotplug/{pci,usb}">/etc/hotplug/{pci,usb}</primary></indexterm>
+<para>These directories are supposed to contain user-written handlers for
+hotplug events.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hotplug-usb.usermap">
+<term><filename>/etc/hotplug/usb.usermap</filename></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug-usb.usermap"><primary
+sortas="e-/etc/hotplug/usb.usermap">/etc/hotplug/usb.usermap</primary></indexterm>
+<para>This file contains rules that determine which user-defined handlers to
+call for each USB device, based on its vendor, id and other attributes.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hotplug-hotplug.d">
+<term><filename class="directory">/etc/hotplug.d</filename></term>
+<listitem>
+<indexterm zone="ch-system-hotplug hotplug-hotplug.d"><primary
+sortas="e-/etc/hotplug.d">/etc/hotplug.d</primary></indexterm>
+<para>This directory contains programs (or symlinks to them)
+that are interested in receiving hotplug events. E.g.,
+<application>Udev</application> puts its symlink here during installation.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
diff --git a/chapter06/iana-etc.xml b/chapter06/iana-etc.xml
index c37ce147c..3f10e728e 100644
--- a/chapter06/iana-etc.xml
+++ b/chapter06/iana-etc.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-iana-etc" xreflabel="Iana-Etc" role="wrap">
+<sect1 id="ch-system-iana-etc" role="wrap">
<title>Iana-Etc-&iana-etc-version;</title>
<?dbhtml filename="iana-etc.html"?>
<indexterm zone="ch-system-iana-etc"><primary sortas="a-Iana-Etc">Iana-Etc</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Iana-Etc package provides data for network services and protocols.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +18,10 @@
<seglistitem><seg>0.1 SBU</seg><seg>641 KB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Iana-Etc installation depends on</segtitle>
+<seglistitem><seg>Make</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -26,7 +31,7 @@
<screen><userinput>make</userinput></screen>
-<para>Now install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -35,9 +40,35 @@
<sect2 id="contents-iana-etc" role="content"><title>Contents of Iana-Etc</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed files</segtitle>
+<seglistitem><seg>/etc/protocols and /etc/services</seg></seglistitem>
+</segmentedlist>
-</sect2>
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="protocols">
+<term><filename>/etc/protocols</filename></term>
+<listitem>
+<para>Describes the various DARPA Internet protocols that are
+available from the TCP/IP subsystem</para>
+<indexterm zone="ch-system-iana-etc"><primary sortas="e-/etc/protocols">/etc/protocols</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="services">
+<term><filename>/etc/services</filename></term>
+<listitem>
+<para>Provides a mapping between friendly textual names for internet
+services, and their underlying assigned port numbers and protocol
+types</para>
+<indexterm zone="ch-system-iana-etc"><primary sortas="e-/etc/services">/etc/services</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect2>
</sect1>
+
diff --git a/chapter06/inetutils.xml b/chapter06/inetutils.xml
index 41571c3b5..e489dfc06 100644
--- a/chapter06/inetutils.xml
+++ b/chapter06/inetutils.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-inetutils" xreflabel="Inetutils" role="wrap">
+<sect1 id="ch-system-inetutils" role="wrap">
<title>Inetutils-&inetutils-version;</title>
<?dbhtml filename="inetutils.html"?>
<indexterm zone="ch-system-inetutils"><primary sortas="a-Inetutils">Inetutils</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Inetutils package contains programs for basic networking.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,35 +18,84 @@
<seglistitem><seg>0.2 SBU</seg><seg>11 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Inetutils installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils,
+Diffutils, GCC, Glibc, Grep, Make, Ncurses, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Inetutils</title>
-<para>Apply a patch patch:</para>
+<para>Inetutils has issues with the Linux 2.6 kernel series. Fix these
+issues by applying the following patch:</para>
<screen><userinput>patch -Np1 -i ../inetutils-&inetutils-version;-kernel_headers-1.patch</userinput></screen>
-<para>Apply another patch:</para>
+<para>All programs that come with Inetutils will not be installed.
+However, the Inetutils build system will insist on installing all the
+man pages anyway. The following patch will correct this
+situation:</para>
<screen><userinput>patch -Np1 -i ../inetutils-&inetutils-version;-no_server_man_pages-1.patch</userinput></screen>
-<para>Now prepare Inetutils for compilation:</para>
+<para>Prepare Inetutils for compilation:</para>
<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/sbin \
--sysconfdir=/etc --localstatedir=/var \
--disable-logger --disable-syslogd \
--disable-whois --disable-servers</userinput></screen>
+<para>The meaning of the configure options:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--disable-logger</parameter></term>
+<listitem><para>This option
+prevents Inetutils from installing the <command>logger</command> program, which is used by
+scripts to pass messages to the System Log Daemon. Do not install it
+because Util-linux installs a better version later.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--disable-syslogd</parameter></term>
+<listitem><para>This option
+prevents Inetutils from installing the System Log Daemon, which is
+installed with the Sysklogd package.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--disable-whois</parameter></term>
+<listitem><para>This option disables
+the building of the Inetutils <command>whois</command> client, which is out of date.
+Instructions for a better <command>whois</command> client are in the BLFS book.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>--disable-servers</parameter></term>
+<listitem><para>This disables the installation of the various network
+servers included as part of the Inetutils package. These servers are
+deemed not appropriate in a basic LFS system. Some are insecure by
+nature and are only considered safe on trusted networks. More
+information can be found at <phrase condition="html"><ulink
+url="&blfs-root;view/svn/basicnet/inetutils.html"/></phrase><phrase
+condition="pdf"><ulink url="&blfs-root;view/svn/ basicnet/inetutils.html"/></phrase>. Note that
+better replacements are available for many of these
+servers.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>Install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<para>Move the <command>ping</command> program:</para>
+<para>Move the <command>ping</command> program to its FHS-compliant
+place:</para>
<screen><userinput>mv /usr/bin/ping /bin</userinput></screen>
@@ -54,8 +104,80 @@
<sect2 id="contents-inetutils" role="content"><title>Contents of Inetutils</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>ftp, ping, rcp, rlogin, rsh, talk, telnet, and tftp</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="ftp">
+<term><command>ftp</command></term>
+<listitem>
+<para>Is the file transfer protocol program</para>
+<indexterm zone="ch-system-inetutils ftp"><primary sortas="b-ftp">ftp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ping">
+<term><command>ping</command></term>
+<listitem>
+<para>Sends echo-request packets and reports how long the replies take</para>
+<indexterm zone="ch-system-inetutils ping"><primary sortas="b-ping">ping</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="rcp">
+<term><command>rcp</command></term>
+<listitem>
+<para>Performs remote file copy</para>
+<indexterm zone="ch-system-inetutils rcp"><primary sortas="b-rcp">rcp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="rlogin">
+<term><command>rlogin</command></term>
+<listitem>
+<para>Performs remote login</para>
+<indexterm zone="ch-system-inetutils rlogin"><primary sortas="b-rlogin">rlogin</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="rsh">
+<term><command>rsh</command></term>
+<listitem>
+<para>Runs a remote shell</para>
+<indexterm zone="ch-system-inetutils rsh"><primary sortas="b-rsh">rsh</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="talk">
+<term><command>talk</command></term>
+<listitem>
+<para>Is used to chat with another user</para>
+<indexterm zone="ch-system-inetutils talk"><primary sortas="b-talk">talk</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="telnet">
+<term><command>telnet</command></term>
+<listitem>
+<para>An interface to the TELNET protocol</para>
+<indexterm zone="ch-system-inetutils telnet"><primary sortas="b-telnet">telnet</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tftp">
+<term><command>tftp</command></term>
+<listitem>
+<para>A trivial file transfer program</para>
+<indexterm zone="ch-system-inetutils tftp"><primary sortas="b-tftp">tftp</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/introduction.xml b/chapter06/introduction.xml
index a26434375..b19f69e45 100644
--- a/chapter06/introduction.xml
+++ b/chapter06/introduction.xml
@@ -7,6 +7,65 @@
<title>Introduction</title>
<?dbhtml filename="introduction.html"?>
-<para>See testing</para>
+<para>In this chapter, we enter the building site and start
+constructing the LFS system in earnest. That is, we chroot into the
+temporary mini Linux system, make a few final preparations, and then
+begin installing the packages.</para>
+
+<para>The installation of this software is straightforward. Although
+in many cases the installation instructions could be made shorter and
+more generic, we have opted to provide the full instructions for every
+package to minimize the possibilities for mistakes. The key to
+learning what makes a Linux system work is to know what each package
+is used for and why the user (or the system) needs it. For every
+installed package, a summary of its contents is given, followed by
+concise descriptions of each program and library the package
+installed.</para>
+
+<para>If using the compiler optimizations provided in this chapter,
+please review the optimization hint at <ulink
+url="&hints-root;optimization.txt"/>. Compiler optimizations can make
+a program run slightly faster, but they may also cause compilation
+difficulties and problems when running the program. If a package
+refuses to compile when using optimization, try to compile it without
+optimization and see if that fixes the problem. Even if the package
+does compile when using optimization, there is the risk it may have
+been compiled incorrectly because of the complex interactions between
+the code and build tools. The small potential gains achieved in using
+compiler optimizations are often outweighed by the risks. First-time
+builders of LFS are encouraged to build without custom optimizations.
+The subsequent system will still run very fast and be stable at the
+same time.</para>
+
+<para>The order that packages are installed in this chapter needs to
+be strictly followed to ensure that no program accidentally acquires a
+path referring to <filename class="directory">/tools</filename>
+hard-wired into it. For the same reason, do not compile packages in
+parallel. Compiling in parallel may save time (especially on dual-CPU
+machines), but it could result in a program containing a hard-wired
+path to <filename class="directory">/tools</filename>, which will
+cause the program to stop working when that directory is
+removed.</para>
+
+<para>Before the installation instructions, each installation page
+provides information about the package, including a concise
+description of what it contains, approximately how long it will take
+to build, how much disk space is required during this building
+process, and any other packages needed to successfully build the
+package. Following the installation instructions, there is a list of
+programs and libraries (along with brief descriptions of these) that
+the package installs.</para>
+
+<para>To keep track of which package installs particular files, a package
+manager can be used. For a general overview of different styles of package
+managers, please refer to <ulink
+url="&blfs-root;view/svn/introduction/important.html"/>.
+For a package management method specifically geared towards LFS, we recommend <ulink
+url="&hints-root;more_control_and_pkg_man.txt"/>.</para>
+
+<note><para>The remainder of this book is to be performed while logged
+in as user <emphasis>root</emphasis> and no longer as user
+<emphasis>lfs</emphasis>.</para></note>
</sect1>
+
diff --git a/chapter06/iproute2.xml b/chapter06/iproute2.xml
index 3cce62619..cf492bd64 100644
--- a/chapter06/iproute2.xml
+++ b/chapter06/iproute2.xml
@@ -3,16 +3,17 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-iproute2" xreflabel="IProute2" role="wrap">
-<title>Iproute2-&iproute2-version;</title>
+<sect1 id="ch-system-iproute2" role="wrap">
+ <title>Iproute2-&iproute2-version;</title>
<?dbhtml filename="iproute2.html"?>
-
<indexterm zone="ch-system-iproute2">
- <primary sortas="a-iproute2">iproute2</primary>
+ <primary sortas="a-iproute2">Iproute2</primary>
</indexterm>
<sect2 role="package">
<title/>
-
+ <para>The Iproute2 package contains programs for basic and advanced
+ IPV4-based networking.
+ </para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
@@ -21,42 +22,244 @@
<seg>.6 MB</seg>
</seglistitem>
</segmentedlist>
-
+ <segmentedlist>
+ <segtitle>Iproute2 installation depends on</segtitle>
+ <seglistitem>
+ <seg>GCC, Glibc, Make, Linux-Headers, and Sed</seg>
+ </seglistitem>
+ </segmentedlist>
</sect2>
-
<sect2 role="installation">
<title>Installation of Iproute2</title>
-
- <para>Apply a patch</para>
+ <para>The <command>arpd</command> binary included in this package is
+ dependent on Berkeley DB. Because <command>arpd</command> is not a very
+ common requirement on a base Linux system, remove the dependency on
+ Berkeley DB by applying the patch using the command below. If
+ the <command>arpd</command> binary is needed, instructions for
+ compiling Berkeley DB can be found in the BLFS Book at <ulink
+ url="&blfs-root;view/svn/content/databases.html#db"/>.
+ </para>
<screen><userinput>patch -Np1 -i ../iproute2-&iproute2-patch-version;-remove_db-1.patch</userinput></screen>
- <!--NEW-->
- <para>The patch below fixes the issue with the newer versions of findutils,
- the issue will give an error message it options are not in the proper order.
- This patch corrects this issue for IPRoute2.</para>
+<para>The patch below fixes the issue with the newer versions of
+findutils whose <command>find</command> command will report an error
+message when its options are not in the proper order.</para>
- <screen><userinput>patch -Np1 -i ../iproute2-&iproute2-patch-version;-find_update-1.patch</userinput></screen>
+<screen><userinput>patch -Np1 -i ../iproute2-&iproute2-patch-version;-find_update-1.patch</userinput></screen>
- <para>Prepare iproute2 for compilation:</para>
-
+
+ <para>Prepare Iproute2 for compilation:</para>
<screen><userinput>./configure </userinput></screen>
<para>Compile the package:</para>
<screen><userinput>make SBINDIR=/sbin</userinput></screen>
- <para>Now install it:</para>
-
- <!--NEW-->
- <screen><userinput>make install SBINDIR=/sbin</userinput></screen>
-
+ <para>The meaning of the make option:</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><parameter>SBINDIR=/sbin</parameter></term>
+ <listitem><para>This makes sure that the Iproute2 binaries will install into
+ <filename class="directory">/sbin</filename>. This is the correct
+ location according to the FHS, because some of the Iproute2 binaries are used
+ in the bootscripts.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>Install the package:</para>
+
+ <screen><userinput>make SBINDIR=/sbin install</userinput></screen>
</sect2>
<sect2 id="contents-iproute2" role="content">
- <title>Contents of Iproute2</title>
-
- <para>See testing</para>
-
+ <title>Contents of Iproute2</title>
+ <segmentedlist>
+ <segtitle>Installed programs</segtitle>
+ <seglistitem>
+ <seg>ifstat, ip, nstat, routef, routel, rtmon, rtstat, ss, and tc.</seg>
+ </seglistitem>
+ </segmentedlist>
+
+ <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+ <varlistentry id="ifstat">
+ <term>
+ <command>ifstat</command>
+ </term>
+ <listitem>
+ <para>Shows the interfaces statistic, including the amount of transmitted
+ and received packages by interface.</para>
+ <indexterm zone="ch-system-iproute2 ifstat">
+ <primary sortas="b-ifstat">ifstat</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="ip">
+ <term>
+ <command>ip</command>
+ </term>
+ <listitem>
+
+ <para>The main executable. It has several different functions:</para>
+
+ <para><command>ip link <replaceable>[device]</replaceable></command>
+ allows users to look at the state of devices and to make changes.
+ </para>
+
+ <para><command>ip addr</command> allows users to look at addresses and
+ their properties, add new addresses, and delete old ones.
+ </para>
+
+ <para><command>ip neighbor</command> allows users to look at
+ neighbor bindings and their properties, add new
+ neighbor entries, and delete old ones.
+ </para>
+
+ <para><command>ip rule</command> allows users to look at the routing
+ policies and change them.
+ </para>
+
+ <para><command>ip route</command> allows users to look at the routing
+ table and change routing table rules.
+ </para>
+
+ <para><command>ip tunnel</command> allows users to look at the IP
+ tunnels and their properties, and change them.
+ </para>
+
+ <para><command>ip maddr</command> allows users to look at the multicast
+ addresses and their properties, and change them.
+ </para>
+
+ <para><command>ip mroute</command> allows users to set, change, or
+ delete the multicast routing.
+ </para>
+
+ <para><command>ip monitor</command> allows users to
+ continously monitor the state of devices, addresses and routes.
+ </para>
+ <indexterm zone="ch-system-iproute2 ip">
+ <primary sortas="b-ip">ip</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="nstat">
+ <term>
+ <command>nstat</command>
+ </term>
+ <listitem>
+ <para>Shows network statistics.</para>
+ <indexterm zone="ch-system-iproute2 nstat">
+ <primary sortas="b-nstat">nstat</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="routef">
+ <term>
+ <command>routef</command>
+ </term>
+ <listitem>
+ <para>A component of <command>ip route</command>. This is for flushing the routing
+ tables.
+ </para>
+ <indexterm zone="ch-system-iproute2 routef">
+ <primary sortas="b-routef">routef</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="routel">
+ <term>
+ <command>routel</command>
+ </term>
+ <listitem>
+ <para>A component of <command>ip route</command>. This is for listing the routing
+ tables.
+ </para>
+ <indexterm zone="ch-system-iproute2 routel">
+ <primary sortas="b-routel">routel</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="rtmon">
+ <term>
+ <command>rtmon</command>
+ </term>
+ <listitem>
+ <para>Route monitoring utility.</para>
+ <indexterm zone="ch-system-iproute2 rtmon">
+ <primary sortas="b-rtmon">rtmon</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="rtstat">
+ <term>
+ <command>rtstat</command>
+ </term>
+ <listitem>
+ <para>Route status utility</para>
+ <indexterm zone="ch-system-iproute2 rtstat">
+ <primary sortas="b-rtstat">rtstat</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="ss">
+ <term>
+ <command>ss</command>
+ </term>
+ <listitem>
+ <para>Similar to the <command>netstat</command> command; shows active connections</para>
+ <indexterm zone="ch-system-iproute2 ss">
+ <primary sortas="b-ss">ss</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="tc">
+ <term>
+ <command>tc</command>
+ </term>
+ <listitem>
+ <para>Traffic Controlling Executable; this is for Quality Of
+Service (QOS) and Class Of Service (COS)
+ implementations
+ </para>
+
+ <para><command>tc qdisc</command> allows users to setup the queueing
+ discipline
+ </para>
+
+ <para><command>tc class</command> allows users to setup classes based on
+ the queuing discipline scheduling
+ </para>
+
+ <para><command>tc estimator</command> allows users to estimate the
+ network flow into a network
+ </para>
+
+ <para><command>tc filter</command> allows users to setup the QOS/COS
+ packet filtering
+ </para>
+
+ <para><command>tc policy</command> allows users to setup the QOS/COS
+ policies
+ </para>
+ <indexterm zone="ch-system-iproute2 ss">
+ <primary sortas="b-tc">tc</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/kbd.xml b/chapter06/kbd.xml
index 99acf19cd..055a81d9f 100644
--- a/chapter06/kbd.xml
+++ b/chapter06/kbd.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-kbd" xreflabel="Kbd" role="wrap">
+<sect1 id="ch-system-kbd" role="wrap">
<title>Kbd-&kbd-version;</title>
<?dbhtml filename="kbd.html"?>
<indexterm zone="ch-system-kbd"><primary sortas="a-Kbd">Kbd</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Kbd package contains key-table files and keyboard utilities.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +18,11 @@
<seglistitem><seg>0.1 SBU</seg><seg>12 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Kbd installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Bison, Coreutils,
+Diffutils, Flex, GCC, Gettext, Glibc, Grep, Gzip, M4, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -30,7 +36,7 @@
<screen><userinput>make</userinput></screen>
-<para>Now install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -38,8 +44,244 @@
<sect2 id="contents-kbd" role="content"><title>Contents of Kbd</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>chvt, deallocvt, dumpkeys,
+fgconsole, getkeycodes, getunimap, kbd_mode, kbdrate, loadkeys, loadunimap,
+mapscrn, openvt, psfaddtable (link to psfxtable), psfgettable (link to
+psfxtable), psfstriptable (link to psfxtable), psfxtable, resizecons,
+setfont, setkeycodes, setleds, setlogcons, setmetamode, setvesablank,
+showconsolefont, showkey, unicode_start, and unicode_stop</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="chvt">
+<term><command>chvt</command></term>
+<listitem>
+<para>Changes the foreground virtual terminal</para>
+<indexterm zone="ch-system-kbd chvt"><primary sortas="b-chvt">chvt</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="deallocvt">
+<term><command>deallocvt</command></term>
+<listitem>
+<para>Deallocates unused virtual terminals</para>
+<indexterm zone="ch-system-kbd deallocvt"><primary sortas="b-deallocvt">deallocvt</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="dumpkeys">
+<term><command>dumpkeys</command></term>
+<listitem>
+<para>Dumps the keyboard translation tables</para>
+<indexterm zone="ch-system-kbd dumpkeys"><primary sortas="b-dumpkeys">dumpkeys</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="fgconsole">
+<term><command>fgconsole</command></term>
+<listitem>
+<para>Prints the number of the active virtual terminal</para>
+<indexterm zone="ch-system-kbd fgconsole"><primary sortas="b-fgconsole">fgconsole</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="getkeycodes">
+<term><command>getkeycodes</command></term>
+<listitem>
+<para>Prints the kernel scancode-to-keycode mapping table</para>
+<indexterm zone="ch-system-kbd getkeycodes"><primary sortas="b-getkeycodes">getkeycodes</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="getunimap">
+<term><command>getunimap</command></term>
+<listitem>
+<para>Prints the currently used unimap</para>
+<indexterm zone="ch-system-kbd getunimap"><primary sortas="b-getunimap">getunimap</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="kbd_mode">
+<term><command>kbd_mode</command></term>
+<listitem>
+<para>Reports or sets the keyboard mode</para>
+<indexterm zone="ch-system-kbd kbd_mode"><primary sortas="b-kbd_mode">kbd_mode</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="kbdrate">
+<term><command>kbdrate</command></term>
+<listitem>
+<para>Sets the keyboard repeat and delay rates</para>
+<indexterm zone="ch-system-kbd kbdrate"><primary sortas="b-kbdrate">kbdrate</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="loadkeys">
+<term><command>loadkeys</command></term>
+<listitem>
+<para>Loads the keyboard translation tables</para>
+<indexterm zone="ch-system-kbd loadkeys"><primary sortas="b-loadkeys">loadkeys</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="loadunimap">
+<term><command>loadunimap</command></term>
+<listitem>
+<para>Loads the kernel unicode-to-font mapping table</para>
+<indexterm zone="ch-system-kbd loadunimap"><primary sortas="b-loadunimap">loadunimap</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mapscrn">
+<term><command>mapscrn</command></term>
+<listitem>
+<para>An obsolete program that used to load
+a user-defined output character mapping table into the console driver; this is
+now done by <command>setfont</command></para>
+<indexterm zone="ch-system-kbd mapscrn"><primary sortas="b-mapscrn">mapscrn</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="openvt">
+<term><command>openvt</command></term>
+<listitem>
+<para>Starts a program on a new virtual terminal (VT)</para>
+<indexterm zone="ch-system-kbd openvt"><primary sortas="b-openvt">openvt</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="psfaddtable">
+<term><command>psfaddtable</command></term>
+<listitem>
+<para>A link to <command>psfxtable</command></para>
+<indexterm zone="ch-system-kbd psfaddtable"><primary sortas="b-psfaddtable">psfaddtable</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="psfgettable">
+<term><command>psfgettable</command></term>
+<listitem>
+<para>A link to <command>psfxtable</command></para>
+<indexterm zone="ch-system-kbd psfgettable"><primary sortas="b-psfgettable">psfgettable</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="psfstriptable">
+<term><command>psfstriptable</command></term>
+<listitem>
+<para>A link to <command>psfxtable</command></para>
+<indexterm zone="ch-system-kbd psfstriptable"><primary sortas="b-psfstriptable">psfstriptable</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="psfxtable">
+<term><command>psfxtable</command></term>
+<listitem>
+<para>Handle Unicode character tables for console fonts</para>
+<indexterm zone="ch-system-kbd psfxtable"><primary sortas="b-psfxtable">psfxtable</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="resizecons">
+<term><command>resizecons</command></term>
+<listitem>
+<para>Changes the kernel idea of the console size</para>
+<indexterm zone="ch-system-kbd resizecons"><primary sortas="b-resizecons">resizecons</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="setfont">
+<term><command>setfont</command></term>
+<listitem>
+<para>Changes the Enhanced Graphic Adapter (EGA) and Video Graphics
+Array (VGA) fonts on the console</para>
+<indexterm zone="ch-system-kbd setfont"><primary sortas="b-setfont">setfont</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="setkeycodes">
+<term><command>setkeycodes</command></term>
+<listitem>
+<para>Loads kernel scancode-to-keycode mapping table entries; this is
+useful if there are unusual keys on the keyboard</para>
+<indexterm zone="ch-system-kbd setkeycodes"><primary sortas="b-setkeycodes">setkeycodes</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="setleds">
+<term><command>setleds</command></term>
+<listitem>
+<para>Sets the keyboard flags and Light Emitting Diodes (LEDs)</para>
+<indexterm zone="ch-system-kbd setleds"><primary sortas="b-setleds">setleds</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="setlogcons">
+<term><command>setlogcons</command></term>
+<listitem>
+<para>Sends kernel messages to the console</para>
+<indexterm zone="ch-system-kbd setlogcons"><primary sortas="b-setlogcons">setlogcons</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="setmetamode">
+<term><command>setmetamode</command></term>
+<listitem>
+<para>Defines the keyboard meta-key handling</para>
+<indexterm zone="ch-system-kbd setmetamode"><primary sortas="b-setmetamode">setmetamode</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="setvesablank">
+<term><command>setvesablank</command></term>
+<listitem>
+<para>Lets the user adjust the built-in hardware screensaver (a blank
+screen)</para>
+<indexterm zone="ch-system-kbd setvesablank"><primary sortas="b-setvesablank">setvesablank</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="showconsolefont">
+<term><command>showconsolefont</command></term>
+<listitem>
+<para>Shows the current EGA/VGA console screen font</para>
+<indexterm zone="ch-system-kbd showconsolefont"><primary sortas="b-showconsolefont">showconsolefont</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="showkey">
+<term><command>showkey</command></term>
+<listitem>
+<para>Reports the scancodes, keycodes, and ASCII codes of the keys
+pressed on the keyboard</para>
+<indexterm zone="ch-system-kbd showkey"><primary sortas="b-showkey">showkey</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="unicode_start">
+<term><command>unicode_start</command></term>
+<listitem>
+<para>Puts the keyboard and console in UNICODE mode. Never use it on LFS,
+because applications are not configured to support UNICODE.</para>
+<indexterm zone="ch-system-kbd unicode_start"><primary sortas="b-unicode_start">unicode_start</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="unicode_stop">
+<term><command>unicode_stop</command></term>
+<listitem>
+<para>Reverts keyboard and console from UNICODE mode</para>
+<indexterm zone="ch-system-kbd unicode_stop"><primary sortas="b-unicode_stop">unicode_stop</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/kernfs.xml b/chapter06/kernfs.xml
index a82a03b96..0f925c979 100644
--- a/chapter06/kernfs.xml
+++ b/chapter06/kernfs.xml
@@ -1,10 +1,17 @@
<?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="ch-system-kernfs">
<title>Mounting Virtual Kernel File Systems</title>
<?dbhtml filename="kernfs.html"?>
-<para>Create the dirs:</para>
+<para>Various file systems exported by the kernel do not exist on the
+hard drive, but are used to communicate to and from the kernel
+itself.</para>
+
+<para>Begin by creating directories onto which the file systems will be mounted:</para>
<screen><userinput>mkdir -p $LFS/{proc,sys}</userinput></screen>
@@ -13,10 +20,18 @@
<screen><userinput>mount -t proc proc $LFS/proc
mount -t sysfs sysfs $LFS/sys</userinput></screen>
-<para>Do some <quote>fake mounts</quote>:</para>
+<para>Remember that if for any reason you stop working on the LFS
+system and start again later, it is important to check that these file
+systems are mounted again before entering the chroot
+environment.</para>
+
+<para>Additional file systems will soon be mounted from within the
+chroot environment. To keep the host up to date, perform a <quote>fake
+mount</quote> for each of these now:</para>
<screen><userinput>mount -f -t ramfs ramfs $LFS/dev
mount -f -t tmpfs tmpfs $LFS/dev/shm
mount -f -t devpts -o gid=4,mode=620 devpts $LFS/dev/pts</userinput></screen>
</sect1>
+
diff --git a/chapter06/less.xml b/chapter06/less.xml
index ccae7af41..fffd1f3ed 100644
--- a/chapter06/less.xml
+++ b/chapter06/less.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-less" xreflabel="Less" role="wrap">
+<sect1 id="ch-system-less" role="wrap">
<title>Less-&less-version;</title>
<?dbhtml filename="less.html"?>
<indexterm zone="ch-system-less"><primary sortas="a-Less">Less</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Less package contains a text file viewer.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +18,11 @@
<seglistitem><seg>0.1 SBU</seg><seg>3.4 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Less installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Glibc, Grep, Make, Ncurses, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -26,20 +32,63 @@
<screen><userinput>./configure --prefix=/usr --bindir=/bin --sysconfdir=/etc</userinput></screen>
+<para>The meaning of the configure option:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--sysconfdir=/etc</parameter></term>
+<listitem><para>This option tells the programs created by the package to look in
+<filename class="directory">/etc</filename> for the configuration files.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>Now install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-
</sect2>
<sect2 id="contents-less" role="content"><title>Contents of Less</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>less, lessecho, and lesskey</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="less">
+<term><command>less</command></term>
+<listitem>
+<para>a file viewer or pager; it displays the contents of the given
+file, letting the user scroll, find strings, and jump to marks</para>
+<indexterm zone="ch-system-less less"><primary sortas="b-less">less</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="lessecho">
+<term><command>lessecho</command></term>
+<listitem>
+<para>needed to expand meta-characters, such as <emphasis>*</emphasis>
+and <emphasis>?</emphasis>, in filenames on Unix systems</para>
+<indexterm zone="ch-system-less lessecho"><primary sortas="b-lessecho">lessecho</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="lesskey">
+<term><command>lesskey</command></term>
+<listitem>
+<para>used to specify the key bindings for <command>less</command></para>
+<indexterm zone="ch-system-less lesskey"><primary sortas="b-lesskey">lesskey</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/libol.xml b/chapter06/libol.xml
index abb38e48f..a593f1e17 100644
--- a/chapter06/libol.xml
+++ b/chapter06/libol.xml
@@ -10,6 +10,7 @@
<indexterm zone="ch-system-libol"><primary sortas="a-Libol">Libol</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Libol package contains support libraries needed by Syslog-ng.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +18,10 @@
<seglistitem><seg>Unchecked</seg><seg>Unchecked</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Libol installation depends on</segtitle>
+<seglistitem><seg>Unchecked</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -24,14 +29,13 @@
<para>Prepare Libol for compilation</para>
-<!--NEW-->
<screen><userinput>./configure --prefix=/usr</userinput></screen>
-<para>Compile Libol:</para>
+<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>Now install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -40,7 +44,34 @@
<sect2 id="contents-libol" role="content"><title>Contents of Libol</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>Unchecked</seg></seglistitem>
+</segmentedlist>
+
+<!--
+<variablelist><title>Short descriptions</title>
+
+<varlistentry id="klogd">
+<term><command>klogd</command></term>
+<listitem>
+<indexterm zone="ch-system-sysklogd klogd"><primary sortas="b-klogd">klogd</primary></indexterm>
+<para>is a system daemon for intercepting and logging kernel messages.</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="syslogd">
+<term><command>syslogd</command></term>
+<listitem>
+<indexterm zone="ch-system-sysklogd syslogd"><primary sortas="b-syslogd">syslogd</primary></indexterm>
+<para>logs the messages that system programs
+offer for logging. Every logged message contains at least a date stamp and a
+hostname, and normally the program's name too, but that depends on how
+trusting the logging daemon is told to be.</para>
+</listitem>
+</varlistentry>
+</variablelist>
+-->
</sect2>
diff --git a/chapter06/libtool.xml b/chapter06/libtool.xml
index 13691bb8b..403d2e968 100644
--- a/chapter06/libtool.xml
+++ b/chapter06/libtool.xml
@@ -3,13 +3,16 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-libtool" xreflabel="Libtool" role="wrap">
+<sect1 id="ch-system-libtool" role="wrap">
<title>Libtool-&libtool-version;</title>
<?dbhtml filename="libtool.html"?>
<indexterm zone="ch-system-libtool"><primary sortas="a-Libtool">Libtool</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Libtool package contains the GNU generic library support script.
+It wraps the complexity of using shared libraries in a consistent, portable
+interface.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +20,11 @@
<seglistitem><seg>1.5 SBU</seg><seg>20 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Libtool installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -42,8 +50,41 @@
<sect2 id="contents-libtool" role="content"><title>Contents of Libtool</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed libraries</segtitle>
+<seglistitem><seg>libtool and libtoolize</seg><seg>libltdl.[a,so]</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="libtool">
+<term><command>libtool</command></term>
+<listitem>
+<para>Provides generalized library-building support services</para>
+<indexterm zone="ch-system-libtool libtool"><primary sortas="b-libtool">libtool</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libtoolize">
+<term><command>libtoolize</command></term>
+<listitem>
+<para>Provides a standard way to add <command>libtool</command> support to a package</para>
+<indexterm zone="ch-system-libtool libtoolize"><primary sortas="b-libtoolize">libtoolize</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libltdl">
+<term><filename class="libraryfile">libltdl</filename></term>
+<listitem>
+<para>Hides the various difficulties of dlopening libraries</para>
+<indexterm zone="ch-system-libtool libltdl"><primary sortas="c-libltdl">libltdl</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/linux-libc-headers.xml b/chapter06/linux-libc-headers.xml
index 5db583994..aa14b87bf 100644
--- a/chapter06/linux-libc-headers.xml
+++ b/chapter06/linux-libc-headers.xml
@@ -12,6 +12,8 @@
</indexterm>
<sect2 role="package"><title/>
+<para>The Linux-Libc-Headers package contains the
+<quote>sanitized</quote> kernel headers.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -19,21 +21,34 @@
<seglistitem><seg>0.1 SBU</seg><seg>22 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Linux-Libc-Headers installation depends on</segtitle>
+<seglistitem><seg>Coreutils</seg></seglistitem>
+</segmentedlist>
+
</sect2>
<sect2 role="installation">
<title>Installation of Linux-Libc-Headers</title>
+<para>For years it has been common practice to use <quote>raw</quote>
+kernel headers (straight from a kernel tarball) in <filename
+class="directory">/usr/include</filename>, but over the last few
+years, the kernel developers have taken a strong stance that this
+should not be done. This gave birth to the Linux-Libc-Headers Project,
+which was designed to maintain an API stable version of the Linux
+headers.</para>
+
<para>Install the header files:</para>
<screen><userinput>cp -R include/asm-i386 /usr/include/asm
cp -R include/linux /usr/include</userinput></screen>
-<para>Assure that all the headers are owned by root:</para>
+<para>Ensure that all the headers are owned by root:</para>
<screen><userinput>chown -R root:root /usr/include/{asm,linux}</userinput></screen>
-<para>And make sure all the users can read the headers:</para>
+<para>Make sure the users can read the headers:</para>
<screen><userinput>find /usr/include/{asm,linux} -type d -exec chmod 755 {} \;
find /usr/include/{asm,linux} -type f -exec chmod 644 {} \;</userinput></screen>
@@ -43,8 +58,24 @@ find /usr/include/{asm,linux} -type f -exec chmod 644 {} \;</userinput></screen>
<sect2 id="contents-linux-libc-headers" role="content"><title>Contents of Linux-Libc-Headers</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed headers</segtitle>
+<seglistitem><seg>/usr/include/{asm,linux}/*.h</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="linux-libc-headers">
+<term><filename class="headerfile">/usr/include/{asm,linux}/*.h</filename></term>
+<listitem>
+<para>The Linux headers API</para>
+<indexterm zone="ch-system-linux-libc-headers linux-libc-headers"><primary sortas="e-/usr/include/{asm,linux}/*.h">/usr/include/{asm,linux}/*.h</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/m4.xml b/chapter06/m4.xml
index f81e5c583..ba350ab94 100644
--- a/chapter06/m4.xml
+++ b/chapter06/m4.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-m4" xreflabel="M4" role="wrap">
+<sect1 id="ch-system-m4" role="wrap">
<title>M4-&m4-version;</title>
<?dbhtml filename="m4.html"?>
<indexterm zone="ch-system-m4"><primary sortas="a-M4">M4</primary></indexterm>
<sect2 role="package"><title/>
+<para>The M4 package contains a macro processor.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +18,11 @@
<seglistitem><seg>0.1 SBU</seg><seg>3.0 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>M4 installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils, GCC,
+Gettext, Glibc, Grep, Make, Perl, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -33,7 +39,7 @@
<para>To test the results, issue:
<userinput>make check</userinput>.</para>
-<para>And install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -42,8 +48,31 @@
<sect2 id="contents-m4" role="content"><title>Contents of M4</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed program</segtitle>
+<seglistitem><seg>m4</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="m4">
+<term><command>m4</command></term>
+<listitem>
+<para>copies the given files while expanding the macros that they
+contain. These macros are either built-in or user-defined and can take
+any number of arguments. Besides performing macro expansion,
+<command>m4</command> has
+built-in functions for including named files, running Unix commands,
+performing integer arithmetic, manipulating text, recursion, etc. The
+<command>m4</command> program can be used either as a front-end to a compiler or as a
+macro processor in its own right.</para>
+<indexterm zone="ch-system-m4 m4"><primary sortas="b-m4">m4</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/make.xml b/chapter06/make.xml
index a0dd5ce18..585f94ca3 100644
--- a/chapter06/make.xml
+++ b/chapter06/make.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-make" xreflabel="Make" role="wrap">
+<sect1 id="ch-system-make" role="wrap">
<title>Make-&make-version;</title>
<?dbhtml filename="make.html"?>
<indexterm zone="ch-system-make"><primary sortas="a-Make">Make</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Make package contains a program for compiling large packages.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +18,11 @@
<seglistitem><seg>0.2 SBU</seg><seg>8.8 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Make installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Gettext, Glibc, Grep, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -33,7 +39,7 @@
<para>To test the results, issue:
<userinput>make check</userinput>.</para>
-<para>Now install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -42,8 +48,25 @@
<sect2 id="contents-make" role="content"><title>Contents of Make</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed program</segtitle>
+<seglistitem><seg>make</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="make">
+<term><command>make</command></term>
+<listitem>
+<para>Automatically determines which pieces of a large package need to
+be recompiled and then issues the relevant commands</para>
+<indexterm zone="ch-system-make make"><primary sortas="b-make">make</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/man-pages.xml b/chapter06/man-pages.xml
index e9fcaeeed..ce568ae14 100644
--- a/chapter06/man-pages.xml
+++ b/chapter06/man-pages.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-man-pages" xreflabel="Man-pages" role="wrap">
+<sect1 id="ch-system-man-pages" role="wrap">
<title>Man-pages-&man-pages-version;</title>
<?dbhtml filename="man-pages.html"?>
<indexterm zone="ch-system-man-pages"><primary sortas="a-Man-pages">Man-pages</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Man-pages package contains over 1,200 manual pages.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +18,10 @@
<seglistitem><seg>0.1 SBU</seg><seg>15 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Man-pages installation depends on</segtitle>
+<seglistitem><seg>Bash, Coreutils, and Make</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -31,8 +36,25 @@
<sect2 id="contents-manpages" role="content"><title>Contents of Man-pages</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed files</segtitle>
+<seglistitem><seg>various manual pages</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="manual-pages">
+<term><filename>manual pages</filename></term>
+<listitem>
+<para>Describe the C and C++ functions, important
+device files, and significant configuration files</para>
+<indexterm zone="ch-system-man-pages manual-pages"><primary sortas="e-manual-pages">manual pages</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/man.xml b/chapter06/man.xml
index 042cb5fee..1a0bce0ff 100644
--- a/chapter06/man.xml
+++ b/chapter06/man.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-man" xreflabel="Man" role="wrap">
+<sect1 id="ch-system-man" role="wrap">
<title>Man-&man-version;</title>
<?dbhtml filename="man.html"?>
<indexterm zone="ch-system-man"><primary sortas="a-Man">Man</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Man package contains programs for finding and viewing manual pages.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,40 +18,160 @@
<seglistitem><seg>0.1 SBU</seg><seg>1.9MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Man installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Gawk, GCC,
+Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Man</title>
-<para>Issue a sed substitution:</para>
+<para>Two adjustments need to be made to the sources of Man.</para>
+
+<para>The first is a sed substitution to add the
+<parameter>-R</parameter> switch to the <envar>PAGER</envar>
+variable so that escape sequences are properly handled by Less:</para>
<screen><userinput>sed -i 's@-is@&amp;R@g' configure</userinput></screen>
-<para>Issue another sed substitution:</para>
+<para>The second is also a sed substitution to comment out the
+<quote>MANPATH /usr/man</quote> line in the
+<filename>man.conf</filename> file to prevent redundant results when
+using programs such as <command>whatis</command>:</para>
<screen><userinput>sed -i 's@MANPATH./usr/man@#&amp;@g' src/man.conf.in</userinput></screen>
-<para>Now prepare Man for compilation:</para>
+<para>Prepare Man for compilation:</para>
<screen><userinput>./configure -confdir=/etc</userinput></screen>
+<para>The meaning of the configure options:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>-confdir=/etc</parameter></term>
+<listitem><para>This tells the <command>man</command> program to look for the
+<filename>man.conf</filename> configuration file in the <filename
+class="directory">/etc</filename> directory.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>Lastly, install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<para>For some internazionalitation issues, see testing.</para>
+<note><para>To disable Select Graphic Rendition (SGR) escape
+sequences, edit the <filename>man.conf</filename> file and
+add the <parameter>-c</parameter> switch to
+the <envar>NROFF</envar> variable.</para></note>
+
+<para>If the character set uses 8-bit characters, search for the line
+beginning with <quote>NROFF</quote> in
+<filename>/etc/man.conf</filename>, and verify that it looks as
+follows:</para>
+
+<screen>NROFF /usr/bin/nroff -Tlatin1 -mandoc</screen>
+
+<para>Note that <quote>latin1</quote> should be used even if it is not
+the character set of the locale. The reason is that, according to the
+specification, <command>groff</command> has no means of typesetting
+characters outside International Organization for Standards
+(ISO) 8859-1 without some strange escape codes. When formatting manual
+pages, <command>groff</command> thinks that they are in the ISO 8859-1
+encoding and this <parameter>-Tlatin1</parameter> switch tells
+<command>groff</command> to use the same encoding for output. Since
+<command>groff</command> does no recoding of input characters, the
+formatted result is really in the same encoding as input, and therefore
+it is usable as the input for a pager.</para>
+
+<para>This does not solve the problem of a non-working
+<command>man2dvi</command> program for localized manual pages in
+non-ISO 8859-1 locales. Also, it does not work with multibyte
+character sets. The first problem does not currently have a solution.
+The second issue is not of concern because the LFS installation does
+not support multibyte character sets.</para>
+
+<para>Additional information with regards to the compression of
+man and info pages can be found in the BLFS book at
+<ulink url="&blfs-root;view/cvs/postlfs/compressdoc.html"><phrase
+condition="pdf">http://www.linuxfromscratch.org/blfs/view/cvs/postlfs/
+compressdoc.html</phrase></ulink>.</para>
</sect2>
<sect2 id="contents-man" role="content"><title>Contents of Man</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>apropos, makewhatis, man,
+man2dvi, man2html, and whatis</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="apropos">
+<term><command>apropos</command></term>
+<listitem>
+<para>Searches the whatis database and displays the short descriptions
+of system commands that contain a given string</para>
+<indexterm zone="ch-system-man apropos"><primary sortas="b-apropos">apropos</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="makewhatis">
+<term><command>makewhatis</command></term>
+<listitem>
+<para>Builds the whatis database; it reads all the manual pages in the
+manpath and writes the name and a short description in the whatis
+database for each page</para>
+<indexterm zone="ch-system-man makewhatis"><primary sortas="b-makewhatis">makewhatis</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="man">
+<term><command>man</command></term>
+<listitem>
+<para>Formats and displays the requested on-line manual page</para>
+<indexterm zone="ch-system-man man"><primary sortas="b-man">man</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="man2dvi">
+<term><command>man2dvi</command></term>
+<listitem>
+<para>Converts a manual page into dvi format</para>
+<indexterm zone="ch-system-man man2dvi"><primary sortas="b-man2dvi">man2dvi</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="man2html">
+<term><command>man2html</command></term>
+<listitem>
+<para>Converts a manual page into HTML</para>
+<indexterm zone="ch-system-man man2html"><primary sortas="b-man2html">man2html</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="whatis">
+<term><command>whatis</command></term>
+<listitem>
+<para>Searches the whatis database and displays the short descriptions
+of system commands that contain the given keyword as a separate
+word</para>
+<indexterm zone="ch-system-man whatis"><primary sortas="b-whatis">whatis</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/mktemp.xml b/chapter06/mktemp.xml
index b71176dfb..d478ab874 100644
--- a/chapter06/mktemp.xml
+++ b/chapter06/mktemp.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-mktemp" xreflabel="Mktemp" role="wrap">
+<sect1 id="ch-system-mktemp" role="wrap">
<title>Mktemp-&mktemp-version;</title>
<?dbhtml filename="mktemp.html"?>
<indexterm zone="ch-system-mktemp"><primary sortas="a-Mktemp">Mktemp</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Mktemp package contains programs used to create secure temporary
+files in shell scripts.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,24 +19,42 @@
<seglistitem><seg>0.1 SBU</seg><seg>317 KB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Mktemp installation depends on</segtitle>
+<seglistitem><seg>Coreutils, Make, and Patch</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Mktemp</title>
-<para>Apply a patch:</para>
+<para>Many scripts still use the deprecated
+<command>tempfile</command> program, which has functionality similar
+to <command>mktemp</command>. Patch Mktemp to include a
+<command>tempfile</command> wrapper:</para>
<screen><userinput>patch -Np1 -i ../mktemp-&mktemp-version;-add_tempfile-1.patch</userinput></screen>
-<para>Now prepare Mktemp for compilation:</para>
+<para>Prepare Mktemp for compilation:</para>
<screen><userinput>./configure --prefix=/usr --with-libc</userinput></screen>
+<para>The meaning of the configure option:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--with-libc</parameter></term>
+<listitem><para>This causes the <command>mktemp</command> program to
+use the <emphasis>mkstemp</emphasis> and <emphasis>mkdtemp</emphasis>
+functions from the system C library.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>Now install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install
make install-tempfile</userinput></screen>
@@ -44,8 +64,33 @@ make install-tempfile</userinput></screen>
<sect2 id="contents-mktemp" role="content"><title>Contents of Mktemp</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>mktemp and tempfile</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="mktemp">
+<term><command>mktemp</command></term>
+<listitem>
+<para>Creates temporary files in a secure manner; it is used in scripts</para>
+<indexterm zone="ch-system-mktemp mktemp"><primary sortas="b-mktemp">mktemp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tempfile">
+<term><command>tempfile</command></term>
+<listitem>
+<para>Creates temporary files in a less secure manner than
+<command>mktemp</command>; it is installed for backwards-compatibility</para>
+<indexterm zone="ch-system-mktemp tempfile"><primary sortas="b-tempfile">tempfile</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/module-init-tools.xml b/chapter06/module-init-tools.xml
index d6e84cf5d..26a8a1ad6 100644
--- a/chapter06/module-init-tools.xml
+++ b/chapter06/module-init-tools.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-module-init-tools" xreflabel="Module-Init-Tools" role="wrap">
+<sect1 id="ch-system-module-init-tools" role="wrap">
<title>Module-Init-Tools-&module-init-tools-version;</title>
<?dbhtml filename="module-init-tools.html"?>
<indexterm zone="ch-system-module-init-tools"><primary sortas="a-Module-Init-Tools">Module-Init-Tools</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Module-Init-Tools package contains programs for handling kernel
+modules in Linux kernels greater than or equal to version 2.5.47.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +19,11 @@
<seglistitem><seg>0.1 SBU</seg><seg>650 KB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Module-Init-Tools installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Bison,
+Coreutils, Diffutils, Flex, GCC, Glibc, Grep, M4, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -30,10 +37,14 @@
<screen><userinput>make DOCBOOKTOMAN=""</userinput></screen>
+<!-- Edit me -->
+<para>The <command>DOCBOOKTOMAN</command> option allows the compile process to
+complete without regenerating the man pages.</para>
+
<para>To test the results, issue:
<userinput>make check</userinput>.</para>
-<para>Install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -42,8 +53,111 @@
<sect2 id="contents-module-init-tools" role="content"><title>Contents of Module-Init-Tools</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>depmod, genksyms, insmod,
+insmod_ksymoops_clean, kallsyms (link to insmod), kernelversion, ksyms
+(link to insmod), lsmod (link to insmod), modinfo, modprobe (link to
+insmod), and rmmod (link to insmod)</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="depmod">
+<term><command>depmod</command></term>
+<listitem>
+<para>Creates a dependency file based on the symbols it finds in the
+existing set of modules; this dependency file is used by <command>modprobe</command> to
+automatically load the required modules</para>
+<indexterm zone="ch-system-module-init-tools depmod"><primary sortas="b-depmod">depmod</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="genksyms">
+<term><command>genksyms</command></term>
+<listitem>
+<para>Generates symbol version information</para>
+<indexterm zone="ch-system-module-init-tools genksyms"><primary sortas="b-genksyms">genksyms</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="insmod">
+<term><command>insmod</command></term>
+<listitem>
+<para>Installs a loadable module in the running kernel</para>
+<indexterm zone="ch-system-module-init-tools insmod"><primary sortas="b-insmod">insmod</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="insmod_ksymoops_clean">
+<term><command>insmod_ksymoops_clean</command></term>
+<listitem>
+<para>Deletes saved ksyms and modules not accessed for two days</para>
+<indexterm zone="ch-system-module-init-tools insmod_ksymoops_clean"><primary sortas="b-insmod_ksymoops_clean">insmod_ksymoops_clean</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="kallsyms">
+<term><command>kallsyms</command></term>
+<listitem>
+<para>Extracts all kernel symbols for debugging</para>
+<indexterm zone="ch-system-module-init-tools kallsyms"><primary sortas="b-kallsyms">kallsyms</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="kernelversion">
+<term><command>kernelversion</command></term>
+<listitem>
+<para>Reports the major version of the running kernel</para>
+<indexterm zone="ch-system-module-init-tools kernelversion"><primary sortas="b-kernelversion">kernelversion</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ksyms">
+<term><command>ksyms</command></term>
+<listitem>
+<para>Displays exported kernel symbols</para>
+<indexterm zone="ch-system-module-init-tools ksyms"><primary sortas="b-ksyms">ksyms</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="lsmod">
+<term><command>lsmod</command></term>
+<listitem>
+<para>Lists currently loaded modules</para>
+<indexterm zone="ch-system-module-init-tools lsmod"><primary sortas="b-lsmod">lsmod</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="modinfo">
+<term><command>modinfo</command></term>
+<listitem>
+<para>Examines an object file associated with a kernel module and
+displays any information that it can glean</para>
+<indexterm zone="ch-system-module-init-tools modinfo"><primary sortas="b-modinfo">modinfo</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="modprobe">
+<term><command>modprobe</command></term>
+<listitem>
+<para>Uses a dependency file, created by
+<command>depmod</command>, to automatically load relevant modules</para>
+<indexterm zone="ch-system-module-init-tools modprobe"><primary sortas="b-modprobe">modprobe</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="rmmod">
+<term><command>rmmod</command></term>
+<listitem>
+<para>Unloads modules from the running kernel</para>
+<indexterm zone="ch-system-module-init-tools rmmod"><primary sortas="b-rmmod">rmmod</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/ncurses.xml b/chapter06/ncurses.xml
index 61050f6ca..90ff64b51 100644
--- a/chapter06/ncurses.xml
+++ b/chapter06/ncurses.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-ncurses" xreflabel="Ncurses" role="wrap">
+<sect1 id="ch-system-ncurses" role="wrap">
<title>Ncurses-&ncurses-version;</title>
<?dbhtml filename="ncurses.html"?>
<indexterm zone="ch-system-ncurses"><primary sortas="a-Ncurses">Ncurses</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Ncurses package contains libraries for terminal-independent
+handling of character screens.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +19,11 @@
<seglistitem><seg>0.6 SBU</seg><seg>27 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Ncurses installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+Gawk, GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -30,6 +37,8 @@
<screen><userinput>make</userinput></screen>
+<para>This package does not come with a test suite.</para>
+
<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -38,15 +47,17 @@
<screen><userinput>chmod 755 /usr/lib/*.&ncurses-version;</userinput></screen>
-<para>Now fix a library:</para>
+<para>Fix a library that should not be executable:</para>
<screen><userinput>chmod 644 /usr/lib/libncurses++.a</userinput></screen>
-<para>Move the libraries to the <filename class="directory">/lib</filename> directory:</para>
+<para>Move the libraries to the <filename class="directory">/lib</filename> directory,
+where they are expected to reside:</para>
<screen><userinput>mv /usr/lib/libncurses.so.5* /lib</userinput></screen>
-<para>Recreate some symlinks:</para>
+<para>Because the libraries have been moved, a few symlinks are pointing to
+non-existent files. Recreate those symlinks:</para>
<screen><userinput>ln -sf ../../lib/libncurses.so.5 /usr/lib/libncurses.so
ln -sf libncurses.so /usr/lib/libcurses.so</userinput></screen>
@@ -55,8 +66,149 @@ ln -sf libncurses.so /usr/lib/libcurses.so</userinput></screen>
<sect2 id="contents-ncurses" role="content"><title>Contents of Ncurses</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed libraries</segtitle>
+<seglistitem><seg>captoinfo (link to tic), clear, infocmp, infotocap (link to tic),
+reset (link to tset), tack, tic, toe, tput, and tset</seg>
+<seg>libcurses.[a,so] (link to libncurses.[a,so]), libform.[a,so], libmenu.[a,so],
+libncurses++.a, libncurses.[a,so], and libpanel.[a,so]</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="captoinfo">
+<term><command>captoinfo</command></term>
+<listitem>
+<para>Converts a termcap description into a terminfo description</para>
+<indexterm zone="ch-system-ncurses captoinfo"><primary sortas="b-captoinfo">captoinfo</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="clear">
+<term><command>clear</command></term>
+<listitem>
+<para>Clears the screen, if possible</para>
+<indexterm zone="ch-system-ncurses clear"><primary sortas="b-clear">clear</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="infocmp">
+<term><command>infocmp</command></term>
+<listitem>
+<para>Compares or prints out terminfo descriptions</para>
+<indexterm zone="ch-system-ncurses infocmp"><primary sortas="b-infocmp">infocmp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="infotocap">
+<term><command>infotocap</command></term>
+<listitem>
+<para>Converts a terminfo description into a termcap description</para>
+<indexterm zone="ch-system-ncurses infotocap"><primary sortas="b-infotocap">infotocap</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="reset">
+<term><command>reset</command></term>
+<listitem>
+<para>Reinitializes a terminal to its default values</para>
+<indexterm zone="ch-system-ncurses reset"><primary sortas="b-reset">reset</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tack">
+<term><command>tack</command></term>
+<listitem>
+<para>The terminfo action checker; it is mainly used to test the
+accuracy of an entry in the terminfo database</para>
+<indexterm zone="ch-system-ncurses tack"><primary sortas="b-tack">tack</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tic">
+<term><command>tic</command></term>
+<listitem>
+<para>The terminfo entry-description compiler that translates a
+terminfo file from source format into the binary format needed for the
+ncurses library routines. A terminfo file contains information on the
+capabilities of a certain terminal</para>
+<indexterm zone="ch-system-ncurses tic"><primary sortas="b-tic">tic</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="toe">
+<term><command>toe</command></term>
+<listitem>
+<para>Lists all available terminal types, giving the primary name and
+description for each</para>
+<indexterm zone="ch-system-ncurses toe"><primary sortas="b-toe">toe</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tput">
+<term><command>tput</command></term>
+<listitem>
+<para>Makes the values of terminal-dependent capabilities available to
+the shell; it can also be used to reset or initialize a terminal or
+report its long name</para>
+<indexterm zone="ch-system-ncurses tput"><primary sortas="b-tput">tput</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tset">
+<term><command>tset</command></term>
+<listitem>
+<para>Can be used to initialize terminals</para>
+<indexterm zone="ch-system-ncurses tset"><primary sortas="b-tset">tset</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libcurses">
+<term><filename class="libraryfile">libcurses</filename></term>
+<listitem>
+<para>A link to <filename>libncurses</filename></para>
+<indexterm zone="ch-system-ncurses libcurses"><primary sortas="c-libcurses">libcurses</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libncurses">
+<term><filename class="libraryfile">libncurses</filename></term>
+<listitem>
+<para>Contains functions to display text in many complex ways on a
+terminal screen; a good example of the use of these functions is the
+menu displayed during the kernel's <command>make menuconfig</command></para>
+<indexterm zone="ch-system-ncurses libncurses"><primary sortas="c-libncurses">libncurses</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libform">
+<term><filename class="libraryfile">libform</filename></term>
+<listitem>
+<para>Contains functions to implement forms</para>
+<indexterm zone="ch-system-ncurses libform"><primary sortas="c-libform">libform</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libmenu">
+<term><filename class="libraryfile">libmenu</filename></term>
+<listitem>
+<para>Contains functions to implement menus</para>
+<indexterm zone="ch-system-ncurses libmenu"><primary sortas="c-libmenu">libmenu</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libpanel">
+<term><filename class="libraryfile">libpanel</filename></term>
+<listitem>
+<para>Contains functions to implement panels</para>
+<indexterm zone="ch-system-ncurses libpanel"><primary sortas="c-libpanel">libpanel</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/patch.xml b/chapter06/patch.xml
index 5d28069f6..d935dfc14 100644
--- a/chapter06/patch.xml
+++ b/chapter06/patch.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-patch" xreflabel="Patch" role="wrap">
+<sect1 id="ch-system-patch" role="wrap">
<title>Patch-&patch-version;</title>
<?dbhtml filename="patch.html"?>
<indexterm zone="ch-system-patch"><primary sortas="a-Patch">Patch</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Patch package contains a program for modifying files.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,12 +18,19 @@
<seglistitem><seg>0.1 SBU</seg><seg>1.9 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Patch installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Patch</title>
-<para>Prepare Patch for compilation:</para>
+<para>Prepare Patch for compilation. The preprocessor flag
+<parameter>-D_GNU_SOURCE</parameter> is only needed on the PowerPC
+platform. It can be left it out on other architectures:</para>
<screen><userinput>CPPFLAGS=-D_GNU_SOURCE ./configure --prefix=/usr</userinput></screen>
@@ -30,7 +38,9 @@
<screen><userinput>make</userinput></screen>
-<para>Now install it:</para>
+<para>This package does not come with a test suite.</para>
+
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -39,8 +49,27 @@
<sect2 id="contents-patch" role="content"><title>Contents of Patch</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed program</segtitle>
+<seglistitem><seg>patch</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="patch">
+<term><command>patch</command></term>
+<listitem>
+<para>Modifies files according to a patch file. A patch file is normally
+a difference listing created with the <command>diff</command> program. By applying
+these differences to the original files, <command>patch</command> creates the patched
+versions.</para>
+<indexterm zone="ch-system-patch patch"><primary sortas="b-patch">patch</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/perl.xml b/chapter06/perl.xml
index 1bc1397ff..1faa7a9c1 100644
--- a/chapter06/perl.xml
+++ b/chapter06/perl.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-perl" xreflabel="Perl" role="wrap">
+<sect1 id="ch-system-perl" role="wrap">
<title>Perl-&perl-version;</title>
<?dbhtml filename="perl.html"?>
<indexterm zone="ch-system-perl"><primary sortas="a-Perl">Perl</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Perl package contains the Practical Extraction and Report Language.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,24 +18,44 @@
<seglistitem><seg>2.9 SBU</seg><seg>143 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Perl installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+Gawk, GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Perl</title>
-<para>Prepare Perl for compilation:</para>
+<para>To have full control over the way Perl is set up, run the
+interactive <command>Configure</command> script and hand-pick the way
+this package is built. If the defaults it auto-detects are suitable,
+prepare Perl for compilation with:</para>
<screen><userinput>./configure.gnu --prefix=/usr -Dpager="/bin/less -isR"</userinput></screen>
+<para>The meaning of the configure option:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>-Dpager="/bin/less -isR"</parameter></term>
+<listitem><para>This corrects an error in the <command>perldoc</command> code with the invocation
+of the <command>less</command> program.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>Create a basic <filename>/etc/hosts</filename> file:</para>
+<para>To run the test suite, first create a basic
+<filename>/etc/hosts</filename> file which is needed by a couple of
+tests to resolve the network name localhost:</para>
<screen><userinput>echo "127.0.0.1 localhost $(hostname)" &gt; /etc/hosts</userinput></screen>
-<para>Run the tests:</para>
+<para>Now run the tests, if desired:</para>
<screen><userinput>make test</userinput></screen>
@@ -47,8 +68,257 @@
<sect2 id="contents-perl" role="content"><title>Contents of Perl</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed libraries</segtitle>
+<seglistitem><seg>a2p, c2ph, dprofpp, enc2xs,
+find2perl, h2ph, h2xs, libnetcfg, perl, perl&perl-version; (link to perl),
+perlbug, perlcc, perldoc, perlivp, piconv, pl2pm, pod2html, pod2latex, pod2man,
+pod2text, pod2usage, podchecker, podselect, psed (link to s2p), pstruct (link
+to c2ph), s2p, splain, and xsubpp</seg>
+<seg>Several hundred which cannot all be listed here</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="a2p">
+<term><command>a2p</command></term>
+<listitem>
+<para>Translates awk to Perl</para>
+<indexterm zone="ch-system-perl a2p"><primary sortas="b-a2p">a2p</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="c2ph">
+<term><command>c2ph</command></term>
+<listitem>
+<para>Dumps C structures as generated from <command>cc -g -S</command></para>
+<indexterm zone="ch-system-perl c2ph"><primary sortas="b-c2ph">c2ph</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="dprofpp">
+<term><command>dprofpp</command></term>
+<listitem>
+<para>Displays Perl profile data</para>
+<indexterm zone="ch-system-perl dprofpp"><primary sortas="b-dprofpp">dprofpp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="en2cxs">
+<term><command>en2cxs</command></term>
+<listitem>
+<para>Builds a Perl extension for the Encode module from either
+Unicode Character Mappings or Tcl Encoding Files</para>
+<indexterm zone="ch-system-perl en2cxs"><primary sortas="b-en2cxs">en2cxs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="find2perl">
+<term><command>find2perl</command></term>
+<listitem>
+<para>Translates <command>find</command> commands to Perl</para>
+<indexterm zone="ch-system-perl find2perl"><primary sortas="b-find2perl">find2perl</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="h2ph">
+<term><command>h2ph</command></term>
+<listitem>
+<para>Converts <filename class="extension">.h</filename> C header files to
+<filename class="extension">.ph</filename> Perl header files</para>
+<indexterm zone="ch-system-perl h2ph"><primary sortas="b-h2ph">h2ph</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="h2xs">
+<term><command>h2xs</command></term>
+<listitem>
+<para>Converts <filename class="extension">.h</filename> C header files to Perl extensions</para>
+<indexterm zone="ch-system-perl h2xs"><primary sortas="b-h2xs">h2xs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libnetcfg">
+<term><command>libnetcfg</command></term>
+<listitem>
+<para>Can be used to configure the <filename class="libraryfile">libnet</filename></para>
+<indexterm zone="ch-system-perl libnetcfg"><primary sortas="b-libnetcfg">libnetcfg</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="perl">
+<term><command>perl</command></term>
+<listitem>
+<para>Combines some of the best features of C, sed, awk and sh into a
+single swiss-army language</para>
+<indexterm zone="ch-system-perl perl"><primary sortas="b-perl">perl</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="perl-version">
+<term><command>perl&perl-version;</command></term>
+<listitem>
+<para>A hard link to <command>perl</command></para>
+<indexterm zone="ch-system-perl perl-version"><primary
+sortas="b-perl&perl-version;">perl&perl-version;</primary></indexterm>
+</listitem>
+</varlistentry>
+
+
+<varlistentry id="perlbug">
+<term><command>perlbug</command></term>
+<listitem>
+<para>Used to generate bug reports about Perl, or the modules that come
+with it, and mail them</para>
+<indexterm zone="ch-system-perl perlbug"><primary sortas="b-perlbug">perlbug</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="perlcc">
+<term><command>perlcc</command></term>
+<listitem>
+<para>Generates executables from Perl programs</para>
+<indexterm zone="ch-system-perl perlcc"><primary sortas="b-perlcc">perlcc</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="perldoc">
+<term><command>perldoc</command></term>
+<listitem>
+<para>Displays a piece of documentation in pod format that is embedded
+in the Perl installation tree or in a Perl script</para>
+<indexterm zone="ch-system-perl perldoc"><primary sortas="b-perldoc">perldoc</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="perlivp">
+<term><command>perlivp</command></term>
+<listitem>
+<para>The Perl Installation Verification Procedure; it can be used to
+verify that Perl and its libraries have been installed
+correctly</para>
+<indexterm zone="ch-system-perl perlivp"><primary sortas="b-perlivp">perlivp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="piconv">
+<term><command>piconv</command></term>
+<listitem>
+<para>A Perl version of the character encoding converter
+<command>iconv</command></para>
+<indexterm zone="ch-system-perl piconv"><primary sortas="b-piconv">piconv</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pl2pm">
+<term><command>pl2pm</command></term>
+<listitem>
+<para>A rough tool for converting Perl4 <filename class="extension">.pl</filename>
+files to Perl5 <filename class="extension">.pm</filename> modules</para>
+<indexterm zone="ch-system-perl pl2pm"><primary sortas="b-pl2pm">pl2pm</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pod2html">
+<term><command>pod2html</command></term>
+<listitem>
+<para>Converts files from pod format to HTML format</para>
+<indexterm zone="ch-system-perl pod2html"><primary sortas="b-pod2html">pod2html</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pod2latex">
+<term><command>pod2latex</command></term>
+<listitem>
+<para>Converts files from pod format to LaTeX format</para>
+<indexterm zone="ch-system-perl pod2latex"><primary sortas="b-pod2latex">pod2latex</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pod2man">
+<term><command>pod2man</command></term>
+<listitem>
+<para>Converts pod data to formatted *roff input</para>
+<indexterm zone="ch-system-perl pod2man"><primary sortas="b-pod2man">pod2man</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pod2text">
+<term><command>pod2text</command></term>
+<listitem>
+<para>Converts pod data to formatted ASCII text</para>
+<indexterm zone="ch-system-perl pod2text"><primary sortas="b-pod2text">pod2text</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pod2usage">
+<term><command>pod2usage</command></term>
+<listitem>
+<para>Prints usage messages from embedded pod docs in files</para>
+<indexterm zone="ch-system-perl pod2usage"><primary sortas="b-pod2usage">pod2usage</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="podchecker">
+<term><command>podchecker</command></term>
+<listitem>
+<para>Checks the syntax of pod format documentation files</para>
+<indexterm zone="ch-system-perl podchecker"><primary sortas="b-podchecker">podchecker</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="podselect">
+<term><command>podselect</command></term>
+<listitem>
+<para>Displays selected sections of pod documentation</para>
+<indexterm zone="ch-system-perl podselect"><primary sortas="b-podselect">podselect</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="psed">
+<term><command>psed</command></term>
+<listitem>
+<para>A Perl version of the stream editor <command>sed</command></para>
+<indexterm zone="ch-system-perl psed"><primary sortas="b-psed">psed</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pstruct">
+<term><command>pstruct</command></term>
+<listitem>
+<para>Dumps C structures as generated from <command>cc -g -S</command> stabs</para>
+<indexterm zone="ch-system-perl pstruct"><primary sortas="b-pstruct">pstruct</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="s2p">
+<term><command>s2p</command></term>
+<listitem>
+<para>Translates sed to Perl</para>
+<indexterm zone="ch-system-perl s2p"><primary sortas="b-s2p">s2p</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="splain">
+<term><command>splain</command></term>
+<listitem>
+<para>Is used to force verbose warning diagnostics in Perl</para>
+<indexterm zone="ch-system-perl splain"><primary sortas="b-splain">splain</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="xsubpp">
+<term><command>xsubpp</command></term>
+<listitem>
+<para>Converts Perl XS code into C code</para>
+<indexterm zone="ch-system-perl xsubpp"><primary sortas="b-xsubpp">xsubpp</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/procps.xml b/chapter06/procps.xml
index 09dcfafe4..102836c9a 100644
--- a/chapter06/procps.xml
+++ b/chapter06/procps.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-procps" xreflabel="Procps" role="wrap">
+<sect1 id="ch-system-procps" role="wrap">
<title>Procps-&procps-version;</title>
<?dbhtml filename="procps.html"?>
<indexterm zone="ch-system-procps"><primary sortas="a-Procps">Procps</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Procps package contains programs for monitoring processes.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,16 +18,21 @@
<seglistitem><seg>0.1 SBU</seg><seg>6.2 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Procps installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, GCC, Glibc,
+Make, and Ncurses</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Procps</title>
-<para>Compile Procps:</para>
+<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>Install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -35,8 +41,152 @@
<sect2 id="contents-procps" role="content"><title>Contents of Procps</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed library</segtitle>
+<seglistitem><seg>free, kill, pgrep, pkill,
+pmap, ps, skill, snice, sysctl, tload, top, uptime, vmstat, w, and watch</seg>
+<seg>libproc.so</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="free">
+<term><command>free</command></term>
+<listitem>
+<para>Reports the amount of free and used memory (both physical and
+swap memory) in the system</para>
+<indexterm zone="ch-system-procps free"><primary sortas="b-free">free</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="kill">
+<term><command>kill</command></term>
+<listitem>
+<para>Sends signals to processes</para>
+<indexterm zone="ch-system-procps kill"><primary sortas="b-kill">kill</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pgrep">
+<term><command>pgrep</command></term>
+<listitem>
+<para>Looks up processes based on their name and other attributes</para>
+<indexterm zone="ch-system-procps pgrep"><primary sortas="b-pgrep">pgrep</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pkill">
+<term><command>pkill</command></term>
+<listitem>
+<para>Signals processes based on their name and other attributes</para>
+<indexterm zone="ch-system-procps pkill"><primary sortas="b-pkill">pkill</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pmap">
+<term><command>pmap</command></term>
+<listitem>
+<para>Reports the memory map of the given process</para>
+<indexterm zone="ch-system-procps pmap"><primary sortas="b-pmap">pmap</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ps">
+<term><command>ps</command></term>
+<listitem>
+<para>Lists the current running processes</para>
+<indexterm zone="ch-system-procps ps"><primary sortas="b-ps">ps</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="skill">
+<term><command>skill</command></term>
+<listitem>
+<para>Sends signals to processes matching the given criteria</para>
+<indexterm zone="ch-system-procps skill"><primary sortas="b-skill">skill</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="snice">
+<term><command>snice</command></term>
+<listitem>
+<para>Changes the scheduling priority of processes matching the given criteria</para>
+<indexterm zone="ch-system-procps snice"><primary sortas="b-snice">snice</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="sysctl">
+<term><command>sysctl</command></term>
+<listitem>
+<para>Modifies kernel parameters at run time</para>
+<indexterm zone="ch-system-procps sysctl"><primary sortas="b-sysctl">sysctl</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tload">
+<term><command>tload</command></term>
+<listitem>
+<para>Prints a graph of the current system load average</para>
+<indexterm zone="ch-system-procps tload"><primary sortas="b-tload">tload</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="top">
+<term><command>top</command></term>
+<listitem>
+<para>Displays the top CPU processes; it provides an ongoing look at
+processor activity in real time</para>
+<indexterm zone="ch-system-procps top"><primary sortas="b-top">top</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="uptime">
+<term><command>uptime</command></term>
+<listitem>
+<para>Reports how long the system has been running, how many users are
+logged on, and the system load averages</para>
+<indexterm zone="ch-system-procps uptime"><primary sortas="b-uptime">uptime</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="vmstat">
+<term><command>vmstat</command></term>
+<listitem>
+<para>Reports virtual memory statistics, giving information about
+processes, memory, paging, block Input/Output (IO), traps, and CPU activity</para>
+<indexterm zone="ch-system-procps vmstat"><primary sortas="b-vmstat">vmstat</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="w">
+<term><command>w</command></term>
+<listitem>
+<para>Shows which users are currently logged on, where, and since when</para>
+<indexterm zone="ch-system-procps w"><primary sortas="b-w">w</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="watch">
+<term><command>watch</command></term>
+<listitem>
+<para>Runs a given command repeatedly, displaying the first screen-full of its
+output; this allows a user to watch the output change over time</para>
+<indexterm zone="ch-system-procps watch"><primary sortas="b-watch">watch</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libproc">
+<term><filename class="libraryfile">libproc</filename></term>
+<listitem>
+<para>Contains the functions used by most programs in this package</para>
+<indexterm zone="ch-system-procps libproc"><primary sortas="c-libproc">libproc</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/psmisc.xml b/chapter06/psmisc.xml
index 5cdaa6c0f..bcceec79a 100644
--- a/chapter06/psmisc.xml
+++ b/chapter06/psmisc.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-psmisc" xreflabel="Psmisc" role="wrap">
+<sect1 id="ch-system-psmisc" role="wrap">
<title>Psmisc-&psmisc-version;</title>
<?dbhtml filename="psmisc.html"?>
<indexterm zone="ch-system-psmisc"><primary sortas="a-Psmisc">Psmisc</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Psmisc package contains programs for displaying information on
+processes.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +19,11 @@
<seglistitem><seg>0.1 SBU</seg><seg>2.2 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Psmisc installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Gettext, Glibc, Grep, Make, Ncurses, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -26,20 +33,44 @@
<screen><userinput>./configure --prefix=/usr --exec-prefix=""</userinput></screen>
+<para>The meaning of the configure option:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>--exec-prefix=""</parameter></term>
+<listitem><para>This causes the binaries to be installed in <filename
+class="directory">/bin</filename> instead of <filename
+class="directory">/usr/bin</filename>. Because the Psmisc programs are
+often used in bootscripts, they should be available when the <filename
+class="directory">/usr</filename> file system is not
+mounted.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>Now install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<para>Move a program:</para>
+<para>There is no reason for the <command>pstree</command> and
+<command>pstree.x11</command> programs to reside in <filename
+class="directory">/bin</filename>. Therefore, move them to <filename
+class="directory">/usr/bin</filename>. Also, there is no need for
+<command>pstree.x11</command> to exist as a separate program. Make it
+a symbolic link to <command>pstree</command> instead:</para>
<screen><userinput>mv /bin/pstree* /usr/bin
ln -sf pstree /usr/bin/pstree.x11</userinput></screen>
-<para>If you're not going to use Sysvinit, you should create the following symlink:</para>
+<para>By default, Psmisc's <command>pidof</command> program is not
+installed. This usually is not a problem because it is installed later
+in the Sysvinit package, which provides a better
+<command>pidof</command> program. If Sysvinit will not be used for a
+particular system, complete the installation of Psmisc by creating the
+following symlink:</para>
<screen><userinput>ln -s killall /bin/pidof</userinput></screen>
@@ -48,8 +79,49 @@ ln -sf pstree /usr/bin/pstree.x11</userinput></screen>
<sect2 id="contents-psmisc" role="content"><title>Contents of Psmisc</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>fuser, killall, pstree, and pstree.x11 (link to pstree)</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="fuser">
+<term><command>fuser</command></term>
+<listitem>
+<para>Reports the Process IDs (PIDs) of processes that use the given files or file systems</para>
+<indexterm zone="ch-system-psmisc fuser"><primary sortas="b-fuser">fuser</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="killall">
+<term><command>killall</command></term>
+<listitem>
+<para>Kills processes by name; it sends a signal to all processes
+running any of the given commands</para>
+<indexterm zone="ch-system-psmisc killall"><primary sortas="b-killall">killall</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pstree">
+<term><command>pstree</command></term>
+<listitem>
+<para>Displays running processes as a tree</para>
+<indexterm zone="ch-system-psmisc pstree"><primary sortas="b-pstree">pstree</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pstree.x11">
+<term><command>pstree.x11</command></term>
+<listitem>
+<para>Same as <command>pstree</command>, except that it waits for confirmation before exiting</para>
+<indexterm zone="ch-system-psmisc pstree.x11"><primary sortas="b-pstree.x11">pstree.x11</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/pwdgroup.xml b/chapter06/pwdgroup.xml
index 864c818f3..990fe976e 100644
--- a/chapter06/pwdgroup.xml
+++ b/chapter06/pwdgroup.xml
@@ -7,13 +7,30 @@
<title>Creating the passwd, group, and log Files</title>
<?dbhtml filename="pwdgroup.html"?>
-<para>Create the <filename>/etc/passwd</filename> file:</para>
+<indexterm zone="ch-system-pwdgroup"><primary sortas="e-/etc/passwd">/etc/passwd</primary></indexterm>
+<indexterm zone="ch-system-pwdgroup"><primary sortas="e-/etc/group">/etc/group</primary></indexterm>
+<indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/run/utmp">/var/run/utmp</primary></indexterm>
+<indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/log/btmp">/var/log/btmp</primary></indexterm>
+<indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary></indexterm>
+<indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary></indexterm>
+
+<para>In order for user <emphasis>root</emphasis> to be able to login
+and for the name <quote>root</quote> to be recognized, there need to
+be relevant entries in the <filename>/etc/passwd</filename> and
+<filename>/etc/group</filename> files.</para>
+
+<para>Create the <filename>/etc/passwd</filename> file by running the following
+command:</para>
<screen><userinput>cat &gt; /etc/passwd &lt;&lt; "EOF"
<literal>root:x:0:0:root:/root:/bin/bash</literal>
EOF</userinput></screen>
-<para>Create the <filename>/etc/group</filename> file:</para>
+<para>The actual password for <emphasis>root</emphasis> (the <quote>x</quote>
+used here is just a placeholder) will be set later.</para>
+
+<para>Create the <filename>/etc/group</filename> file by running the following
+command:</para>
<screen><userinput>cat &gt; /etc/group &lt;&lt; "EOF"
<literal>root:x:0:
@@ -33,14 +50,49 @@ utmp:x:13:
usb:x:14:</literal>
EOF</userinput></screen>
-<para>Start a new shell:</para>
+<para>The created groups are not part of any standard&mdash;they are some
+of the groups that the Udev configuration will be using in the next
+section. The Linux Standard Base (LSB, available at <ulink
+url="http://www.linuxbase.org"/>) recommends only that, besides the
+group <quote>root</quote> with a Group ID (GID) of 0, a group
+<quote>bin</quote> with a GID of 1 be present. All other group names
+and GIDs can be chosen freely by the system administrator since
+well-written packages do not depend on GID numbers, but rather use the
+group's name.</para>
+
+<para>To remove the <quote>I have no name!</quote> prompt, start a new
+shell. Since a full Glibc was installed in <xref
+linkend="chapter-temporary-tools"/> and the
+<filename>/etc/passwd</filename> and <filename>/etc/group</filename>
+files have been created, user name and group name resolution will now
+work.</para>
<screen><userinput>exec /tools/bin/bash --login +h</userinput></screen>
-<para>Initialize the log files and give them their proper permissions:</para>
+<para>Note the use of the <parameter>+h</parameter> directive. This
+tells <command>bash</command> not to use its internal path hashing.
+Without this directive, <command>bash</command> would remember the
+paths to binaries it has executed. In order to use the newly compiled
+binaries as soon as they are installed, turn off this function for the
+duration of this chapter.</para>
+
+<para>The <command>login</command>, <command>agetty</command>, and
+<command>init</command> programs (and others) use a number of log
+files to record information such as who was logged into the system and
+when. However, these programs will not write to the log files if they
+do not already exist. Initialize the log files and give them
+proper permissions:</para>
<screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
chgrp utmp /var/run/utmp /var/log/lastlog
chmod 664 /var/run/utmp /var/log/lastlog</userinput></screen>
+<para>The <filename>/var/run/utmp</filename> file records the users
+that are currently logged in. The <filename>/var/log/wtmp</filename>
+file records all logins and logouts. The
+<filename>/var/log/lastlog</filename> file records when
+each user last logged in. The <filename>/var/log/btmp</filename> file
+records the bad login attempts.</para>
+
</sect1>
+
diff --git a/chapter06/readjusting.xml b/chapter06/readjusting.xml
index cda2768f1..5d07a94e8 100644
--- a/chapter06/readjusting.xml
+++ b/chapter06/readjusting.xml
@@ -7,31 +7,99 @@
<title>Re-adjusting the Toolchain</title>
<?dbhtml filename="readjusting.html"?>
-<para>Install the adjusted linker by running the following from within the
-<filename class="directory">binutils-build</filename> directory:</para>
+<para>Now that the new and final C libraries have been installed, it
+is time to adjust the toolchain again. The toolchain will be adjusted
+so that it will link any newly compiled program against these new
+libraries. This is the same process used in the
+<quote>Adjusting</quote> phase in the beginning of <xref
+linkend="chapter-temporary-tools"/>, even though it looks to be
+reversed. In <xref linkend="chapter-temporary-tools"/>, the chain was
+guided from the host's <filename
+class="directory">/{,usr/}lib</filename> directories to the new
+<filename class="directory">/tools/lib</filename> directory. Now, the
+chain will be guided from that same <filename
+class="directory">/tools/lib</filename> directory to the LFS
+<filename class="directory">/{,usr/}lib</filename> directories.</para>
+
+<para>Start by adjusting the linker. The source and build directories
+from the second pass over Binutils were retained for this purpose.
+Install the adjusted linker by running the following command from
+within the <filename class="directory">binutils-build</filename>
+directory:</para>
<screen><userinput>make -C ld INSTALL=/tools/bin/install install</userinput></screen>
-<para>Amend the GCC specs file:</para>
+<note><para>If the earlier warning to retain the Binutils source and
+build directories from the second pass in <xref
+linkend="chapter-temporary-tools"/> was missed, or if they were
+accidentally deleted or are inaccessible, ignore the above command.
+The result will be that the next package, Binutils, will link against
+the C libraries in <filename class="directory">/tools</filename>
+rather than in <filename class="directory">/{,usr/}lib</filename>.
+This is not ideal, however, testing has shown that the resulting
+Binutils program binaries should be identical.</para></note>
+
+<para>From now on, every compiled program will link only against the
+libraries in <filename class="directory">/usr/lib</filename> and
+<filename class="directory">/lib</filename>. The extra
+<parameter>INSTALL=/tools/bin/install</parameter> option is needed
+because the <filename>Makefile</filename> file created during the
+second pass still contains the reference to
+<command>/usr/bin/install</command>, which has not been installed yet.
+Some host distributions contain a <filename
+class="symlink">ginstall</filename> symbolic link which takes
+precedence in the <filename>Makefile</filename> file and can cause a
+problem. The above command takes care of this issue.</para>
+
+<para>Remove the Binutils source and build directories now.</para>
+
+<para>Next, amend the GCC specs file so that it points to the new
+dynamic linker. A perl command accomplishes this:</para>
<screen><userinput>perl -pi -e 's@ /tools/lib/ld-linux.so.2@ /lib/ld-linux.so.2@g;' \
-e 's@\*startfile_prefix_spec:\n@$_/usr/lib/ @g;' \
`gcc --print-file specs`</userinput></screen>
-<caution><para>Perform a simple sanity check:</para>
+<para>It is a good idea to visually inspect the specs file to verify the intended
+change was actually made.</para>
+
+<important><para>If working on a platform where the name of the
+dynamic linker is something other than
+<filename class="libraryfile">ld-linux.so.2</filename>, substitute
+<quote>ld-linux.so.2</quote> with the name of the platform's
+dynamic linker in the above commands. Refer back to <xref
+linkend="ch-tools-toolchaintechnotes" role=","/> if
+necessary.</para></important>
+
+<caution><para>It is imperative at this point to stop and ensure that
+the basic functions (compiling and linking) of the adjusted toolchain
+are working as expected. To do this, perform a sanity
+check:</para>
<screen><userinput>echo 'main(){}' &gt; dummy.c
cc dummy.c
readelf -l a.out | grep ': /lib'</userinput></screen>
-<para>The output of the last command will be:</para>
+<para>If everything is working correctly, there should be no errors,
+and the output of the last command will be (allowing for
+platform-specific differences in dynamic linker name):</para>
<screen><computeroutput>[Requesting program interpreter: /lib/ld-linux.so.2]</computeroutput></screen>
-<para>Once you are satisfied that all is well, clean up the test files:</para>
+<para>Note that <filename class="directory">/lib</filename> is now
+the prefix of our dynamic linker.</para>
-<screen><userinput>rm dummy.c a.out</userinput></screen>
-</caution>
+<para>If the output does not appear as shown above or is not received
+at all, then something is seriously wrong. Investigate and retrace the
+steps to find out where the problem is and correct it. The most likely
+reason is that something went wrong with the specs file amendment
+above. Any issues will need to be resolved before continuing on with
+the process.</para>
+<para>Once everything is working correctly, clean up the test
+files:</para>
+
+<screen><userinput>rm dummy.c a.out</userinput></screen></caution>
</sect1>
+
diff --git a/chapter06/readline.xml b/chapter06/readline.xml
index cd15918ec..7c3a1b3d0 100644
--- a/chapter06/readline.xml
+++ b/chapter06/readline.xml
@@ -3,27 +3,35 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-readline" xreflabel="Readline" role="wrap">
+<sect1 id="ch-system-readline" role="wrap">
<title>Readline-&readline-version;</title>
<?dbhtml filename="readline.html"?>
<indexterm zone="ch-system-readline"><primary sortas="a-Readline">Readline</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Readline package contains the Readline command-line library.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
-<seglistitem><seg>XXX SBU</seg><seg>3.8 MB</seg></seglistitem>
+<seglistitem><seg>0.11 SBU</seg><seg>3.8 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Readline installation depends on</segtitle>
+<seglistitem><seg>Binutils, Coreutils, Diffutils, Gawk,
+GCC, Glibc, Grep, Make, Ncurses, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Readline</title>
-<!-- NEW set of commands-->
-<para>Apply a patch.</para>
+<para>The following patch includes a fix for the problem where
+Readline sometimes only shows 33 characters on a line and then wraps
+to the next line. It also includes other fixes recommended by the
+Readline author.</para>
<screen><userinput>patch -Np1 -i ../readline-&readline-version;-fixes-1.patch</userinput></screen>
@@ -35,31 +43,71 @@
<screen><userinput>make SHLIB_XLDFLAGS=-lncurses</userinput></screen>
+<para>The meaning of the make option:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>SHLIB_XLDFLAGS=-lncurses</parameter></term>
+<listitem><para>This option forces Readline to link against the
+<filename class="libraryfile">libncurses</filename> library.</para></listitem>
+</varlistentry>
+</variablelist>
+
<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<para>Give Readline's dynamic libraries to a more appropriate permissions:</para>
+<para>Give Readline's dynamic libraries more appropriate permissions:</para>
<screen><userinput>chmod 755 /lib/lib{readline,history}.so*</userinput></screen>
-<para>Now we move the static libraries to a more appropriate location:</para>
+<para>Now we move the static libraries to a more appropriate
+location:</para>
<screen><userinput>mv /lib/lib{readline,history}.a /usr/lib</userinput></screen>
-<para>Now we will remove the old, .so files in /lib and relink them into /usr/lib.</para>
+<para>Next we will remove the old, <filename>.so</filename> files in
+<filename class="directory">/lib</filename> and relink them into
+<filename class="directory">/usr/lib</filename>.</para>
<screen><userinput>rm /lib/lib{readline,history}.so
ln -sf ../../lib/libreadline.so.5 /usr/lib/libreadline.so
ln -sf ../../lib/libhistory.so.5 /usr/lib/libhistory.so</userinput></screen>
+
</sect2>
<sect2 id="contents-readline" role="content"><title>Contents of Readline</title>
+<segmentedlist>
+<segtitle>Installed libraries</segtitle>
+<seglistitem><seg>libhistory.[a,so], and libreadline.[a,so]</seg></seglistitem>
+</segmentedlist>
-<para>See testing</para>
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="libhistory">
+<term><filename class="libraryfile">libhistory</filename></term>
+<listitem>
+<para>Provides a consistent user interface
+for recalling lines of history</para>
+<indexterm zone="ch-system-readline libhistory"><primary sortas="c-libhistory">libhistory</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libreadline">
+<term><filename class="libraryfile">libreadline</filename></term>
+<listitem>
+<para>Aids in the consistency of user interface
+across discrete programs that need to provide a command line
+interface</para>
+<indexterm zone="ch-system-readline libreadline"><primary sortas="c-libreadline">libreadline</primary></indexterm>
+</listitem>
+</varlistentry>
+
+</variablelist>
</sect2>
-
</sect1>
+
diff --git a/chapter06/revisedchroot.xml b/chapter06/revisedchroot.xml
index c6afe2bf9..00f627602 100644
--- a/chapter06/revisedchroot.xml
+++ b/chapter06/revisedchroot.xml
@@ -7,11 +7,38 @@
<title>Cleaning Up</title>
<?dbhtml filename="revisedchroot.html"?>
-<para>Modified chroot command:</para>
+<para>From now on, when reentering the chroot environment after
+exiting, use the following modified chroot command:</para>
<screen><userinput>chroot "$LFS" /usr/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/bin/bash --login</userinput></screen>
+<para>The reason for this is that, since the programs in <filename
+class="directory">/tools</filename> are no longer needed, the
+directory can be deleted to regain space. Before actually deleting the
+directory, exit from chroot and reenter it with the above command.
+Also, before removing <filename class="directory">/tools</filename>,
+tar it up and store it in a safe place in case another LFS system will
+be built.</para>
+
+<note><para>Removing <filename class="directory">/tools</filename>
+will also remove the temporary copies of Tcl, Expect, and DejaGNU
+which were used for running the toolchain tests. To use these programs
+later on, they will need to be recompiled and re-installed. The
+installation instructions are the same as in <xref
+linkend="chapter-temporary-tools"/>, apart from changing the prefix
+from <filename class="directory">/tools</filename> to <filename
+class="directory">/usr</filename>. The BLFS book discusses a slightly
+different approach to installing Tcl (see <ulink
+url="&blfs-root;"/>).</para></note>
+
+<para>The packages and patches stored in <filename
+class="directory">/sources</filename> can also be moved to a more
+usual location, such as <filename
+class="directory">/usr/src/packages</filename>. The entire directory
+can also be deleted if its contents have been burned to a CD.</para>
+
</sect1>
+
diff --git a/chapter06/sed.xml b/chapter06/sed.xml
index 2b971d9ce..e16857a5f 100644
--- a/chapter06/sed.xml
+++ b/chapter06/sed.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-sed" xreflabel="Sed" role="wrap">
+<sect1 id="ch-system-sed" role="wrap">
<title>Sed-&sed-version;</title>
<?dbhtml filename="sed.html"?>
<indexterm zone="ch-system-sed"><primary sortas="a-Sed">Sed</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Sed package contains a stream editor.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +18,11 @@
<seglistitem><seg>0.2 SBU</seg><seg>5.2 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Sed installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils,
+Diffutils, GCC, Gettext, Glibc, Grep, Make, and Texinfo</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -33,7 +39,7 @@
<para>To test the results, issue:
<userinput>make check</userinput>.</para>
-<para>Now install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -42,10 +48,24 @@
<sect2 id="contents-sed" role="content"><title>Contents of Sed</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed program</segtitle>
+<seglistitem><seg>sed</seg></seglistitem>
+</segmentedlist>
-</sect2>
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+<varlistentry id="sed">
+<term><command>sed</command></term>
+<listitem>
+<para>Filters and transforms text files in a single pass</para>
+<indexterm zone="ch-system-sed sed"><primary sortas="b-sed">sed</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
+</sect2>
</sect1>
+
diff --git a/chapter06/shadow.xml b/chapter06/shadow.xml
index 7dc58a043..91948b3a4 100644
--- a/chapter06/shadow.xml
+++ b/chapter06/shadow.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-shadow" xreflabel="Shadow" role="wrap">
+<sect1 id="ch-system-shadow" role="wrap">
<title>Shadow-&shadow-version;</title>
<?dbhtml filename="shadow.html"?>
<indexterm zone="ch-system-shadow"><primary sortas="a-Shadow">Shadow</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Shadow package contains programs for handling passwords in a secure
+way.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +19,11 @@
<seglistitem><seg>0.4 SBU</seg><seg>11 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Shadow installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Bison, Coreutils,
+Diffutils, GCC, Gettext, Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -26,7 +33,8 @@
<screen><userinput>./configure --libdir=/lib --enable-shared</userinput></screen>
-<para>Remove the installation of the groups program, and it's man page:</para>
+<para>Remove the installation of the <command>groups</command> program, and its man page as
+Coreutils provides a better version:</para>
<screen><userinput>sed -i 's/groups$(EXEEXT) //' src/Makefile
sed -i '/groups/d' man/Makefile</userinput></screen>
@@ -35,31 +43,48 @@ sed -i '/groups/d' man/Makefile</userinput></screen>
<screen><userinput>make</userinput></screen>
-<para>Then install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<para>Install two config files:</para>
+<para id="shadow-limits-login_access">Shadow uses two files to configure
+authentication settings for the system. Install these two config files:</para>
+
+<indexterm zone="shadow-limits-login_access"><primary sortas="e-/etc/limits">/etc/limits</primary></indexterm>
+<indexterm zone="shadow-limits-login_access"><primary sortas="e-/etc/login.access">/etc/login.access</primary></indexterm>
<screen><userinput>cp etc/{limits,login.access} /etc</userinput></screen>
-<para>Change a configuration file while copying it:</para>
+<para id="shadow-login_defs">Instead of using the default <emphasis>crypt</emphasis> method,
+use the more secure <emphasis>MD5</emphasis> method of password
+encryption, which also allows passwords longer than 8 characters. It
+is also necessary to change the obsolete <filename
+class="directory">/var/spool/mail</filename> location for user
+mailboxes that Shadow uses by default to the <filename
+class="directory">/var/mail</filename> location used currently. Both
+of these can be accomplished by changing the relevant configuration
+file while copying it to its destination:</para>
+
+<indexterm zone="shadow-login_defs"><primary sortas="e-/etc/login.defs">/etc/login.defs</primary></indexterm>
<screen><userinput>sed -e's@#MD5_CRYPT_ENAB.no@MD5_CRYPT_ENAB yes@' \
-e 's@/var/spool/mail@/var/mail@' \
etc/login.defs.linux &gt; /etc/login.defs</userinput></screen>
-<para>Move a program:</para>
+<para>Move a misplaced program to its proper location:</para>
<screen><userinput>mv /usr/bin/passwd /bin</userinput></screen>
-<para>Move the library:</para>
+<para>Move Shadow's libraries to more appropriate locations:</para>
<screen><userinput>mv /lib/libshadow.*a /usr/lib
rm /lib/libshadow.so
ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so</userinput></screen>
-<para>Create a dir:</para>
+<para>The <parameter>-D</parameter> option of the
+<command>useradd</command> program requires the <filename
+class="directory">/etc/default</filename> directory for it to work
+properly:</para>
<screen><userinput>mkdir /etc/default</userinput></screen>
@@ -67,8 +92,21 @@ ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so</userinput></screen>
<sect2 id="conf-shadow" role="configuration"><title>Configuring Shadow</title>
-
-<para>To enable shadowed passwords:</para>
+<indexterm zone="conf-shadow">
+<primary sortas="a-Shadow">Shadow</primary>
+<secondary>configuring</secondary></indexterm>
+
+<para>This package contains utilities to add, modify, and delete users
+and groups; set and change their passwords; and perform other
+administrative tasks. For a full explanation of what
+<emphasis>password shadowing</emphasis> means, see the
+<filename>doc/HOWTO</filename> file within the unpacked source tree.
+If using Shadow support, keep in mind that programs which need to
+verify passwords (display managers, FTP programs, pop3 daemons, etc.)
+must be shadow-compliant. That is, they need to be able to work with
+shadowed passwords.</para>
+
+<para>To enable shadowed passwords, run the following command:</para>
<screen><userinput>pwconv</userinput></screen>
@@ -76,23 +114,313 @@ ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so</userinput></screen>
<screen><userinput>grpconv</userinput></screen>
+<para>Under normal circumstances, passwords will not have been created
+yet. However, if returning to this section later to enable shadowing,
+reset any current user passwords with the <command>passwd</command>
+command or any group passwords with the <command>gpasswd</command>
+command.</para>
+
</sect2>
<sect2 role="configuration">
<title>Setting the root password</title>
-<para>Choose a password for user root and set it via:</para>
+<para>Choose a password for user <emphasis>root</emphasis> and set it
+by running:</para>
<screen><userinput>passwd root</userinput></screen>
-
</sect2>
<sect2 id="contents-shadow" role="content"><title>Contents of Shadow</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed libraries</segtitle>
+<seglistitem><seg>chage, chfn, chpasswd, chsh, expiry, faillog, gpasswd,
+groupadd, groupdel, groupmod, groups, grpck, grpconv, grpunconv, lastlog, login,
+logoutd, mkpasswd, newgrp, newusers, passwd, pwck, pwconv, pwunconv, sg
+(link to newgrp), useradd, userdel, usermod, vigr (link to vipw), and vipw</seg>
+<seg>libshadow[.a,so]</seg>
+</seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="chage">
+<term><command>chage</command></term>
+<listitem>
+<para>Used to change the maximum number of days between obligatory
+password changes</para>
+<indexterm zone="ch-system-shadow chage"><primary sortas="b-chage">chage</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="chfn">
+<term><command>chfn</command></term>
+<listitem>
+<para>Used to change a user's full name and other info</para>
+<indexterm zone="ch-system-shadow chfn"><primary sortas="b-chfn">chfn</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="chpasswd">
+<term><command>chpasswd</command></term>
+<listitem>
+<para>Used to update the passwords of an entire series of user
+accounts</para>
+<indexterm zone="ch-system-shadow chpasswd"><primary sortas="b-chpasswd">chpasswd</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="chsh">
+<term><command>chsh</command></term>
+<listitem>
+<para>Used to change a user's default login shell</para>
+<indexterm zone="ch-system-shadow chsh"><primary sortas="b-chsh">chsh</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="expiry">
+<term><command>expiry</command></term>
+<listitem>
+<para>Checks and enforces the current password expiration policy</para>
+<indexterm zone="ch-system-shadow expiry"><primary sortas="b-expiry">expiry</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="faillog">
+<term><command>faillog</command></term>
+<listitem>
+<para>Is used to examine the log of login failures, to set a maximum number of
+failures before an account is blocked, or to reset the failure count</para>
+<indexterm zone="ch-system-shadow faillog"><primary sortas="b-faillog">faillog</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="gpasswd">
+<term><command>gpasswd</command></term>
+<listitem>
+<para>Is used to add and delete members and administrators to groups</para>
+<indexterm zone="ch-system-shadow gpasswd"><primary sortas="b-gpasswd">gpasswd</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="groupadd">
+<term><command>groupadd</command></term>
+<listitem>
+<para>Creates a group with the given name</para>
+<indexterm zone="ch-system-shadow groupadd"><primary sortas="b-groupadd">groupadd</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="groupdel">
+<term><command>groupdel</command></term>
+<listitem>
+<para>Deletes the group with the given name</para>
+<indexterm zone="ch-system-shadow groupdel"><primary sortas="b-groupdel">groupdel</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="groupmod">
+<term><command>groupmod</command></term>
+<listitem>
+<para>Is used to modify the given group's name or GID</para>
+<indexterm zone="ch-system-shadow groupmod"><primary sortas="b-groupmod">groupmod</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="groups">
+<term><command>groups</command></term>
+<listitem>
+<para>Reports the groups of which the given users are members</para>
+<indexterm zone="ch-system-shadow groups"><primary sortas="b-groups">groups</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="grpck">
+<term><command>grpck</command></term>
+<listitem>
+<para>Verifies the integrity of the group files <filename>/etc/group</filename>
+and <filename>/etc/gshadow</filename></para>
+<indexterm zone="ch-system-shadow grpck"><primary sortas="b-grpck">grpck</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="grpconv">
+<term><command>grpconv</command></term>
+<listitem>
+<para>Creates or updates the shadow group file from the normal group file</para>
+<indexterm zone="ch-system-shadow grpconv"><primary sortas="b-grpconv">grpconv</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="grpunconv">
+<term><command>grpunconv</command></term>
+<listitem>
+<para>Updates <filename>/etc/group</filename>
+from <filename>/etc/gshadow</filename> and then deletes the latter</para>
+<indexterm zone="ch-system-shadow grpunconv"><primary sortas="b-grpunconv">grpunconv</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="lastlog">
+<term><command>lastlog</command></term>
+<listitem>
+<para>Reports the most recent login of all users or of a given user</para>
+<indexterm zone="ch-system-shadow lastlog"><primary sortas="b-lastlog">lastlog</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="login">
+<term><command>login</command></term>
+<listitem>
+<para>Is used by the system to let users sign on</para>
+<indexterm zone="ch-system-shadow login"><primary sortas="b-login">login</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="logoutd">
+<term><command>logoutd</command></term>
+<listitem>
+<para>Is a daemon used to enforce restrictions on log-on time and ports</para>
+<indexterm zone="ch-system-shadow logoutd"><primary sortas="b-logoutd">logoutd</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mkpasswd">
+<term><command>mkpasswd</command></term>
+<listitem>
+<para>Generates random passwords</para>
+<indexterm zone="ch-system-shadow mkpasswd"><primary sortas="b-mkpasswd">mkpasswd</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="newgrp">
+<term><command>newgrp</command></term>
+<listitem>
+<para>Is used to change the current GID during a login session</para>
+<indexterm zone="ch-system-shadow newgrp"><primary sortas="b-newgrp">newgrp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="newusers">
+<term><command>newusers</command></term>
+<listitem>
+<para>Is used to create or update an entire series of user accounts</para>
+<indexterm zone="ch-system-shadow newusers"><primary sortas="b-newusers">newusers</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="passwd">
+<term><command>passwd</command></term>
+<listitem>
+<para>Is used to change the password for a user or group account</para>
+<indexterm zone="ch-system-shadow passwd"><primary sortas="b-passwd">passwd</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pwck">
+<term><command>pwck</command></term>
+<listitem>
+<para>Verifies the integrity of the password files
+<filename>/etc/passwd</filename> and <filename>/etc/shadow</filename></para>
+<indexterm zone="ch-system-shadow pwck"><primary sortas="b-pwck">pwck</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pwconv">
+<term><command>pwconv</command></term>
+<listitem>
+<para>Creates or updates the shadow password file from the normal
+password file</para>
+<indexterm zone="ch-system-shadow pwconv"><primary sortas="b-pwconv">pwconv</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pwunconv">
+<term><command>pwunconv</command></term>
+<listitem>
+<para>Updates <filename>/etc/passwd</filename>
+from <filename>/etc/shadow</filename> and then deletes the latter</para>
+<indexterm zone="ch-system-shadow pwunconv"><primary sortas="b-pwunconv">pwunconv</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="sg">
+<term><command>sg</command></term>
+<listitem>
+<para>Executes a given command while the user's GID
+is set to that of the given group</para>
+<indexterm zone="ch-system-shadow sg"><primary sortas="b-sg">sg</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="su">
+<term><command>su</command></term>
+<listitem>
+<indexterm zone="ch-system-shadow su"><primary sortas="b-su">su</primary></indexterm>
+<para>Runs a shell with substitute user and group IDs</para>
+</listitem>
+</varlistentry>
+
+<varlistentry id="useradd">
+<term><command>useradd</command></term>
+<listitem>
+<para>Creates a new user with the given name, or updates the default
+new-user information</para>
+<indexterm zone="ch-system-shadow useradd"><primary sortas="b-useradd">useradd</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="userdel">
+<term><command>userdel</command></term>
+<listitem>
+<para>Deletes the given user account</para>
+<indexterm zone="ch-system-shadow userdel"><primary sortas="b-userdel">userdel</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="usermod">
+<term><command>usermod</command></term>
+<listitem>
+<para>Is used to modify the given user's login name, User
+Identification (UID),
+shell, initial group, home directory, etc.</para>
+<indexterm zone="ch-system-shadow usermod"><primary sortas="b-usermod">usermod</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="vigr">
+<term><command>vigr</command></term>
+<listitem>
+<para>Edits the <filename>/etc/group</filename> or
+<filename>/etc/gshadow</filename> files</para>
+<indexterm zone="ch-system-shadow vigr"><primary sortas="b-vigr">vigr</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="vipw">
+<term><command>vipw</command></term>
+<listitem>
+<para>Edits the <filename>/etc/passwd</filename> or
+<filename>/etc/shadow</filename> files</para>
+<indexterm zone="ch-system-shadow vipw"><primary sortas="b-vipw">vipw</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="libshadow">
+<term><filename class="libraryfile">libshadow</filename></term>
+<listitem>
+<para>Contains functions used by most programs in this package</para>
+<indexterm zone="ch-system-shadow libshadow"><primary sortas="c-libshadow">libshadow</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/strippingagain.xml b/chapter06/strippingagain.xml
index e0531df3e..f6c5fa2ec 100644
--- a/chapter06/strippingagain.xml
+++ b/chapter06/strippingagain.xml
@@ -1,24 +1,54 @@
<?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="ch-system-strippingagain">
<title>Stripping Again</title>
<?dbhtml filename="strippingagain.html"?>
-<para>Exit from chroot:</para>
+<para>If the intended user is not a programmer and does not plan to do
+any debugging on the system software, the system size can be decreased
+by about 200 MB by removing the debugging symbols from binaries and
+libraries. This causes no inconvenience other than not being able to
+debug the software fully anymore.</para>
+
+<para>Most people who use the command mentioned below do not
+experience any difficulties. However, it is easy to make a typo and
+render the new system unusable, so before running the
+<command>strip</command> command, it is a good idea to make a
+backup of the current situation.</para>
+
+<para>Before performing the stripping, take special care to ensure that
+none of the binaries that are about to be stripped are running. If
+unsure whether the user entered chroot with the command given in
+<xref linkend="ch-system-chroot" role=","/> first exit from
+chroot:</para>
<screen><userinput>logout</userinput></screen>
-<para>Reenter with:</para>
+<para>Then reenter it with:</para>
<screen><userinput>chroot $LFS /tools/bin/env -i \
HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/tools/bin/bash --login</userinput></screen>
-<para>Strip the binaries and libraries:</para>
+<para>Now the binaries and libraries can be safely stripped:</para>
<screen><userinput>/tools/bin/find /{,usr/}{bin,lib,sbin} -type f \
-exec /tools/bin/strip --strip-debug '{}' ';'</userinput></screen>
+<para>A large number of files will be reported as having their file
+format not recognized. These warnings can be safely ignored. These
+warnings indicate that those files are scripts instead of
+binaries.</para>
+
+<para>If disk space is very tight, the
+<parameter>--strip-all</parameter> option can be used on the binaries
+in <filename class="directory">/{,usr/}{bin,sbin}</filename> to gain
+several more megabytes. Do not use this option on libraries&mdash;they will
+be destroyed.</para>
+
</sect1>
diff --git a/chapter06/syslogng.xml b/chapter06/syslogng.xml
index 249fdbc99..04b432af6 100644
--- a/chapter06/syslogng.xml
+++ b/chapter06/syslogng.xml
@@ -10,6 +10,8 @@
<indexterm zone="ch-system-syslogng"><primary sortas="a-Syslogng">Syslog-ng</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Syslog-ng package contains programs for logging system messages, such
+as those given by the kernel when unusual things happen.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +19,10 @@
<seglistitem><seg>Unchecked</seg><seg>Unchecked</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Syslog-ng installation depends on</segtitle>
+<seglistitem><seg>Unchecked</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -26,11 +32,11 @@
<screen><userinput>./configure --prefix=/usr --sysconfdir=/etc</userinput></screen>
-<para>Compile Syslog-ng:</para>
+<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
-<para>Now install it:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -38,8 +44,14 @@
<sect2 id="conf-syslogng" role="configuration"><title>Configuring Syslog-ng</title>
+<indexterm zone="conf-syslogng">
+<primary sortas="a-Syslogng">Syslog-ng</primary>
+<secondary>configuring</secondary></indexterm>
+
+<indexterm zone="conf-syslogng"><primary sortas="e-/etc/syslog-ng/syslog-ng.conf">/etc/syslog-ng/syslog-ng.conf</primary></indexterm>
-<para>Create a <filename>/etc/syslog-ng/syslog-ng.conf</filename> file:</para>
+<para>Create a new <filename>/etc/syslog-ng/syslog-ng.conf</filename> file by
+running the following:</para>
<screen><userinput>mkdir -p /etc/syslog-ng
cat &gt; /etc/syslog-ng/syslog-ng.conf &lt;&lt; "EOF"
@@ -121,7 +133,26 @@ EOF</userinput></screen>
<sect2 id="contents-syslogng" role="content"><title>Contents of Syslog-ng</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>Unchecked</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="syslog-ng">
+<term><command>syslog-ng</command></term>
+<listitem>
+<indexterm zone="ch-system-syslogng"><primary sortas="b-syslog-ng">syslog-ng</primary></indexterm>
+<para>Logs the messages that system programs
+offer for logging. Every logged message contains at least a date stamp and a
+hostname, and normally the program's name too, but that depends on how
+trusting the logging daemon is told to be.</para>
+</listitem>
+
+</varlistentry>
+</variablelist>
</sect2>
diff --git a/chapter06/sysvinit.xml b/chapter06/sysvinit.xml
index b3cfab986..65af49d7f 100644
--- a/chapter06/sysvinit.xml
+++ b/chapter06/sysvinit.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-sysvinit" xreflabel="Sysvinit" role="wrap">
+<sect1 id="ch-system-sysvinit" role="wrap">
<title>Sysvinit-&sysvinit-version;</title>
<?dbhtml filename="sysvinit.html"?>
<indexterm zone="ch-system-sysvinit"><primary sortas="a-Sysvinit">Sysvinit</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Sysvinit package contains programs for controlling the startup,
+running, and shutdown of the system.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,21 +19,34 @@
<seglistitem><seg>0.1 SBU</seg><seg> 0.9 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Sysvinit installation depends on</segtitle>
+<seglistitem><seg>Binutils, Coreutils, GCC, Glibc, and Make</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Sysvinit</title>
-<para>Issue a sed sustitution:</para>
+<para>When run-levels are changed (for example, when halting the
+system), <command>init</command> sends termination signals to those
+processes that <command>init</command> itself started and that should
+not be running in the new run-level. While doing this,
+<command>init</command> outputs messages like <quote>Sending processes
+the TERM signal</quote> which seem to imply that it is sending these
+signals to all currently running processes. To avoid this
+misinterpretation, modify the source so that these messages read like
+<quote>Sending processes started by init the TERM signal</quote>
+instead:</para>
<screen><userinput>sed -i 's@Sending processes@&amp; started by init@g' \
src/init.c</userinput></screen>
-<para>Compile Sysvinit:</para>
+<para>Compile the package:</para>
<screen><userinput>make -C src</userinput></screen>
-<para>Then install it:</para>
+<para>Install the package:</para>
<screen><userinput>make -C src install</userinput></screen>
@@ -39,8 +54,14 @@
<sect2 id="conf-sysvinit" role="configuration"><title>Configuring Sysvinit</title>
+<indexterm zone="conf-sysvinit">
+<primary sortas="a-Sysvinit">Sysvinit</primary>
+<secondary>configuring</secondary></indexterm>
+
+<indexterm zone="conf-sysvinit"><primary sortas="e-/etc/inittab">/etc/inittab</primary></indexterm>
-<para>Create a <filename>/etc/inittab</filename> file:</para>
+<para>Create a new file <filename>/etc/inittab</filename> by running the
+following:</para>
<screen><userinput>cat &gt; /etc/inittab &lt;&lt; "EOF"
<literal># Begin /etc/inittab
@@ -71,14 +92,90 @@ su:S016:once:/sbin/sulogin
# End /etc/inittab</literal>
EOF</userinput></screen>
+<para>The <parameter>-I '\033(K'</parameter> option tells
+<command>agetty</command> to send this escape sequence to the terminal
+before doing anything else. This escape sequence switches the console
+character set to a user-defined one, which can be modified by running
+the <command>setfont</command> program. The <command>console</command>
+initscript from the LFS-Bootscripts package calls the <command>setfont</command>
+program during system startup. Sending this escape sequence is
+necessary for people who use non-ISO 8859-1 screen fonts, but it does
+not effect native English speakers.</para>
+
</sect2>
<sect2 id="contents-sysvinit" role="content"><title>Contents of Sysvinit</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>halt, init, killall5, last, lastb (link to last), mesg, pidof (link to
+killall5), poweroff (link to halt), reboot (link to halt), runlevel, shutdown, sulogin, telinit
+(link to init), utmpdump, and wall</seg></seglistitem>
+</segmentedlist>
-<!-- This should be added to testing:
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="halt">
+<term><command>halt</command></term>
+<listitem>
+<para>Normally invokes <command>shutdown</command> with the
+<parameter>-h</parameter> option, except when already in run-level 0,
+then it tells the kernel to halt the system; it notes in the
+file <filename>/var/log/wtmp</filename> that the system is being
+brought down</para>
+<indexterm zone="ch-system-sysvinit halt"><primary sortas="b-halt">halt</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="init">
+<term><command>init</command></term>
+<listitem>
+<para>The first process to be started when the kernel has initialized
+the hardware which takes over the boot process and
+starts all the proceses it is instructed to</para>
+<indexterm zone="ch-system-sysvinit init"><primary sortas="b-init">init</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="killall5">
+<term><command>killall5</command></term>
+<listitem>
+<para>Sends a signal to all processes, except the processes in its own
+session so it will not kill the shell running the script that called
+it</para>
+<indexterm zone="ch-system-sysvinit killall5"><primary sortas="b-killall5">killall5</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="last">
+<term><command>last</command></term>
+<listitem>
+<para>Shows which users last logged in (and out),
+searching back through the <filename>/var/log/wtmp</filename> file; it
+also shows system boots, shutdowns, and run-level changes</para>
+<indexterm zone="ch-system-sysvinit last"><primary sortas="b-last">last</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="lastb">
+<term><command>lastb</command></term>
+<listitem>
+<para>Shows the failed login attempts, as logged in
+<filename>/var/log/btmp</filename></para>
+<indexterm zone="ch-system-sysvinit lastb"><primary sortas="b-lastb">lastb</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mesg">
+<term><command>mesg</command></term>
+<listitem>
+<para>Controls whether other users can send messages to the current
+user's terminal</para>
+<indexterm zone="ch-system-sysvinit mesg"><primary sortas="b-mesg">mesg</primary></indexterm>
+</listitem>
+</varlistentry>
<varlistentry id="mountpoint">
<term><command>mountpoint</command></term>
@@ -88,8 +185,86 @@ EOF</userinput></screen>
</listitem>
</varlistentry>
--->
+<varlistentry id="pidof">
+<term><command>pidof</command></term>
+<listitem>
+<para>Reports the PIDs of the given programs</para>
+<indexterm zone="ch-system-sysvinit pidof"><primary sortas="b-pidof">pidof</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="poweroff">
+<term><command>poweroff</command></term>
+<listitem>
+<para>Tells the kernel to halt the system and switch off the computer
+(see <command>halt</command>)</para>
+<indexterm zone="ch-system-sysvinit poweroff"><primary sortas="b-poweroff">poweroff</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="reboot">
+<term><command>reboot</command></term>
+<listitem>
+<para>Tells the kernel to reboot the system (see
+<command>halt</command>)</para>
+<indexterm zone="ch-system-sysvinit reboot"><primary sortas="b-reboot">reboot</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="runlevel">
+<term><command>runlevel</command></term>
+<listitem>
+<para>Reports the previous and the current run-level, as noted in the last run-level
+record in <filename>/var/run/utmp</filename></para>
+<indexterm zone="ch-system-sysvinit runlevel"><primary sortas="b-runlevel">runlevel</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="shutdown">
+<term><command>shutdown</command></term>
+<listitem>
+<para>Brings the system down in a secure way, signaling all processes
+and notifying all logged-in users</para>
+<indexterm zone="ch-system-sysvinit shutdown"><primary sortas="b-shutdown">shutdown</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="sulogin">
+<term><command>sulogin</command></term>
+<listitem>
+<para>Allows <emphasis>root</emphasis> to log in; it is
+normally invoked by <command>init</command> when the system goes into single user mode</para>
+<indexterm zone="ch-system-sysvinit sulogin"><primary sortas="b-sulogin">sulogin</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="telinit">
+<term><command>telinit</command></term>
+<listitem>
+<para>Tells <command>init</command> which run-level to change to</para>
+<indexterm zone="ch-system-sysvinit telinit"><primary sortas="b-telinit">telinit</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="utmpdump">
+<term><command>utmpdump</command></term>
+<listitem>
+<para>Displays the content of the given login file in a more
+user-friendly format</para>
+<indexterm zone="ch-system-sysvinit utmpdump"><primary sortas="b-utmpdump">utmpdump</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="wall">
+<term><command>wall</command></term>
+<listitem>
+<para>Writes a message to all logged-in users</para>
+<indexterm zone="ch-system-sysvinit wall"><primary sortas="b-wall">wall</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/tar.xml b/chapter06/tar.xml
index 48c821b2f..9c6b581b5 100644
--- a/chapter06/tar.xml
+++ b/chapter06/tar.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-tar" xreflabel="Tar" role="wrap">
+<sect1 id="ch-system-tar" role="wrap">
<title>Tar-&tar-version;</title>
<?dbhtml filename="tar.html"?>
<indexterm zone="ch-system-tar"><primary sortas="a-Tar">Tar</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Tar package contains an archiving program.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +18,11 @@
<seglistitem><seg>0.2 SBU</seg><seg>10 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Tar installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils,
+Diffutils, GCC, Gettext, Glibc, Grep, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -33,7 +39,7 @@
<para>To test the results, issue:
<userinput>make check</userinput>.</para>
-<para>Now install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
@@ -42,8 +48,33 @@
<sect2 id="contents-tar" role="content"><title>Contents of Tar</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>rmt and tar</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="rmt">
+<term><command>rmt</command></term>
+<listitem>
+<para>Remotely manipulates a magnetic
+tape drive through an interprocess communication connection</para>
+<indexterm zone="ch-system-tar rmt"><primary sortas="b-rmt">rmt</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tar">
+<term><command>tar</command></term>
+<listitem>
+<para>Creates and extracts files from archives, also known as tarballs</para>
+<indexterm zone="ch-system-tar tar"><primary sortas="b-tar">tar</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/texinfo.xml b/chapter06/texinfo.xml
index 65b0a6d9d..7560a62a0 100644
--- a/chapter06/texinfo.xml
+++ b/chapter06/texinfo.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-texinfo" xreflabel="Texinfo" role="wrap">
+<sect1 id="ch-system-texinfo" role="wrap">
<title>Texinfo-&texinfo-version;</title>
<?dbhtml filename="texinfo.html"?>
<indexterm zone="ch-system-texinfo"><primary sortas="a-Texinfo">Texinfo</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Texinfo package contains programs for reading, writing, and
+converting Info documents.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,6 +19,11 @@
<seglistitem><seg>0.2 SBU</seg><seg>17 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Texinfo installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils,
+Diffutils, GCC, Gettext, Glibc, Grep, Make, Ncurses, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
@@ -37,12 +44,29 @@
<screen><userinput>make install</userinput></screen>
-<para>Optionally install the components belonging in a TeX installation:</para>
+<para>Optionally, install the components belonging in a TeX installation:</para>
<screen><userinput>make TEXMF=/usr/share/texmf install-tex</userinput></screen>
-<para>If ever you need to recreate the
-<filename>/usr/share/info/dir</filename> file, run this:</para>
+<para>The meaning of the make parameter:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>TEXMF=/usr/share/texmf</parameter></term>
+<listitem><para>The <envar>TEXMF</envar> makefile variable holds the location of the
+root of the TeX tree if, for example, a TeX package will be installed
+later.</para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>The Info documentation system uses a plain text file to hold its
+list of menu entries. The file is located at
+<filename>/usr/share/info/dir</filename>. Unfortunately, due to
+occasional problems in the Makefiles of various packages, it can
+sometimes get out of step with the Info manuals installed on the
+system. If the <filename>/usr/share/info/dir</filename> file ever
+needs to be recreated, the following optional commands will accomplish
+the task:</para>
<screen><userinput>cd /usr/share/info
rm dir
@@ -52,11 +76,74 @@ done</userinput></screen>
</sect2>
-
<sect2 id="contents-texinfo" role="content"><title>Contents of Texinfo</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>info, infokey, install-info,
+makeinfo, texi2dvi, and texindex</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="info">
+<term><command>info</command></term>
+<listitem>
+<para>Used to read Info documents which are similar to man
+pages, but often go much deeper than just explaining all the command
+line options. For example, compare <command>man bison</command> and
+<command>info bison</command>.</para>
+<indexterm zone="ch-system-texinfo info"><primary sortas="b-info">info</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="infokey">
+<term><command>infokey</command></term>
+<listitem>
+<para>Compiles a source file containing Info customizations into a
+binary format</para>
+<indexterm zone="ch-system-texinfo infokey"><primary sortas="b-infokey">infokey</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="install-info">
+<term><command>install-info</command></term>
+<listitem>
+<para>Used to install Info files; it updates entries in the Info index
+file</para>
+<indexterm zone="ch-system-texinfo install-info"><primary sortas="b-install-info">install-info</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="makeinfo">
+<term><command>makeinfo</command></term>
+<listitem>
+<para>Translates the given Texinfo source documents into
+info files, plain text, or HTML</para>
+<indexterm zone="ch-system-texinfo makeinfo"><primary sortas="b-makeinfo">makeinfo</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="texi2dvi">
+<term><command>texi2dvi</command></term>
+<listitem>
+<para>Used to format the given Texinfo document into a
+device-independent file that can be printed</para>
+<indexterm zone="ch-system-texinfo texi2dvi"><primary sortas="b-texi2dvi">texi2dvi</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="texindex">
+<term><command>texindex</command></term>
+<listitem>
+<para>Used to sort Texinfo index files</para>
+<indexterm zone="ch-system-texinfo texindex"><primary sortas="b-texindex">texindex</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/udev.xml b/chapter06/udev.xml
index b1a34c51d..e25ed756d 100644
--- a/chapter06/udev.xml
+++ b/chapter06/udev.xml
@@ -10,6 +10,7 @@
<indexterm zone="ch-system-udev"><primary sortas="a-Udev">Udev</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Udev package contains programs for dynamic creation of device nodes.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,36 +18,128 @@
<seglistitem><seg>0.2 SBU</seg><seg>5.2 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Udev installation depends on</segtitle>
+<seglistitem><seg>Coreutils and Make</seg></seglistitem>
+</segmentedlist>
+
</sect2>
<sect2 role="installation">
<title>Installation of Udev</title>
-<para>Compile Udev:</para>
+<para>Compile the package:</para>
<screen><userinput>make udevdir=/dev</userinput></screen>
-<para>Install it:</para>
+<variablelist>
+<varlistentry>
+<term><parameter>udevdir=/dev</parameter></term>
+<listitem><para>This tells <command>udev</command> in which directory
+devices nodes are to be created.</para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>This package does not come with a test suite.</para>
+
+<para>Install the package:</para>
<screen><userinput>make udevdir=/dev install</userinput></screen>
-<para>Install our configuration files:</para>
+<para>Udev's configuration is far from ideal by default, so install
+the configuration files here:</para>
<screen><userinput>cp ../udev-config-2.permissions \
/etc/udev/permissions.d/25-lfs.permissions
cp ../udev-config-1.rules /etc/udev/rules.d/25-lfs.rules</userinput></screen>
-<para>Create the full compliment of device nodes:</para>
+<!-- Edit Me -->
+<para>Run the <command>udevstart</command> program to create our full
+compliment of device nodes.</para>
<screen><userinput>/sbin/udevstart</userinput></screen>
</sect2>
-
<sect2 id="contents-udev" role="content"><title>Contents of Udev</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<segtitle>Installed directory</segtitle>
+<seglistitem><seg>udev, udevd, udevsend, udevstart, udevinfo, and udevtest</seg>
+<seg>/etc/udev</seg></seglistitem>
+</segmentedlist>
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="udev">
+<term><command>udev</command></term>
+<listitem>
+<para>Creates device nodes in <filename
+class="directory">/dev</filename> or renames network interfaces (not
+in LFS) in response to hotplug events</para>
+<indexterm zone="ch-system-udev udev"><primary sortas="b-udev">udev</primary></indexterm>
+</listitem></varlistentry>
+
+<varlistentry id="udevd">
+<term><command>udevd</command></term>
+<listitem>
+<para>A daemon that reorders hotplug events before submitting them to
+<command>udev</command>,
+thus avoiding various race conditions</para>
+<indexterm zone="ch-system-udev udevd"><primary sortas="b-udevd">udevd</primary></indexterm>
+</listitem></varlistentry>
+
+<varlistentry id="udevsend">
+<term><command>udevsend</command></term>
+<listitem>
+<para>Delivers hotplug events to <command>udevd</command></para>
+<indexterm zone="ch-system-udev udevsend"><primary sortas="b-udevsend">udevsend</primary></indexterm>
+</listitem></varlistentry>
+
+<varlistentry id="udevstart">
+<term><command>udevstart</command></term>
+<listitem>
+<para>Creates device nodes in <filename
+class="directory">/dev</filename> that correspond to drivers compiled directly
+into the kernel; it performs that task by simulating hotplug events presumably
+dropped by the kernel before invocation of this program (e.g., because the root
+filesystem has not been mounted) and submitting such synthetic hotplug events
+to <command>udev</command></para>
+<indexterm zone="ch-system-udev udevstart"><primary sortas="b-udevstart">udevstart</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="udevinfo">
+<term><command>udevinfo</command></term>
+<listitem>
+<para>Allows users to query the <command>udev</command> database for
+information on any device currently present on the system; it also
+provides a way to query any device in the <systemitem
+class="filesystem">sysfs</systemitem> tree to help create udev
+rules</para>
+<indexterm zone="ch-system-udev udevinfo"><primary sortas="b-udevinfo">udevinfo</primary></indexterm>
+</listitem></varlistentry>
+
+<varlistentry id="udevtest">
+<term><command>udevtest</command></term>
+<listitem>
+<para>Simulates a <command>udev</command> run for the given device,
+and prints out the name of the node the real <command>udev</command> would
+have created or (not in LFS) the name of the renamed network interface</para>
+<indexterm zone="ch-system-udev udevtest"><primary sortas="b-udevtest">udevtest</primary></indexterm>
+</listitem></varlistentry>
+
+<varlistentry id="etc-udev">
+<term><filename class="directory">/etc/udev</filename></term>
+<listitem>
+<para>Contains <command>udev</command> configuation files,
+device permissions, and rules for device naming</para>
+<indexterm zone="ch-system-udev etc-udev"><primary sortas="e-etc-udev">/etc/udev</primary></indexterm>
+</listitem></varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/util-linux.xml b/chapter06/util-linux.xml
index 8ea6d5b2b..fcdc35383 100644
--- a/chapter06/util-linux.xml
+++ b/chapter06/util-linux.xml
@@ -3,13 +3,16 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-util-linux" xreflabel="Util-linux" role="wrap">
+<sect1 id="ch-system-util-linux" role="wrap">
<title>Util-linux-&util-linux-version;</title>
<?dbhtml filename="util-linux.html"?>
<indexterm zone="ch-system-util-linux"><primary sortas="a-Util-linux">Util-linux</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Util-linux package contains miscellaneous utility programs. Among
+them are utilities for handling file systems, consoles, partitions, and
+messages.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,12 +20,22 @@
<seglistitem><seg>0.2 SBU</seg><seg>16 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Util-linux installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils,
+Diffutils, GCC, Gettext, Glibc, Grep, Make, Ncurses, Sed, and Zlib</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>FHS compliance notes</title>
-<para>Issue a sed sustitution:</para>
+<para>The FHS recommends using the <filename
+class="directory">/var/lib/hwclock</filename> directory instead of the
+usual <filename class="directory">/etc</filename> directory as the
+location for the <filename>adjtime</filename> file. To make the
+<command>hwclock</command> program FHS-compliant, run the
+following:</para>
<screen><userinput>sed -i 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
hwclock/hwclock.c
@@ -46,17 +59,566 @@ linux-libc-headers. The following patch properly fixes that issue</para>
<screen><userinput>make HAVE_KILL=yes HAVE_SLN=yes</userinput></screen>
-<para>Now install the package:</para>
+<para>The meaning of the make parameters:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>HAVE_KILL=yes</parameter></term>
+<listitem><para>This prevents the
+<command>kill</command> program (already installed by Procps) from being
+built and installed again.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>HAVE_SLN=yes</parameter></term>
+<listitem><para>This prevents the <command>sln</command> program (a
+statically linked version of <command>ln</command> already installed
+by Glibc) from being built and installed again.</para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>This package does not come with a test suite.</para>
+
+<para>Install the package:</para>
<screen><userinput>make HAVE_KILL=yes HAVE_SLN=yes install</userinput></screen>
</sect2>
-
<sect2 id="contents-utillinux" role="content"><title>Contents of Util-linux</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>agetty, arch, blockdev, cal, cfdisk, chkdupexe, col, colcrt,
+colrm, column, ctrlaltdel, cytune, ddate, dmesg, elvtune, fdformat, fdisk,
+fsck.cramfs, fsck.minix, getopt, hexdump, hwclock, ipcrm, ipcs, isosize, line,
+logger, look, losetup, mcookie, mkfs, mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap,
+more, mount, namei, pg, pivot_root, ramsize (link to rdev), raw, rdev, readprofile,
+rename, renice, rev, rootflags (link to rdev), script, setfdprm, setsid, setterm,
+sfdisk, swapdev, swapoff (link to swapon), swapon, tunelp, ul, umount, vidmode (link to rdev),
+whereis, and write</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="agetty">
+<term><command>agetty</command></term>
+<listitem>
+<para>Opens a tty port, prompts for a login name,
+and then invokes the <command>login</command> program</para>
+<indexterm zone="ch-system-util-linux agetty"><primary sortas="b-agetty">agetty</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="arch">
+<term><command>arch</command></term>
+<listitem>
+<para>Reports the machine's architecture</para>
+<indexterm zone="ch-system-util-linux arch"><primary sortas="b-arch">arch</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="blockdev">
+<term><command>blockdev</command></term>
+<listitem>
+<para>Allows users to call block device ioctls from the command line</para>
+<indexterm zone="ch-system-util-linux blockdev"><primary sortas="b-blockdev">blockdev</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="cal">
+<term><command>cal</command></term>
+<listitem>
+<para>Displays a simple calendar</para>
+<indexterm zone="ch-system-util-linux cal"><primary sortas="b-cal">cal</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="cfdisk">
+<term><command>cfdisk</command></term>
+<listitem>
+<para>Manipulates the partition table of the given device</para>
+<indexterm zone="ch-system-util-linux cfdisk"><primary sortas="b-cfdisk">cfdisk</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="chkdupexe">
+<term><command>chkdupexe</command></term>
+<listitem>
+<para>Finds duplicate executables</para>
+<indexterm zone="ch-system-util-linux chkdupexe"><primary sortas="b-chkdupexe">chkdupexe</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="col">
+<term><command>col</command></term>
+<listitem>
+<para>Filters out reverse line feeds</para>
+<indexterm zone="ch-system-util-linux col"><primary sortas="b-col">col</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="colcrt">
+<term><command>colcrt</command></term>
+<listitem>
+<para>Filters <command>nroff</command> output for terminals
+that lack some capabilities, such as overstriking and half-lines</para>
+<indexterm zone="ch-system-util-linux colcrt"><primary sortas="b-colcrt">colcrt</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="colrm">
+<term><command>colrm</command></term>
+<listitem>
+<para>Filters out the given columns</para>
+<indexterm zone="ch-system-util-linux colrm"><primary sortas="b-colrm">colrm</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="column">
+<term><command>column</command></term>
+<listitem>
+<para>Formats a given file into multiple columns</para>
+<indexterm zone="ch-system-util-linux column"><primary sortas="b-column">column</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ctrlaltdel">
+<term><command>ctrlaltdel</command></term>
+<listitem>
+<para>Sets the function of the Ctrl+Alt+Del key combination to a hard or a
+soft reset</para>
+<indexterm zone="ch-system-util-linux ctrlaltdel"><primary sortas="b-ctrlaltdel">ctrlaltdel</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="cytune">
+<term><command>cytune</command></term>
+<listitem>
+<para>Tunes the parameters of the serial line drivers for
+Cyclades cards</para>
+<indexterm zone="ch-system-util-linux cytune"><primary sortas="b-cytune">cytune</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ddate">
+<term><command>ddate</command></term>
+<listitem>
+<para>Gives the Discordian date or converts the given Gregorian date
+to a Discordian one</para>
+<indexterm zone="ch-system-util-linux ddate"><primary sortas="b-ddate">ddate</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="dmesg">
+<term><command>dmesg</command></term>
+<listitem>
+<para>Dumps the kernel boot messages</para>
+<indexterm zone="ch-system-util-linux dmesg"><primary sortas="b-dmesg">dmesg</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="elvtune">
+<term><command>elvtune</command></term>
+<listitem>
+<para>Tunes the performance and interactivity of a block
+device</para>
+<indexterm zone="ch-system-util-linux elvtune"><primary sortas="b-elvtune">elvtune</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="fdformat">
+<term><command>fdformat</command></term>
+<listitem>
+<para>Low-level formats a floppy disk</para>
+<indexterm zone="ch-system-util-linux fdformat"><primary sortas="b-fdformat">fdformat</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="fdisk">
+<term><command>fdisk</command></term>
+<listitem>
+<para>Manipulates the partition table of the given device</para>
+<indexterm zone="ch-system-util-linux fdisk"><primary sortas="b-fdisk">fdisk</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="fsck.cramfs">
+<term><command>fsck.cramfs</command></term>
+<listitem>
+<para>Performs a consistency check on the Cramfs file system on the
+given device</para>
+<indexterm zone="ch-system-util-linux fsck.cramfs"><primary sortas="b-fsck.cramfs">fsck.cramfs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="fsck.minix">
+<term><command>fsck.minix</command></term>
+<listitem>
+<para>Performs a consistency check on the Minix file system on the
+given device</para>
+<indexterm zone="ch-system-util-linux fsck.minix"><primary sortas="b-fsck.minix">fsck.minix</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="getopt">
+<term><command>getopt</command></term>
+<listitem>
+<para>Parses options in the given command line</para>
+<indexterm zone="ch-system-util-linux getopt"><primary sortas="b-getopt">getopt</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hexdump">
+<term><command>hexdump</command></term>
+<listitem>
+<para>Dumps the given file in hexadecimal or in another given format</para>
+<indexterm zone="ch-system-util-linux hexdump"><primary sortas="b-hexdump">hexdump</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hwclock">
+<term><command>hwclock</command></term>
+<listitem>
+<para>Reads or sets the system's hardware clock, also called
+the Real-Time Clock (RTC)) or Basic Input-Output System (BIOS)
+clock</para>
+<indexterm zone="ch-system-util-linux hwclock"><primary sortas="b-hwclock">hwclock</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ipcrm">
+<term><command>ipcrm</command></term>
+<listitem>
+<para>Removes the given Inter-Process Communication (IPC) resource</para>
+<indexterm zone="ch-system-util-linux ipcrm"><primary sortas="b-ipcrm">ipcrm</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ipcs">
+<term><command>ipcs</command></term>
+<listitem>
+<para>Provides IPC status information</para>
+<indexterm zone="ch-system-util-linux ipcs"><primary sortas="b-ipcs">ipcs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="isosize">
+<term><command>isosize</command></term>
+<listitem>
+<para>Reports the size of an iso9660 file system</para>
+<indexterm zone="ch-system-util-linux isosize"><primary sortas="b-isosize">isosize</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="line">
+<term><command>line</command></term>
+<listitem>
+<para>Copies a single line</para>
+<indexterm zone="ch-system-util-linux line"><primary sortas="b-line">line</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="logger">
+<term><command>logger</command></term>
+<listitem>
+<para>Enters the given message into the system log</para>
+<indexterm zone="ch-system-util-linux logger"><primary sortas="b-logger">logger</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="look">
+<term><command>look</command></term>
+<listitem>
+<para>Displays lines that begin with the given string</para>
+<indexterm zone="ch-system-util-linux look"><primary sortas="b-look">look</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="losetup">
+<term><command>losetup</command></term>
+<listitem>
+<para>Sets up and controls loop devices</para>
+<indexterm zone="ch-system-util-linux losetup"><primary sortas="b-losetup">losetup</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mcookie">
+<term><command>mcookie</command></term>
+<listitem>
+<para>Generates magic cookies (128-bit random hexadecimal numbers) for
+<command>xauth</command></para>
+<indexterm zone="ch-system-util-linux mcookie"><primary sortas="b-mcookie">mcookie</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mkfs">
+<term><command>mkfs</command></term>
+<listitem>
+<para>Builds a file system on a device (usually a hard disk
+partition)</para>
+<indexterm zone="ch-system-util-linux mkfs"><primary sortas="b-mkfs">mkfs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mkfs.bfs">
+<term><command>mkfs.bfs</command></term>
+<listitem>
+<para>Creates an Santa Cruz Operations (SCO) bfs file system</para>
+<indexterm zone="ch-system-util-linux mkfs.bfs"><primary sortas="b-mkfs.bfs">mkfs.bfs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mkfs.cramfs">
+<term><command>mkfs.cramfs</command></term>
+<listitem>
+<para>Creates a cramfs file system</para>
+<indexterm zone="ch-system-util-linux mkfs.cramfs"><primary sortas="b-mkfs.cramfs">mkfs.cramfs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mkfs.minix">
+<term><command>mkfs.minix</command></term>
+<listitem>
+<para>Creates a Minix file system</para>
+<indexterm zone="ch-system-util-linux mkfs.minix"><primary sortas="b-mkfs.minix">mkfs.minix</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mkswap">
+<term><command>mkswap</command></term>
+<listitem>
+<para>Initializes the given device or file to be used as a swap area</para>
+<indexterm zone="ch-system-util-linux mkswap"><primary sortas="b-mkswap">mkswap</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="more">
+<term><command>more</command></term>
+<listitem>
+<para>A filter for paging through text one screen at a time</para>
+<indexterm zone="ch-system-util-linux more"><primary sortas="b-more">more</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mount">
+<term><command>mount</command></term>
+<listitem>
+<para>Attaches the file system on the given device to a specified
+directory in the file-system tree</para>
+<indexterm zone="ch-system-util-linux mount"><primary sortas="b-mount">mount</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="namei">
+<term><command>namei</command></term>
+<listitem>
+<para>Shows the symbolic links in the given pathnames</para>
+<indexterm zone="ch-system-util-linux namei"><primary sortas="b-namei">namei</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pg">
+<term><command>pg</command></term>
+<listitem>
+<para>Displays a text file one screen full at a time</para>
+<indexterm zone="ch-system-util-linux pg"><primary sortas="b-pg">pg</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pivot_root">
+<term><command>pivot_root</command></term>
+<listitem>
+<para>Makes the given file system the new root file system of the
+current process</para>
+<indexterm zone="ch-system-util-linux pivot_root"><primary sortas="b-pivot_root">pivot_root</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ramsize">
+<term><command>ramsize</command></term>
+<listitem>
+<para>Sets the size of the RAM disk in a bootable image</para>
+<indexterm zone="ch-system-util-linux ramsize"><primary sortas="b-ramsize">ramsize</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="raw">
+<term><command>raw</command></term>
+<listitem>
+<para>Used to bind a Linux raw character device to a block
+device</para>
+<indexterm zone="ch-system-util-linux raw"><primary sortas="b-raw">raw</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="rdev">
+<term><command>rdev</command></term>
+<listitem>
+<para>Queries and sets the root device, among other things, in a
+bootable image</para>
+<indexterm zone="ch-system-util-linux rdev"><primary sortas="b-rdev">rdev</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="readprofile">
+<term><command>readprofile</command></term>
+<listitem>
+<para>Reads kernel profiling information</para>
+<indexterm zone="ch-system-util-linux readprofile"><primary sortas="b-readprofile">readprofile</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="rename">
+<term><command>rename</command></term>
+<listitem>
+<para>Renames the given files, replacing a given string with another</para>
+<indexterm zone="ch-system-util-linux rename"><primary sortas="b-rename">rename</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="renice">
+<term><command>renice</command></term>
+<listitem>
+<para>Alters the priority of running processes</para>
+<indexterm zone="ch-system-util-linux renice"><primary sortas="b-renice">renice</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="rev">
+<term><command>rev</command></term>
+<listitem>
+<para>Reverses the lines of a given file</para>
+<indexterm zone="ch-system-util-linux rev"><primary sortas="b-rev">rev</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="rootflags">
+<term><command>rootflags</command></term>
+<listitem>
+<para>Sets the rootflags in a bootable image</para>
+<indexterm zone="ch-system-util-linux rootflags"><primary sortas="b-rootflags">rootflags</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="script">
+<term><command>script</command></term>
+<listitem>
+<para>Makes a typescript of a terminal session</para>
+<indexterm zone="ch-system-util-linux script"><primary sortas="b-script">script</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="setfdprm">
+<term><command>setfdprm</command></term>
+<listitem>
+<para>Sets user-provided floppy disk parameters</para>
+<indexterm zone="ch-system-util-linux setfdprm"><primary sortas="b-setfdprm">setfdprm</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="setsid">
+<term><command>setsid</command></term>
+<listitem>
+<para>Runs the given program in a new session</para>
+<indexterm zone="ch-system-util-linux setsid"><primary sortas="b-setsid">setsid</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="setterm">
+<term><command>setterm</command></term>
+<listitem>
+<para>Sets terminal attributes</para>
+<indexterm zone="ch-system-util-linux setterm"><primary sortas="b-setterm">setterm</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="sfdisk">
+<term><command>sfdisk</command></term>
+<listitem>
+<para>A disk partition table manipulator</para>
+<indexterm zone="ch-system-util-linux sfdisk"><primary sortas="b-sfdisk">sfdisk</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="swapdev">
+<term><command>swapdev</command></term>
+<listitem>
+<para>Sets the swap device in a bootable image</para>
+<indexterm zone="ch-system-util-linux swapdev"><primary sortas="b-swapdev">swapdev</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="swapoff">
+<term><command>swapoff</command></term>
+<listitem>
+<para>Disables devices and files for paging and swapping</para>
+<indexterm zone="ch-system-util-linux swapoff"><primary sortas="b-swapoff">swapoff</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="swapon">
+<term><command>swapon</command></term>
+<listitem>
+<para>Enables devices and files for paging and swapping</para>
+<indexterm zone="ch-system-util-linux swapon"><primary sortas="b-swapon">swapon</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tunelp">
+<term><command>tunelp</command></term>
+<listitem>
+<para>Tunes the parameters of the line printer</para>
+<indexterm zone="ch-system-util-linux tunelp"><primary sortas="b-tunelp">tunelp</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ul">
+<term><command>ul</command></term>
+<listitem>
+<para>A filter for translating underscores into
+escape sequences indicating underlining for the terminal in use</para>
+<indexterm zone="ch-system-util-linux ul"><primary sortas="b-ul">ul</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="umount">
+<term><command>umount</command></term>
+<listitem>
+<para>Disconnects a file system from the system's file tree</para>
+<indexterm zone="ch-system-util-linux umount"><primary sortas="b-umount">umount</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="vidmode">
+<term><command>vidmode</command></term>
+<listitem>
+<para>Sets the video mode in a bootable image</para>
+<indexterm zone="ch-system-util-linux vidmode"><primary sortas="b-vidmode">vidmode</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="whereis">
+<term><command>whereis</command></term>
+<listitem>
+<para>Reports the location of binary, the source, and the manual page
+for the given command</para>
+<indexterm zone="ch-system-util-linux whereis"><primary sortas="b-whereis">whereis</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="write">
+<term><command>write</command></term>
+<listitem>
+<para>Sends a message to the given user
+<emphasis>if</emphasis> that user has not disabled receipt of such messages</para>
+<indexterm zone="ch-system-util-linux write"><primary sortas="b-write">write</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/vim.xml b/chapter06/vim.xml
index aeeaf535c..ec263cced 100644
--- a/chapter06/vim.xml
+++ b/chapter06/vim.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-vim" xreflabel="Vim" role="wrap">
+<sect1 id="ch-system-vim" role="wrap">
<title>Vim-&vim-version;</title>
<?dbhtml filename="vim.html"?>
<indexterm zone="ch-system-vim"><primary sortas="a-Vim">Vim</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Vim package contains a powerful text editor.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,12 +18,30 @@
<seglistitem><seg>0.4 SBU</seg><seg>34 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Vim installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
+GCC, Glibc, Grep, Make, Ncurses, and Sed</seg></seglistitem>
+</segmentedlist>
+
+<tip>
+<title>Alternatives to Vim</title>
+<para>If you prefer another editor&mdash;such as Emacs, Joe, or
+Nano&mdash;please refer to <ulink url="&blfs-root;view/svn/postlfs/editors.html"/>
+for suggested installation instructions.</para>
+</tip>
</sect2>
<sect2 role="installation">
<title>Installation of Vim</title>
-<para>Change the default locations of the configuration files:</para>
+<para>First, unpack both
+<filename>vim-&vim-version;.tar.bz2</filename> and (optionally)
+<filename>vim-&vim-version;-lang.tar.gz</filename> archives into the
+same directory. Then, change the default locations of the
+<filename>vimrc</filename> and <filename>gvimrc</filename>
+configuration files to <filename
+class="directory">/etc</filename>:</para>
<screen><userinput>echo '#define SYS_VIMRC_FILE "/etc/vimrc"' &gt;&gt; src/feature.h
echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' &gt;&gt; src/feature.h</userinput></screen>
@@ -36,28 +55,56 @@ following patch fixes the problem:</para>
<screen><userinput>./configure --prefix=/usr --enable-multibyte</userinput></screen>
+<para>The optional but highly recommended
+<parameter>--enable-multibyte</parameter> switch includes support for
+editing files in multibyte character encodings into
+<command>vim</command>. This is needed if using a locale with
+a multibyte character set. This switch is also helpful to be able to
+edit text files initially created in Linux distributions like Fedora
+Core that use UTF-8 as a default character set.</para>
+
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen>
<para>To test the results, issue:
-<userinput>make test</userinput></para>
+<userinput>make test</userinput>. However, this test suite outputs a
+lot of chaotic characters to the screen, which can cause issues with
+the settings of the current terminal. Therefore, running the test
+suite here is optional.</para>
-<para>Now install the package:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
-<para>Create a symlink:</para>
+<para>Many users are used to using <command>vi</command> instead of
+<command>vim</command>. To allow execution of <command>vim</command>
+when users habitually enter <command>vi</command>, create a
+symlink:</para>
<screen><userinput>ln -s vim /usr/bin/vi</userinput></screen>
-</sect2>
+<para>If the X Window System is going to be installed on the LFS
+system, it may be necessary to recompile Vim after installing X. Vim
+comes with a GUI version of the editor that requires X and some
+additional libraries to be installed. For more information on this
+process, refer to the Vim documentation and the Vim installation page
+in the BLFS book at <ulink
+url="&blfs-root;view/svn/postlfs/editors.html#postlfs-editors-vim"/>.</para>
+</sect2>
<sect2 id="conf-vim" role="configuration"><title>Configuring Vim</title>
+<indexterm zone="conf-vim"><primary sortas="e-/etc/vim">/etc/vim</primary></indexterm>
-<para>Create a default vim configuration file by running
-the following:</para>
+<para>By default, <command>vim</command> runs in vi-incompatible mode.
+This may be new to users who have used other editors in the past. The
+<quote>nocompatible</quote> setting is included below to highlight the
+fact that a new behavior is being used. It also reminds those who
+would change to <quote>compatible</quote> mode that it should appear
+first. This is necessary because it changes other settings, and
+overrides must come after this setting. Create a default <command>vim</command>
+configuration file by running the following:</para>
<screen><userinput>cat &gt; /etc/vimrc &lt;&lt; "EOF"
<literal>" Begin /etc/vimrc
@@ -65,7 +112,6 @@ the following:</para>
set nocompatible
set backspace=2
syntax on
-<!-- set fileencodings=ucs-bom,utf-8,<replaceable>[your-8-bit-charset]</replaceable> -->
if (&amp;term == "iterm") || (&amp;term == "putty")
set background=dark
endif
@@ -73,32 +119,215 @@ endif
" End /etc/vimrc</literal>
EOF</userinput></screen>
-<!-- XXX: the ascii-only files are considered to be in utf-8 - that's not what
-one expects . That's why fileencodings stuff is commented out for now
-
-The <parameter>set fileencodings=...</parameter> makes
-<command>vim</command> capable of automatically detecting the character
-set of the file being edited (replace
-"<replaceable>[your-8-bit-charset]</replaceable>"
-with the value appropriate for your country, e.g. iso-8859-15 in Italy).
-This line is useful because bleeding-edge distributions
-like Fedora Core use UTF-8, and conservative ones like Debian
-use traditional 8-bit encodings for text files. If you have not
-passed the <parameter>- -enable-multibyte</parameter> switch to the
-<command>./configure</command> command above, this line will not work. -->
-
-<para>Documentation for other available options can be obtained by running
-the following command:</para>
+<para>The <parameter>set nocompatible</parameter> makes
+<command>vim</command> behave in a more useful way (the default) than
+the vi-compatible manner. Remove the <quote>no</quote> to keep the
+old <command>vi</command> behavior. The <parameter>set
+backspace=2</parameter> allows backspacing over line breaks,
+autoindents, and the start of insert. The <parameter>syntax
+on</parameter> enables vim's syntax highlighting. Finally, the
+<emphasis>if</emphasis> statement with the <parameter>set
+background=dark</parameter> corrects <command>vim</command>'s guess
+about the background color of some terminal emulators. This gives the
+highlighting a better color scheme for use on the black background of
+these programs.</para>
+
+<para>Documentation for other available options can be obtained by
+running the following command:</para>
<screen><userinput>vim -c ':options'</userinput></screen>
</sect2>
-
<sect2 id="contents-vim" role="content"><title>Contents of Vim</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed programs</segtitle>
+<seglistitem><seg>efm_filter.pl, efm_perl.pl, ex (link to vim), less.sh, mve.awk,
+pltags.pl, ref, rview (link to vim), rvim (link to vim), shtags.pl, tcltags, vi (link to vim),
+view (link to vim), vim, vim132, vim2html.pl, vimdiff (link to vim), vimm, vimspell.sh,
+vimtutor, and xxd</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="efm_filter.pl">
+<term><command>efm_filter.pl</command></term>
+<listitem>
+<para>A filter for creating an error file that can be read by <command>vim</command></para>
+<indexterm zone="ch-system-vim efm_filter.pl"><primary sortas="b-efm_filter.pl">efm_filter.pl</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="efm_perl.pl">
+<term><command>efm_perl.pl</command></term>
+<listitem>
+<para>Reformats the error messages of the
+Perl interpreter for use with the <quote>quickfix</quote> mode of <command>vim</command></para>
+<indexterm zone="ch-system-vim efm_perl.pl"><primary sortas="b-efm_perl.pl">efm_perl.pl</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ex">
+<term><command>ex</command></term>
+<listitem>
+<para>Starts <command>vim</command> in ex mode</para>
+<indexterm zone="ch-system-vim ex"><primary sortas="b-ex">ex</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="less.sh">
+<term><command>less.sh</command></term>
+<listitem>
+<para>A script that starts <command>vim</command> with less.vim</para>
+<indexterm zone="ch-system-vim less.sh"><primary sortas="b-less.sh">less.sh</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mve.awk">
+<term><command>mve.awk</command></term>
+<listitem>
+<para>Processes <command>vim</command> errors</para>
+<indexterm zone="ch-system-vim mve.awk"><primary sortas="b-mve.awk">mve.awk</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="pltags.pl">
+<term><command>pltags.pl</command></term>
+<listitem>
+<para>Creates a tags file for Perl code for use by <command>vim</command></para>
+<indexterm zone="ch-system-vim pltags.pl"><primary sortas="b-pltags.pl">pltags.pl</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ref">
+<term><command>ref</command></term>
+<listitem>
+<para>Checks the spelling of arguments</para>
+<indexterm zone="ch-system-vim ref"><primary sortas="b-ref">ref</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="rview">
+<term><command>rview</command></term>
+<listitem>
+<para>Is a restricted version of <command>view</command>; no shell
+commands can be started and <command>view</command> cannot be suspended</para>
+<indexterm zone="ch-system-vim rview"><primary sortas="b-rview">rview</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="rvim">
+<term><command>rvim</command></term>
+<listitem>
+<para>Is a restricted version of <command>vim</command>; no shell
+commands can be started and <command>vim</command> cannot be suspended</para>
+<indexterm zone="ch-system-vim rvim"><primary sortas="b-rvim">rvim</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="shtags.pl">
+<term><command>shtags.pl</command></term>
+<listitem>
+<para>Generates a tag file for Perl scripts</para>
+<indexterm zone="ch-system-vim shtags.pl"><primary sortas="b-shtags.pl">shtags.pl</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="tcltags">
+<term><command>tcltags</command></term>
+<listitem>
+<para>Generates a tag file for TCL code</para>
+<indexterm zone="ch-system-vim tcltags"><primary sortas="b-tcltags">tcltags</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="view">
+<term><command>view</command></term>
+<listitem>
+<para>Starts <command>vim</command> in read-only mode</para>
+<indexterm zone="ch-system-vim view"><primary sortas="b-view">view</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="vi">
+<term><command>vi</command></term>
+<listitem>
+<para>Is the editor</para>
+<indexterm zone="ch-system-vim vi"><primary sortas="b-vi">vi</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="vim">
+<term><command>vim</command></term>
+<listitem>
+<para>Is the editor</para>
+<indexterm zone="ch-system-vim vim"><primary sortas="b-vim">vim</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="vim132">
+<term><command>vim132</command></term>
+<listitem>
+<para>Starts <command>vim</command> with the terminal in 132-column mode</para>
+<indexterm zone="ch-system-vim vim132"><primary sortas="b-vim132">vim132</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="vim2html.pl">
+<term><command>vim2html.pl</command></term>
+<listitem>
+<para>Converts Vim documentation to HypterText Markup Language (HTML)</para>
+<indexterm zone="ch-system-vim vim2html.pl"><primary sortas="b-vim2html.pl">vim2html.pl</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="vimdiff">
+<term><command>vimdiff</command></term>
+<listitem>
+<para>Edits two or three versions of a file with <command>vim</command> and show differences</para>
+<indexterm zone="ch-system-vim vimdiff"><primary sortas="b-vimdiff">vimdiff</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="vimm">
+<term><command>vimm</command></term>
+<listitem>
+<para>Enables the DEC locator input model on a remote terminal</para>
+<indexterm zone="ch-system-vim vimm"><primary sortas="b-vimm">vimm</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="vimspell.sh">
+<term><command>vimspell.sh</command></term>
+<listitem>
+<para>Spells a file and generates the syntax statements necessary
+to highlight in <command>vim</command>. This script requires the old Unix <command>spell</command>
+command, which is provided neither in LFS nor in BLFS</para>
+<indexterm zone="ch-system-vim vimspell.sh"><primary sortas="b-vimspell.sh">vimspell.sh</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="vimtutor">
+<term><command>vimtutor</command></term>
+<listitem>
+<para>Teaches the basic keys and commands of <command>vim</command></para>
+<indexterm zone="ch-system-vim vimtutor"><primary sortas="b-vimtutor">vimtutor</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="xxd">
+<term><command>xxd</command></term>
+<listitem>
+<para>Creates a hex dump of the given file; it can
+also do the reverse, so it can be used for binary patching</para>
+<indexterm zone="ch-system-vim xxd"><primary sortas="b-xxd">xxd</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter06/zlib.xml b/chapter06/zlib.xml
index 606751c8d..77c731ba9 100644
--- a/chapter06/zlib.xml
+++ b/chapter06/zlib.xml
@@ -3,13 +3,15 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-system-zlib" xreflabel="Zlib" role="wrap">
+<sect1 id="ch-system-zlib" role="wrap">
<title>Zlib-&zlib-version;</title>
<?dbhtml filename="zlib.html"?>
<indexterm zone="ch-system-zlib"><primary sortas="a-Zlib">Zlib</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Zlib package contains compression and un-compression routines used by
+some programs.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,12 +19,22 @@
<seglistitem><seg>0.1 SBU</seg><seg>1.5 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Zlib installation depends on</segtitle>
+<seglistitem><seg>Binutils, Coreutils, GCC, Glibc, Make, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Zlib</title>
-<!-- NEW set of commands-->
+<note><para>Zlib is known to build its shared library incorrectly if
+<envar>CFLAGS</envar> is specified in the environment. If using a
+specified <envar>CFLAGS</envar>
+variable, be sure to add the <parameter>-fPIC</parameter> directive to
+the <envar>CFLAGS</envar> variable for the duration of the
+configure command below, then remove it afterwards.</para></note>
+
<para>Prepare Zlib for compilation:</para>
<screen><userinput>./configure --prefix=/usr --shared --libdir=/lib</userinput></screen>
@@ -38,25 +50,27 @@
<screen><userinput>make install</userinput></screen>
-<para>Now we will remove the old, .so files in /lib and relink them into /usr/lib.</para>
+<para>Next we will remove the old, <filename>.so</filename> files in
+the <filename class="directory">/lib</filename> directory and relink them
+into <filename class="directory">/usr/lib</filename>.</para>
<screen><userinput>rm /lib/libz.so
ln -sf ../../lib/libz.so.&zlib-version; /usr/lib/libz.so</userinput></screen>
-<para>Now also build the non-shared (static) library:</para>
+<para>Build the static library:</para>
<screen><userinput>make clean
./configure --prefix=/usr
make</userinput></screen>
-<para>To again test the results, issue:
+<para>To test the results again, issue:
<userinput>make check</userinput>.</para>
<para>Install the static library:</para>
<screen><userinput>make install</userinput></screen>
-<para>And fix the permissions on the static library:</para>
+<para>Fix the permissions on the static library:</para>
<screen><userinput>chmod 644 /usr/lib/libz.a</userinput></screen>
@@ -65,8 +79,25 @@ make</userinput></screen>
<sect2 id="contents-zlib" role="content"><title>Contents of Zlib</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed libraries</segtitle>
+<seglistitem><seg>libz[a,so]</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="libz">
+<term><filename class="libraryfile">libz</filename></term>
+<listitem>
+<para>Contains compression and un-compression
+functions used by some programs</para>
+<indexterm zone="ch-system-zlib libz"><primary sortas="c-libz">libz</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter07/bootscripts.xml b/chapter07/bootscripts.xml
index 171330018..71d3a353f 100644
--- a/chapter07/bootscripts.xml
+++ b/chapter07/bootscripts.xml
@@ -3,13 +3,14 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-scripts-bootscripts" xreflabel="Bootscripts" role="wrap">
+<sect1 id="ch-scripts-bootscripts" role="wrap">
<title>LFS-Bootscripts-&lfs-bootscripts-version;</title>
<?dbhtml filename="bootscripts.html"?>
<indexterm zone="ch-scripts-bootscripts"><primary sortas="a-Bootscripts">Bootscripts</primary></indexterm>
<sect2 role="package"><title/>
+<para>The LFS-Bootscripts package contains a set of bootscripts.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
@@ -17,22 +18,220 @@
<seglistitem><seg>0.1 SBU</seg><seg>0.3 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>LFS-Bootscripts installation depends on</segtitle>
+<seglistitem><seg>Bash and Coreutils</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of LFS-Bootscripts</title>
-<para>Installation of the bootscripts is very simple:</para>
+<para>Install the package:</para>
<screen><userinput>make install</userinput></screen>
</sect2>
-
<sect2 id="contents-bootscripts" role="content"><title>Contents of LFS-bootscripts</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed scripts</segtitle>
+<seglistitem><seg>checkfs, cleanfs, console, functions, halt, ifdown, ifup,
+localnet, mountfs, mountkernfs, network, rc, reboot, sendsignals, setclock, static,
+swap, sysklogd, template, and udev</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="checkfs-bootscripts">
+<term><command>checkfs</command></term>
+<listitem>
+<para>Checks the file systems before they are mounted (with the exception of journal
+and network based file systems)</para>
+<indexterm zone="ch-scripts-bootscripts checkfs-bootscripts"><primary sortas="d-checkfs">checkfs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="cleanfs-bootscripts">
+<term><command>cleanfs</command></term>
+<listitem>
+<para>Removes files that should not be
+preserved between reboots, such as those in <filename class="directory">/var/run/</filename> and
+<filename class="directory">/var/lock/</filename>; it re-creates <filename>/var/run/utmp</filename>
+and removes the possibly present <filename>/etc/nologin</filename>,
+<filename>/fastboot</filename>, and <filename>/forcefsck</filename> files</para>
+<indexterm zone="ch-scripts-bootscripts cleanfs-bootscripts"><primary sortas="d-cleanfs">cleanfs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="console-bootscripts">
+<term><command>console</command></term>
+<listitem>
+<para>Loads the keymap table specified as proper for the keyboard
+layout; it also sets the screen font</para>
+<indexterm zone="ch-scripts-bootscripts console-bootscripts"><primary sortas="d-console">console</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="functions-bootscripts">
+<term><command>functions</command></term>
+<listitem>
+<para>Contains functions shared among different scripts, such as error
+and status checking</para>
+<indexterm zone="ch-scripts-bootscripts functions-bootscripts"><primary sortas="d-functions">functions</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="halt-bootscripts">
+<term><command>halt</command></term>
+<listitem>
+<para>Halts the system</para>
+<indexterm zone="ch-scripts-bootscripts halt-bootscripts"><primary sortas="d-halt">halt</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="hotplug-bootscripts">
+<term><command>hotplug</command></term>
+<listitem>
+<para>Load modules for system devices</para>
+<indexterm zone="ch-scripts-bootscripts hotplug-bootscripts"><primary sortas="d-hotplug">hotplug</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ifdown-bootscripts">
+<term><command>ifdown</command></term>
+<listitem>
+<para>Assists the network script with network devices</para>
+<indexterm zone="ch-scripts-bootscripts ifdown-bootscripts"><primary sortas="d-ifdown">ifdown</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="ifup-bootscripts">
+<term><command>ifup</command></term>
+<listitem>
+<para>Assists the network script with network devices</para>
+<indexterm zone="ch-scripts-bootscripts ifup-bootscripts"><primary sortas="d-ifup">ifup</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="localnet-bootscripts">
+<term><command>localnet</command></term>
+<listitem>
+<para>Sets up the system's hostname and local loopback device</para>
+<indexterm zone="ch-scripts-bootscripts localnet-bootscripts"><primary sortas="d-localnet">localnet</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mountfs-bootscripts">
+<term><command>mountfs</command></term>
+<listitem>
+<para>Mounts all file systems, except ones that are marked
+<emphasis>noauto</emphasis> or are network based</para>
+<indexterm zone="ch-scripts-bootscripts mountfs-bootscripts"><primary sortas="d-mountfs">mountfs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="mountkernfs-bootscripts">
+<term><command>mountkernfs</command></term>
+<listitem>
+<para>Is used to mount kernel-provided file systems, such as
+<systemitem class="filesystem">proc</systemitem></para>
+<indexterm zone="ch-scripts-bootscripts mountkernfs-bootscripts"><primary sortas="d-mountkernfs">mountkernfs</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="network-bootscripts">
+<term><command>network</command></term>
+<listitem>
+<para>Sets up network interfaces, such as network cards, and sets up
+the default gateway (where applicable)</para>
+<indexterm zone="ch-scripts-bootscripts network-bootscripts"><primary sortas="d-network">network</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="rc-bootscripts">
+<term><command>rc</command></term>
+<listitem>
+<para>The master run-level control script; it is responsible for
+running all other scripts one-by-one, in a sequence determined by
+the name of the symbolic links being processed</para>
+<indexterm zone="ch-scripts-bootscripts rc-bootscripts"><primary sortas="d-rc">rc</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="reboot-bootscripts">
+<term><command>reboot</command></term>
+<listitem>
+<para>Reboots the system</para>
+<indexterm zone="ch-scripts-bootscripts reboot-bootscripts"><primary sortas="d-reboot">reboot</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="sendsignals-bootscripts">
+<term><command>sendsignals</command></term>
+<listitem>
+<para>Makes sure every process is terminated before the system reboots
+or halts</para>
+<indexterm zone="ch-scripts-bootscripts sendsignals-bootscripts"><primary sortas="d-sendsignals">sendsignals</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="setclock-bootscripts">
+<term><command>setclock</command></term>
+<listitem>
+<para>Resets the kernel clock to local time in case the hardware clock
+is not set to UTC time</para>
+<indexterm zone="ch-scripts-bootscripts setclock-bootscripts"><primary sortas="d-setclock">setclock</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="static-bootscripts">
+<term><command>static</command></term>
+<listitem>
+<para>Provides the functionality needed to assign a static Internet
+Protocol (IP) address to a network interface</para>
+<indexterm zone="ch-scripts-bootscripts static-bootscripts"><primary sortas="d-static">static</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="swap-bootscripts">
+<term><command>swap</command></term>
+<listitem>
+<para>Enables and disables swap files and partitions</para>
+<indexterm zone="ch-scripts-bootscripts swap-bootscripts"><primary sortas="d-swap">swap</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="syslog-ng-bootscripts">
+<term><command>syslog-ng</command></term>
+<listitem>
+<para>Starts and stops the system and kernel log daemons</para>
+<indexterm zone="ch-scripts-bootscripts syslog-ng-bootscripts"><primary sortas="d-syslog-ng">syslog-ng</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="template-bootscripts">
+<term><command>template</command></term>
+<listitem>
+<para>A template to create custom bootscripts for other
+daemons</para>
+<indexterm zone="ch-scripts-bootscripts template-bootscripts"><primary sortas="d-template">template</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="udev-bootscripts">
+<term><command>udev</command></term>
+<listitem>
+<para>Sets up udev and create the devices nodes in <filename
+class="directory">/dev</filename></para>
+<indexterm zone="ch-scripts-bootscripts udev-bootscripts"><primary sortas="d-udev">udev</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter07/console.xml b/chapter07/console.xml
index 3e5bfdc22..8e59c4bc9 100644
--- a/chapter07/console.xml
+++ b/chapter07/console.xml
@@ -7,15 +7,66 @@
<title>Configuring the Linux Console</title>
<?dbhtml filename="console.html"?>
-<para>Create the configuration file:</para>
+<indexterm zone="ch-scripts-console">
+<primary sortas="d-console">console</primary>
+<secondary>configuring</secondary></indexterm>
+
+<para>This section discusses how to configure the
+<command>console</command> initscript that sets up the keyboard map
+and the console font. If non-ASCII characters (British pound and Euro
+character are examples of non-ASCII characters) will not be used and
+the keyboard is a U.S. one, skip this section. Without the
+configuration file, the console initscript will do nothing.</para>
+
+<para>The <command>console</command> script uses the
+<filename>/etc/sysconfig/console</filename> as a configuration file.
+Decide which keymap and screen font will be used. The
+language-specific HOWTO can help with this. A pre-made
+<filename>/etc/sysconfig/console</filename> file with known settings
+for several countries was installed with the LFS-Bootscripts package,
+so the relevant section can be uncommented if the country is
+supported. If still in doubt, look in the <filename
+class="directory">/usr/share/kbd</filename> directory for valid
+keymaps and screen fonts. Read the loadkeys and setfont manual pages
+and determine the correct arguments for these programs. Once decided,
+create the configuration file with the following command:</para>
<screen><userinput>cat &gt;/etc/sysconfig/console &lt;&lt;"EOF"
<literal>KEYMAP="<replaceable>[arguments for loadkeys]</replaceable>"
FONT="<replaceable>[arguments for setfont]</replaceable>"</literal>
EOF</userinput></screen>
-<para>If you see that keycode 14 is Backspace and not Delete,
-create the following keymap snippet to fix this issue:</para>
+<para>For example, for Spanish users who also want to use the Euro
+character (accessible by pressing AltGr+E), the following settings are
+correct:</para>
+
+<screen><userinput>cat &gt;/etc/sysconfig/console &lt;&lt;"EOF"
+<literal>KEYMAP="es euro2"
+FONT="lat9-16 -u iso01"</literal>
+EOF</userinput></screen>
+
+<note><para>The <envar>FONT</envar> line above is correct only for the ISO 8859-15
+character set. If using ISO 8859-1 and, therefore, a pound sign
+instead of Euro, the correct <envar>FONT</envar> line would be:</para>
+
+<screen><userinput>FONT="lat1-16"</userinput></screen></note>
+
+<para>If the <envar>KEYMAP</envar> or <envar>FONT</envar> variable is not set, the
+<command>console</command> initscript will not run the corresponding
+program.</para>
+
+<para>In some keymaps, the Backspace and Delete keys send characters
+different from ones in the default keymap built into the kernel. This
+confuses some applications. For example,
+<application>Emacs</application> displays its help (instead of erasing
+the character before the cursor) when Backspace is pressed. To check
+if the keymap in use is effected (this works only for i386
+keymaps):</para>
+
+<screen><userinput>zgrep '\W14\W' <replaceable>[/path/to/your/keymap]</replaceable></userinput></screen>
+
+<para>If the keycode 14 is Backspace instead of Delete, create the
+following keymap snippet to fix this issue:</para>
<screen><userinput>mkdir -p /etc/kbd &amp;&amp; cat &gt; /etc/kbd/bs-sends-del &lt;&lt;"EOF"
<literal> keycode 14 = Delete Delete Delete Delete
@@ -27,12 +78,32 @@ create the following keymap snippet to fix this issue:</para>
altgr control alt keycode 111 = Boot</literal>
EOF</userinput></screen>
-<para>Then tell the <command>console</command> script to load this snippet
-after the main keymap:</para>
+<para>Tell the <command>console</command> script to load this
+snippet after the main keymap:</para>
<screen><userinput>cat &gt;&gt;/etc/sysconfig/console &lt;&lt;"EOF"
<literal>KEYMAP_CORRECTION="/etc/kbd/bs-sends-del"</literal>
EOF</userinput></screen>
+<para>To compile the keymap directly into the kernel instead of
+setting it every time from the <command>console</command> bootscript,
+follow the instructions given in <xref linkend="ch-bootable-kernel" role="."/>
+Doing this ensures that the keyboard will always work as expected,
+even when booting into maintenance mode (by passing
+<parameter>init=/bin/sh</parameter> to the kernel), because the
+<command>console</command> bootscript will not be run in that
+situation. Additionally, the kernel will not set the screen font
+automatically. This should not pose many problems because ASCII characters
+will be handled correctly, and it is unlikely that a user would need
+to rely on non-ASCII characters while in maintenance mode.</para>
+
+<para>Since the kernel will set up the keymap, it is possible to omit
+the <envar>KEYMAP</envar> variable from the
+<filename>/etc/sysconfig/console</filename> configuration file. It can
+also be left in place, if desired, without consequence. Keeping it
+could be beneficial if running several different kernels where it is
+difficult to ensure that the keymap is compiled into every one of
+them.</para>
+
</sect1>
diff --git a/chapter07/hostname.xml b/chapter07/hostname.xml
index 5b299f335..46c083a43 100644
--- a/chapter07/hostname.xml
+++ b/chapter07/hostname.xml
@@ -7,10 +7,22 @@
<title>Configuring the localnet Script</title>
<?dbhtml filename="hostname.html"?>
+<indexterm zone="ch-scripts-hostname">
+<primary sortas="d-localnet">localnet</primary>
+<secondary>configuring</secondary></indexterm>
+
+<para>Part of the localnet script is setting up the system's hostname. This
+needs to be configured in the <filename>/etc/sysconfig/network</filename>.</para>
<para>Create the <filename>/etc/sysconfig/network</filename> file and enter a hostname by
running:</para>
<screen><userinput>echo "HOSTNAME=<replaceable>[lfs]</replaceable>" &gt; /etc/sysconfig/network</userinput></screen>
+<para><replaceable>[lfs]</replaceable> needs to be replaced with the
+name the computer is to be called. Do not enter the Fully Qualified
+Domain Name (FQDN) here. That information will be put in the
+<filename>/etc/hosts</filename> file later.</para>
+
</sect1>
+
diff --git a/chapter07/hosts.xml b/chapter07/hosts.xml
index bc81d39e8..b2a77c0c0 100644
--- a/chapter07/hosts.xml
+++ b/chapter07/hosts.xml
@@ -7,8 +7,42 @@
<title>Creating the /etc/hosts File</title>
<?dbhtml filename="hosts.html"?>
-<para>If a network card is to be configured, create the
-<filename>/etc/hosts</filename> file by running:</para>
+<indexterm zone="ch-scripts-hosts"><primary sortas="e-/etc/hosts">/etc/hosts</primary></indexterm>
+
+<indexterm zone="ch-scripts-hosts">
+<primary sortas="d-localnet">localnet</primary>
+<secondary>/etc/hosts</secondary></indexterm>
+
+<indexterm zone="ch-scripts-hosts">
+<primary sortas="d-network">network</primary>
+<secondary>/etc/hosts</secondary></indexterm>
+
+<para>If a network card is to be configured, decide on the IP-address,
+FQDN, and possible aliases for use in the
+<filename>/etc/hosts</filename> file. The syntax is:</para>
+
+<screen>&lt;IP address&gt; myhost.example.org aliases</screen>
+
+<para>Unless the computer is to be visible to the Internet (e.g.,
+there is a registered domain and a valid block of assigned IP
+addresses&mdash;most users do not have this), make sure that the IP
+address is in the private network IP address range. Valid ranges
+are:</para>
+
+<screen> Class Networks
+ A 10.0.0.0
+ B 172.16.0.0 through 172.31.0.0
+ C 192.168.0.0 through 192.168.255.0</screen>
+
+<para>A valid IP address could be 192.168.1.1. A valid FQDN for this
+IP could be www.linuxfromscratch.org (not recommended because this is
+a valid registered domain address and could cause domain name server
+issues).</para>
+
+<para>Even if not using a network card, an FQDN is still required.
+This is necessary for certain programs to operate correctly.</para>
+
+<para>Create the <filename>/etc/hosts</filename> file by running:</para>
<screen><userinput>cat &gt; /etc/hosts &lt;&lt; "EOF"
<literal># Begin /etc/hosts (network card version)
@@ -19,6 +53,12 @@
# End /etc/hosts (network card version)</literal>
EOF</userinput></screen>
+<para>The <replaceable>[192.168.1.1]</replaceable> and
+<replaceable>[&lt;HOSTNAME&gt;.example.org]</replaceable>
+values need to be changed for specific users or requirements (if
+assigned an IP address by a network/system administrator and the
+machine will be connected to an existing network).</para>
+
<para>If a network card is not going to be configured, create the
<filename>/etc/hosts</filename> file by running:</para>
@@ -31,3 +71,4 @@ EOF</userinput></screen>
EOF</userinput></screen>
</sect1>
+
diff --git a/chapter07/inputrc.xml b/chapter07/inputrc.xml
index 62fcb3173..200f9a31b 100644
--- a/chapter07/inputrc.xml
+++ b/chapter07/inputrc.xml
@@ -7,7 +7,45 @@
<title>Creating the /etc/inputrc File</title>
<?dbhtml filename="inputrc.html"?>
-<para>Create the /etc/inputrc file:</para>
+<indexterm zone="ch-scripts-inputrc"><primary sortas="e-/etc/inputrc">/etc/inputrc</primary></indexterm>
+
+<para>The <filename>/etc/inputrc</filename> file deals with mapping
+the keyboard for specific situations. This file is the start-up file
+used by <application>Readline</application>, the input-related
+library used by <application>Bash</application> and most other
+shells.</para>
+
+<para>For more information, see the bash info page, section
+<emphasis>Readline Init File</emphasis>. The readline info page is
+also a good source of information.</para>
+
+<para>Global values are set in <filename>/etc/inputrc</filename>.
+Personal user values are set in <filename>~/.inputrc</filename>. The
+<filename>~/.inputrc</filename> file will override the global settings
+file. A later page sets up Bash to use
+<filename>/etc/inputrc</filename> if there is no
+<filename>.inputrc</filename> for a user when
+<filename>/etc/profile</filename> is read (usually at login). To make
+the system use both, or to negate global keyboard handling, it is a
+good idea to place a default <filename>.inputrc</filename> into the
+<filename class="directory">/etc/skel</filename> directory for use
+with new users.</para>
+
+<para>Below is a base <filename>/etc/inputrc</filename>, along with
+comments to explain what the various options do. Note that comments
+cannot be on the same line as commands.</para>
+
+<para>To create the <filename>.inputrc</filename> in <filename
+class="directory">/etc/skel</filename> using the command below, change
+the command's output to <filename
+class="directory">/etc/skel/.inputrc</filename> and be sure to
+check/set permissions afterward. Copy that file to
+<filename>/etc/inputrc</filename> and the home directory of any user
+already existing on the system, including <emphasis>root</emphasis>,
+that needs a private version of the file. Be certain to use the
+<parameter>-p</parameter> parameter of <command>cp</command> to
+maintain permissions and be sure to change owner and group
+appropriately.</para>
<screen><userinput>cat &gt; /etc/inputrc &lt;&lt; "EOF"
<literal># Begin /etc/inputrc
@@ -56,3 +94,4 @@ set bell-style none
EOF</userinput></screen>
</sect1>
+
diff --git a/chapter07/introduction.xml b/chapter07/introduction.xml
index bfff7e7c7..b4c8ea547 100644
--- a/chapter07/introduction.xml
+++ b/chapter07/introduction.xml
@@ -7,6 +7,21 @@
<title>Introduction</title>
<?dbhtml filename="introduction.html"?>
-<para>See testing</para>
+<para>This chapter details how to install the bootscripts and set them up
+properly. Most of these scripts will work without modification, but a
+few require additional configuration files because they deal with
+hardware-dependent information.</para>
+
+<para>System-V style init scripts are employed in this book because they are
+widely used. For additional options, a hint detailing the BSD style
+init setup is available at
+<ulink
+url="http://www.linuxfromscratch.org/hints/downloads/files/bsd-init.txt"/>.
+Searching the LFS mailing lists for <quote>depinit</quote> will also offer
+additional choices.</para>
+
+<para>If using an alternate style of init scripts, skip this chapter
+and move on to <xref linkend="chapter-bootable"/>.</para>
</sect1>
+
diff --git a/chapter07/network.xml b/chapter07/network.xml
index 3a86d1a20..304341033 100644
--- a/chapter07/network.xml
+++ b/chapter07/network.xml
@@ -7,12 +7,43 @@
<title>Configuring the network Script</title>
<?dbhtml filename="network.html"?>
+<indexterm zone="ch-scripts-network">
+<primary sortas="d-network">network</primary>
+<secondary>configuring</secondary></indexterm>
+
+<para>This section only applies if a network card is to be
+configured.</para>
+
+<para>If a network card will not be used, there is likely no need to
+create any configuration files relating to network cards. If that is
+the case, remove the <filename class="symlink">network</filename>
+symlinks from all run-level directories (<filename
+class="directory">/etc/rc.d/rc*.d</filename>).</para>
<sect2>
<title>Creating Network Interface Configuration Files</title>
-<para>The following command creates a sample <filename>ipv4</filename> file for the
-<filename>eth0</filename> device:</para>
+<!-- Edit Me -->
+<para>Which interfaces are brought up and down by the network script
+depends on the files and directories in the <filename
+class="directory">/etc/sysconfig/network-devices</filename> hierarchy.
+This directory should contain a directory for each interface to be configured,
+such as <filename>ifconfig.xyz</filename>, where <quote>xyz</quote> is a
+network interface name. Inside this directory would be files defining
+the attributes to this interface, such as its IP address(es), subnet
+masks, and so forth.</para>
+<!-- -->
+
+<para>If the <filename
+class="directory">/etc/sysconfig/network-devices</filename> directory
+is to be renamed or moved, make sure to edit the
+<filename>/etc/sysconfig/rc</filename> file and update the
+<quote>network_devices</quote> option by providing it with the new
+path.</para>
+
+<para>New files are created in this directory. The following
+command creates a sample <filename>ipv4</filename> file for the
+<emphasis>eth0</emphasis> device:</para>
<screen><userinput>cd /etc/sysconfig/network-devices &amp;&amp;
mkdir ifconfig.eth0 &amp;&amp;
@@ -25,12 +56,46 @@ PREFIX=24
BROADCAST=192.168.1.255</literal>
EOF</userinput></screen>
+<para>The values of these variables must be changed in every file to
+match the proper setup. If the <envar>ONBOOT</envar> variable is
+set to <quote>yes</quote> the network script will bring up the
+Network Interface Card (NIC) during booting of the system. If set
+to anything but <quote>yes</quote> the NIC will be ignored by the
+network script and not brought up.</para>
+
+<para>The <envar>SERVICE</envar> variable defines the method of
+obtaining the IP address. The LFS bootscripts have a modular IP
+assignment format, and creating additional files in the <filename
+class="directory">/etc/sysconfig/network-devices/services</filename>
+directory allows other IP assignment methods. This is commonly used
+for Dynamic Host Configuration Protocol (DHCP), which is addressed in the BLFS book.</para>
+
+<para>The <envar>GATEWAY</envar> variable should contain
+the default gateway IP address, if one is present. If not, then comment out
+the variable entirely.</para>
+
+<para>The <envar>PREFIX</envar> variable needs to contain the
+number of bits used in the subnet. Each octet in an IP address is 8
+bits. If the subnet's netmask is 255.255.255.0, then it is using the
+first three octets (24 bits) to specify the network number. If the
+netmask is 255.255.255.240, it would be using the first 28 bits.
+Prefixes longer than 24 bits are commonly used by DSL- and cable-based
+Internet Service Providers (ISPs). In this example (PREFIX=24), the netmask
+is 255.255.255.0. Adjust according to the specific subnet.</para>
+
</sect2>
<sect2 id="resolv.conf">
<title>Creating the /etc/resolv.conf File</title>
+<indexterm zone="resolv.conf"><primary sortas="e-/etc/resolv.conf">/etc/resolv.conf</primary></indexterm>
-<para>Create the file by running the following:</para>
+<para>If the system is going to be connected to the Internet, it will
+need some means of Domain Name Service (DNS) name resolution to
+resolve Internet domain names to IP addresses, and vice versa. This is
+best achieved by placing the IP address of the DNS server, available
+from the ISP or network administrator, into
+<filename>/etc/resolv.conf</filename>. Create the file by running the
+following:</para>
<screen><userinput>cat &gt; /etc/resolv.conf &lt;&lt; "EOF"
<literal># Begin /etc/resolv.conf
@@ -42,6 +107,14 @@ nameserver <replaceable>[IP address of your secondary nameserver]</replaceable>
# End /etc/resolv.conf</literal>
EOF</userinput></screen>
+<para>Replace <replaceable>[IP address of the
+nameserver]</replaceable> with the IP address of the DNS most
+appropriate for the setup. There will often be more than one entry
+(requirements demand secondary servers for fallback capability). If
+you only need or want one DNS server, remove the second
+<emphasis>nameserver</emphasis> line from the file. The IP address may
+also be a router on the local network.</para>
</sect2>
</sect1>
+
diff --git a/chapter07/profile.xml b/chapter07/profile.xml
index d60d64d67..fa1b1a232 100644
--- a/chapter07/profile.xml
+++ b/chapter07/profile.xml
@@ -7,8 +7,74 @@
<title>The Bash Shell Startup Files</title>
<?dbhtml filename="profile.html"?>
+<indexterm zone="ch-scripts-profile"><primary sortas="e-/etc/profile">/etc/profile</primary></indexterm>
-<para>Create the <filename>/etc/profile</filename> file:</para>
+<para>The shell program <command>/bin/bash</command> (hereafter
+referred to as <quote>the shell</quote>) uses a collection of startup
+files to help create an environment to run in. Each file has a
+specific use and may effect login and interactive environments
+differently. The files in the <filename
+class="directory">/etc</filename> directory provide global settings.
+If an equivalent file exists in the home directory, it may override
+the global settings.</para>
+
+<para>An interactive login shell is started after a successful login,
+using <command>/bin/login</command>, by reading the
+<filename>/etc/passwd</filename> file. An interactive non-login shell
+is started at the command-line (e.g.,
+<prompt>[prompt]$</prompt><command>/bin/bash</command>). A
+non-interactive shell is usually present when a shell script is
+running. It is non-interactive because it is processing a script and
+not waiting for user input between commands.</para>
+
+<para>For more information, see <command>info bash</command> - Nodes:
+Bash Startup Files and Interactive Shells.</para>
+
+<para>The files <filename>/etc/profile</filename> and
+<filename>~/.bash_profile</filename> are read when the shell is
+invoked as an interactive login shell.</para>
+
+<para>A base <filename>/etc/profile</filename> below sets some
+environment variables necessary for native language support. Setting
+them properly results in:</para>
+
+<itemizedlist>
+<listitem><para>The output of programs translated into the native
+language</para></listitem>
+<listitem><para>Correct classification of characters into letters,
+digits and other classes. This is necessary for Bash to properly
+accept non-ASCII characters in command lines in non-English
+locales</para></listitem>
+<listitem><para>The correct alphabetical sorting order for the
+country</para></listitem>
+<listitem><para>Appropriate default paper size</para></listitem>
+<listitem><para>Correct formatting of monetary, time, and date
+values</para></listitem>
+</itemizedlist>
+
+<para>This script also sets the <envar>INPUTRC</envar>
+environment variable that makes <application>Bash</application> and
+<application>Readline</application> use the
+<filename>/etc/inputrc</filename> file created earlier.</para>
+
+<para>Replace <replaceable>[ll]</replaceable> below with the
+two-letter code for the desired language (e.g., <quote>en</quote>) and
+<replaceable>[CC]</replaceable> with the two-letter code for the
+appropriate country (e.g., <quote>GB</quote>). It may also be
+necessary to specify (and this is actually the preferred form) the
+character encoding (e.g. <quote>iso8859-1</quote>) after a dot (so
+that the result is <quote>en_GB.iso8859-1</quote>). Issue the
+following command for more information:</para>
+
+<screen><userinput>man 3 setlocale</userinput></screen>
+
+<para>The list of all locales supported by Glibc can be obtained by running
+the following command:</para>
+
+<screen><userinput>locale -a</userinput></screen>
+
+<para>Once the proper locale settings have been determined, create the
+<filename>/etc/profile</filename> file:</para>
<screen><userinput>cat &gt; /etc/profile &lt;&lt; "EOF"
<literal># Begin /etc/profile
@@ -20,4 +86,19 @@ export INPUTRC=/etc/inputrc
# End /etc/profile</literal>
EOF</userinput></screen>
+<note><para>The <quote>C</quote> (default) and <quote>en_US</quote>
+(the recommended one for United States English users) locales are
+different.</para></note>
+
+<para>Setting the keyboard layout, screen font, and
+locale-related environment variables are the only internationalization
+steps needed to support locales that use ordinary single-byte
+encodings and left-to-right writing direction. More complex cases
+(including UTF-8 based locales) require additional steps and
+additional patches because many applications tend to not work properly
+under such conditions. These steps and patches are not included in
+the LFS book and such locales are not supported by LFS in any
+way.</para>
+
</sect1>
+
diff --git a/chapter07/setclock.xml b/chapter07/setclock.xml
index d933eb59f..0527fac00 100644
--- a/chapter07/setclock.xml
+++ b/chapter07/setclock.xml
@@ -7,6 +7,36 @@
<title>Configuring the setclock Script</title>
<?dbhtml filename="setclock.html"?>
+<indexterm zone="ch-scripts-setclock">
+<primary sortas="d-setclock">setclock</primary>
+<secondary>configuring</secondary></indexterm>
+
+<para>The <command>setclock</command> script reads the time from the hardware clock,
+also known as BIOS or the Complementary Metal Oxide Semiconductor
+(CMOS) clock. If the hardware clock is set to UTC, this script will convert the hardware clock's time to
+the local time using the <filename>/etc/localtime</filename> file
+(which tells the <command>hwclock</command> program which timezone the
+user is in). There is no way to
+detect whether or not the hardware clock is set to UTC time, so this
+needs to be manually configured.</para>
+
+<para>If you cannot remember whether or not the hardware
+clock is set to UTC time, find out by running
+the <userinput>hwclock --localtime --show</userinput> command. This will tell
+what the current time is according to the hardware clock. If this time
+matches whatever your watch says, then the hardware clock is set to
+local time. If the output from <command>hwclock</command> is not local
+time, chances are it is set to UTC time. Verify this by adding or
+subtracting the proper amount of hours for the timezone to this
+<command>hwclock</command> time. For example, if you live in the MST
+timezone, which is also known as GMT -0700, add seven hours to the local
+time. Then, account for Daylight Savings Time, which requires
+subtracting an hour (or only add six in the first place) during the summer
+months.</para>
+
+<para>Change the value of the <envar>UTC</envar> variable below
+to a value of <parameter>0</parameter> (zero) if the hardware clock
+is <emphasis>not</emphasis> set to UTC time.</para>
<para>Create a new file <filename>/etc/sysconfig/clock</filename> by running
the following:</para>
@@ -19,4 +49,9 @@ UTC=1
# End /etc/sysconfig/clock</literal>
EOF</userinput></screen>
+<para>A good hint explaining how to deal with time on LFS is available
+at <ulink url="&hints-root;time.txt"/>. It explains issues such as
+time zones, UTC, and the <envar>TZ</envar> environment variable.</para>
+
</sect1>
+
diff --git a/chapter07/udev.xml b/chapter07/udev.xml
index 73b90c419..51e001134 100644
--- a/chapter07/udev.xml
+++ b/chapter07/udev.xml
@@ -11,8 +11,235 @@
<primary sortas="a-Udev">Udev</primary>
<secondary>usage</secondary></indexterm>
+<para>In <xref linkend="chapter-building-system"/>, we installed the Udev
+package. Before we go into the details regarding how this works,
+a brief history of previous methods of handling devices is in
+order.</para>
-<para>See testing</para>
+<para>Linux systems in general traditionally use a static device
+creation method, whereby a great many device nodes are created under
+<filename class="directory">/dev</filename> (sometimes literally
+thousands of nodes), regardless of whether the corresponding hardware
+devices actually exist. This is typically done via a
+<command>MAKEDEV</command> script, which contains a number of
+calls to the <command>mknod</command> program with the relevant major and minor device
+numbers for every possible device that might exist in the world. Using
+the udev method, only those devices which are detected by the kernel
+get device nodes created for them. Because these device nodes will be
+created each time the system boots, they will be stored on a
+<systemitem class="filesystem">ramfs</systemitem> (a file system that
+resides entirely in memory and does not take up any disk space).
+Device nodes do not require much disk space, so the memory that is
+used in negligable.</para>
+
+<sect2>
+<title>History</title>
+
+<para>In February 2000, a new filesystem called <systemitem
+class="filesystem">devfs</systemitem> was merged into the 2.3.46
+kernel and was made available during the 2.4 series of
+stable kernels. Although it was present in the kernel source itself,
+this method of creating devices dynamically never received
+overwhelming support from the core kernel developers.</para>
+
+<para>The main problem with the approach adopted by <systemitem
+class="filesystem">devfs</systemitem> was the way it handled
+device detection, creation, and naming. The latter issue, that of
+device node naming, was perhaps the most critical. It is generally
+accepted that if device names are allowed to be configurable, then
+the device naming policy should be up to a system administrator, not
+imposed on them by any particular developer(s). The <systemitem
+class="filesystem">devfs</systemitem> file system also suffers from race
+conditions that are inherent in its design and cannot be fixed
+without a substantial revision to the kernel. It has also been marked
+as deprecated due to a lack of recent maintenance.</para>
+
+<para>With the development of the unstable 2.5 kernel tree, later
+released as the 2.6 series of stable kernels, a new virtual filesystem
+called <systemitem class="filesystem">sysfs</systemitem> came to be.
+The job of <systemitem class="filesystem">sysfs</systemitem> is to
+export a view of the system's structure to userspace processes. With
+this userspace visible representation, the possibility of seeing a
+userspace replacement for <systemitem
+class="filesystem">devfs</systemitem> became much more
+realistic.</para>
+</sect2>
+
+<sect2>
+<title>Udev Implementation</title>
+
+<para>The <systemitem class="filesystem">sysfs</systemitem> filesystem
+was mentioned briefly above. One may wonder how <systemitem
+class="filesystem">sysfs</systemitem> knows about the devices present
+on a system and what device numbers should be used. Drivers that
+have been compiled into the kernel directly register their objects
+with <systemitem class="filesystem">sysfs</systemitem> as they are
+detected by the kernel. For drivers compiled as modules, this will
+happen when the module is loaded. Once the <systemitem
+class="filesystem">sysfs</systemitem> filesystem is mounted (on
+<filename class="directory">/sys</filename>), the data which the
+built-in drivers registered with <systemitem
+class="filesystem">sysfs</systemitem> are available to userspace
+processes and to <command>udev</command> for device node creation.</para>
+
+<para>The <command>S10udev</command> initscript takes care of creating
+these device nodes when Linux is booted. This script starts with
+registering <command>/sbin/udev</command> as a hotplug event handler.
+Hotplug events (discussed below) should not be generated during this
+stage, but <command>udev</command> is registered just in case they do
+occur. The <command>udevstart</command> program then walks through
+the <systemitem class="filesystem">/sys</systemitem> filesystem and
+creates devices under <filename class="directory">/dev</filename> that
+match the descriptions. For example,
+<filename>/sys/class/tty/vcs/dev</filename> contains the string
+<quote>7:0</quote> This string is used by <command>udevstart</command>
+to create <filename>/dev/vcs</filename> with major number
+<emphasis>7</emphasis> and minor <emphasis>0</emphasis>. The
+permissions of each and every device that <command>udevstart</command>
+creates are set using files from the <filename
+class="directory">/etc/udev.d/permissions.d/</filename> directory.
+These are numbered in a similar fashion to the LFS bootscripts. If
+<command>udev</command> cannot find a permissions file for the device
+it is creating, it will default permissions to
+<emphasis>600</emphasis> and ownership to
+<emphasis>root:root</emphasis>. The names of the nodes created under
+the <filename class="directory">/dev</filename> directory are
+configured according to the rules specified in the files within the
+<filename class="directory">/etc/udev/rules.d/</filename>
+directory.</para>
+
+<para>Once the above stage is complete, all devices that were already
+present and have compiled-in drivers will be available for use. What
+about those devices that have modular drivers?</para>
+
+<para>Earlier, we mentioned the concept of a <quote>hotplug event
+handler.</quote> When a new device connection is detected by the
+kernel, the kernel will generate a hotplug event and look at the file
+<filename>/proc/sys/kernel/hotplug</filename> to find out the
+userspace program that handles the device's connection. The
+<command>udev</command> initscript registered <command>udev</command>
+as this handler. When these hotplug events are generated, the kernel
+will tell <command>udev</command> to check the <filename
+class="directory">/sys</filename> filesystem for the information
+pertaining to this new device and create the <filename
+class="directory">/dev</filename> entry for it.</para>
+
+<para>This brings us to one problem that exists with
+<command>udev</command>, and likewise with <systemitem
+class="filesystem">devfs</systemitem> before it. It is commonly
+referred to as the <quote>chicken and egg</quote> problem. Most Linux
+distrubtions handle loading modules via entries in
+<filename>/etc/modules.conf</filename>. Access to a device node causes
+the appropriate kernel module to load. With <command>udev</command>,
+this method will not work because the device node does not exist until
+the module is loaded. To solve this, the
+<command>S05modules</command> bootscript was added to the
+lfs-bootscripts package, along with the
+<filename>/etc/sysconfig/modules</filename> file. By
+adding module
+names to the <filename>modules</filename> file, these modules will be
+loaded when the computer is starting up. This allows
+<command>udev</command> to detect the devices and create the
+appropriate device nodes.</para>
+
+<para>Note that on slower machines or for drivers that create a lot
+of device nodes, the process of creating devices may take a few
+seconds to complete. This means that some device nodes may not be
+immediately accessible.</para>
+</sect2>
+
+<sect2>
+<title>Handling Hotpluggable/Dynamic Devices</title>
+
+<para>When you plug in a device, such a Universal Serial Bus (USB) MP3 player, the kernel
+recognizes that the device is now connected and generates a hotplug
+event. If the driver is already loaded (either because it was compiled
+into the kernel or because it was loaded via the
+<command>S05modules</command> bootscript), <command>udev</command> will
+be called upon to create the relevant device node(s) according to the
+<systemitem class="filesystem">sysfs</systemitem> data available in
+<filename class="directory">/sys</filename>. If the driver for the
+just plugged in device is available as a module but currently unloaded,
+then attaching the device to the system will only cause the kernel's
+bus driver to generate a hotplug event that notifies userspace of the
+new device connection and it not being attached to a driver. In
+effect, nothing happens and the device itself is not usable
+yet.</para>
+
+<para>If building a system that has a lot of drivers compiled as
+modules rather than directly built into the kernel, using the
+<command>S05modules</command> may not be practical. The Hotplug
+package (see <ulink url="http://linux-hotplug.sourceforge.net/"/>) can
+be beneficial in these cases. When the Hotplug package is installed,
+it will respond to the aforementioned kernel's bus driver hotplug
+events. The Hotplug package will load the appropriate module and make
+this device available by creating the device node(s) for it.</para>
+</sect2>
+
+<sect2>
+<title>Problems with Creating Devices</title>
+
+<para>There are a few known problems when it comes to automatically creating
+devices nodes:</para>
+
+<para>1) A kernel driver may not export its data to <systemitem
+class="filesystem">sysfs</systemitem>.</para>
+
+<para>This is most common with third party drivers from outside the
+kernel tree. These drivers will not end up having their device nodes
+created. Use the
+<filename>/etc/sysconfig/createfiles</filename> configuration file to
+manually create the devices. Consult the
+<filename>devices.txt</filename> file inside the kernel documentation
+or the documentation for that driver to find the proper major/minor
+numbers.</para>
+
+<para>2) A non-hardware device is required. This is most common with
+the Advanced Linux Sound Architecture (ALSA) project's Open Sound
+System (OSS) compatibility module. These types of devices can be
+handled in one of two ways:</para>
+
+<itemizedlist>
+
+<listitem><para>Adding the module names to
+<filename>/etc/sysconfig/modules</filename></para></listitem>
+<listitem><para>Using an
+<quote>install</quote> line in
+<filename>/etc/modprobe.conf</filename>. This tells the
+<command>modprobe</command> command <quote>when loading this module,
+also load this other module, at the same time.</quote> For example:</para>
+
+<screen><userinput>install snd-pcm modprobe -i snd-pcm ; modprobe \
+ snd-pcm-oss ; true</userinput></screen>
+
+<para>This will cause the system to load both the
+<emphasis>snd-pcm</emphasis> and <emphasis>snd-pcm-oss</emphasis>
+modules when any request is made to load the driver
+<emphasis>snd-pcm</emphasis>.</para></listitem>
+</itemizedlist>
+</sect2>
+
+<sect2>
+<title>Useful Reading</title>
+
+<para>Additional helpful documentation is available at the following
+sites:</para>
+
+<itemizedlist>
+<listitem><para remap="verbatim">A Userspace Implementation of devfs
+<ulink url="http://www.kroah.com/linux/talks/ols_2003_udev_paper/Reprint-Kroah-Hartman-OLS2003.pdf"><phrase
+condition="pdf">http://www.kroah.com/linux/talks/ols_2003_udev_paper/
+Reprint-Kroah-Hartman-OLS2003.pdf</phrase></ulink></para></listitem>
+
+<listitem><para remap="verbatim">udev FAQ
+<ulink url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ"/></para></listitem>
+
+<listitem><para remap="verbatim">The Linux Kernel Driver Model
+<ulink url="http://public.planetmirror.com/pub/lca/2003/proceedings/papers/Patrick_Mochel/Patrick_Mochel.pdf"><phrase
+condition="pdf">http://public.planetmirror.com/pub/lca/2003/proceedings/papers/
+Patrick_Mochel/Patrick_Mochel.pdf</phrase></ulink></para></listitem>
+</itemizedlist>
+</sect2>
</sect1>
diff --git a/chapter07/usage.xml b/chapter07/usage.xml
index 918f981f7..5baede25b 100644
--- a/chapter07/usage.xml
+++ b/chapter07/usage.xml
@@ -7,7 +7,112 @@
<title>How Do These Bootscripts Work?</title>
<?dbhtml filename="usage.html"?>
+<indexterm zone="ch-scripts-usage">
+<primary sortas="a-Bootscripts">Bootscripts</primary>
+<secondary>usage</secondary></indexterm>
-<para>See testing</para>
+<para>Linux uses a special booting facility named SysVinit that is
+based on a concept of <emphasis>run-levels</emphasis>. It can be quite
+different from one system to another, so it cannot be assumed that
+because things worked in &lt;insert distro name&gt;, they should work
+the same in LFS too. LFS has its own way of doing things, but it
+respects generally accepted standards.</para>
+
+<para>SysVinit (which will be referred to as <quote>init</quote> from
+now on) works using a run-levels scheme. There are seven (from 0 to 6)
+run-levels (actually, there are more run-levels, but they are for
+special cases and are generally not used. The init man page describes
+those details), and each one of those corresponds to the actions the
+computer is supposed to perform when it starts up. The default
+run-level is 3. Here are the descriptions of the different run-levels
+as they are implemented:</para>
+
+<literallayout>0: halt the computer
+1: single-user mode
+2: multi-user mode without networking
+3: multi-user mode with networking
+4: reserved for customization, otherwise does the same as 3
+5: same as 4, it is usually used for GUI login (like X's <command>xdm</command> or KDE's <command>kdm</command>)
+6: reboot the computer</literallayout>
+
+<para>The command used to change run-levels is <command>init
+<replaceable>[runlevel]</replaceable></command>, where
+<replaceable>[runlevel]</replaceable> is the target run-level. For
+example, to reboot the computer, a user would issue the <command>init
+6</command> command. The <command>reboot</command> command is an
+alias for it, as is the <command>halt</command> command an alias for
+<command>init 0</command>.</para>
+
+<para>There are a number of directories under <filename
+class="directory">/etc/rc.d</filename> that look like <filename
+class="directory">rc?.d</filename> (where ? is the number of the
+run-level) and <filename class="directory">rcsysinit.d</filename>, all
+containing a number of symbolic links. Some begin with a
+<emphasis>K</emphasis>, the others begin with an
+<emphasis>S</emphasis>, and all of them have two numbers following the
+initial letter. The K means to stop (kill) a service and the S means
+to start a service. The numbers determine the order in which the
+scripts are run, from 00 to 99&mdash;the lower the number the earlier it
+gets executed. When init switches to another run-level, the
+appropriate services get killed and others get started.</para>
+
+<para>The real scripts are in <filename
+class="directory">/etc/rc.d/init.d</filename>. They do the actual
+work, and the symlinks all point to them. Killing links and starting
+links point to the same script in <filename
+class="directory">/etc/rc.d/init.d</filename>. This is because the
+scripts can be called with different parameters like
+<parameter>start</parameter>, <parameter>stop</parameter>,
+<parameter>restart</parameter>, <parameter>reload</parameter>, and
+<parameter>status</parameter>. When a K link is encountered, the
+appropriate script is run with the <parameter>stop</parameter>
+argument. When an S link is encountered, the appropriate script is run
+with the <parameter>start</parameter> argument.</para>
+
+<para>There is one exception to this explanation. Links that start
+with an <emphasis>S</emphasis> in the <filename
+class="directory">rc0.d</filename> and <filename
+class="directory">rc6.d</filename> directories will not cause anything
+to be started. They will be called with the parameter
+<parameter>stop</parameter> to stop something. The logic behind this
+is that when a user is going to reboot or halt the system, nothing
+needs to be started. The system only needs to be stopped.</para>
+
+<para>These are descriptions of what the arguments make the scripts
+do:</para>
+
+<variablelist>
+<varlistentry>
+<term><parameter>start</parameter></term>
+<listitem><para>The service is started.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>stop</parameter></term>
+<listitem><para>The service is stopped.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>restart</parameter></term>
+<listitem><para>The service is stopped and then started again.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>reload</parameter></term>
+<listitem><para>The configuration of the service is updated.
+This is used after the configuration file of a service was modified, when
+the service does not need to be restarted.</para></listitem>
+</varlistentry>
+
+<varlistentry>
+<term><parameter>status</parameter></term>
+<listitem><para>Tells if the service is running and with which PIDs.</para></listitem>
+</varlistentry>
+</variablelist>
+
+<para>Feel free to modify the way the boot process works (after all,
+it is your own LFS system). The files given here are an example of how
+it can be done.</para>
</sect1>
+
diff --git a/chapter08/fstab.xml b/chapter08/fstab.xml
index 015e26bc6..969d306fb 100644
--- a/chapter08/fstab.xml
+++ b/chapter08/fstab.xml
@@ -7,6 +7,13 @@
<title>Creating the /etc/fstab File</title>
<?dbhtml filename="fstab.html"?>
+<indexterm zone="ch-bootable-fstab"><primary sortas="e-/etc/fstab">/etc/fstab</primary></indexterm>
+
+<para>The <filename>/etc/fstab</filename> file is used by some
+programs to determine where file systems are to be mounted by default,
+which must be checked, and in which order. Create a new file systems
+table like this:</para>
+
<screen><userinput>cat &gt; /etc/fstab &lt;&lt; "EOF"
<literal># Begin /etc/fstab
@@ -22,4 +29,39 @@ shm /dev/shm tmpfs defaults 0 0
# End /etc/fstab</literal>
EOF</userinput></screen>
+<para>Replace <replaceable>[xxx]</replaceable>,
+<replaceable>[yyy]</replaceable>, and <replaceable>[fff]</replaceable>
+with the values appropriate for the system, for example, <filename
+class="partition">hda2</filename>, <filename
+class="partition">hda5</filename>, and <systemitem
+class="filesystem">ext2</systemitem>. For details on the six
+fields in this file, see <command>man 5 fstab</command>.</para>
+
+<para>When using a journalling file system, the <parameter>1
+1</parameter> at the end of the line should be replaced with
+<parameter>0 0</parameter> because such a partition does not need to
+be dumped or checked.</para>
+
+<para>The <filename class="directory">/dev/shm</filename> mount point
+for <systemitem class="filesystem">tmpfs</systemitem> is included to
+allow enabling POSIX-shared memory. The kernel must have the required
+support built into it for this to work (more about this is in the next
+section). Please note that very little software currently uses
+POSIX-shared memory. Therefore, consider the <filename
+class="directory">/dev/shm</filename> mount point optional. For more
+information, see
+<filename>Documentation/filesystems/tmpfs.txt</filename> in the kernel
+source tree.</para>
+
+<para>There are other lines which may be added to the
+<filename>/etc/fstab</filename> file. One example is a line for USB
+devices:</para>
+
+<screen>usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0 </screen>
+
+<para>This option will only work if <quote>Support for Host-side
+USB</quote> and <quote>USB device filesystem</quote> are compiled into
+the kernel (not as a module).</para>
+
</sect1>
+
diff --git a/chapter08/grub.xml b/chapter08/grub.xml
index 4d50002a0..12487ec71 100644
--- a/chapter08/grub.xml
+++ b/chapter08/grub.xml
@@ -7,35 +7,82 @@
<title>Making the LFS System Bootable</title>
<?dbhtml filename="grub.html"?>
-
-<para>We highly recommend that you create a Grub boot floppy diskette just in case.
-Insert a blank floppy diskette and run the following commands:</para>
+<indexterm zone="ch-bootable-grub">
+<primary sortas="a-Grub">Grub</primary>
+<secondary>configuring</secondary></indexterm>
+
+<para>Your shiny new LFS system is almost complete. One of the last
+things to do is to ensure that the system can be properly booted. The
+instructions below apply only to computers of IA-32 architecture,
+meaning mainstream PCs. Information on <quote>boot loading</quote> for
+other architectures should be available in the usual resource-specific
+locations for those architectures.</para>
+
+<para>Boot loading can be a complex area, so a few cautionary
+words are in order. Be familiar with the current boot loader and any other
+operating systems present on the hard drive(s) that need to be
+bootable. Make sure that an emergency boot disk is ready to
+<quote>rescue</quote> the computer if the computer becomes
+unusable (un-bootable).</para>
+
+<para>Earlier, we compiled and installed the Grub boot loader software
+in preparation for this step. The procedure involves writing some
+special Grub files to specific locations on the hard drive. We highly
+recommend creating a Grub boot floppy diskette as a backup. Insert a
+blank floppy diskette and run the following commands:</para>
<screen><userinput>dd if=/boot/grub/stage1 of=/dev/fd0 bs=512 count=1
dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1</userinput></screen>
-<para>Remove the diskette and store it somewhere safe. Now we'll run the
+<para>Remove the diskette and store it somewhere safe. Now, run the
<command>grub</command> shell:</para>
<screen><userinput>grub</userinput></screen>
-<para>First, tell Grub where to search for its <filename>stage{1,2}</filename>
-files -- you can use the Tab key everywhere to make Grub show the alternatives:</para>
+<para>Grub uses its own naming structure for drives and partitions in
+the form of <emphasis>(hdn,m)</emphasis>, where <emphasis>n</emphasis>
+is the hard drive number and <emphasis>m</emphasis> is the partition
+number, both starting from zero. For example, partition <filename
+class="partition">hda1</filename> is <emphasis>(hd0,0)</emphasis> to
+Grub and <filename class="partition">hdb3</filename> is
+<emphasis>(hd1,2)</emphasis>. In contrast to Linux, Grub does not
+consider CD-ROM drives to be hard drives. For example, if using a CD
+on <filename class="partition">hdb</filename> and a second hard drive
+on <filename class="partition">hdc</filename>, that second hard drive
+would still be <emphasis>(hd1)</emphasis>.</para>
+
+<para>Using the above information, determine the appropriate
+designator for the root partition (or boot partition, if a separate
+one is used). For the following example, it is assumed that the root
+(or separate boot) partition is <filename
+class="partition">hda4</filename>.</para>
+
+<para>Tell Grub where to search for its
+<filename>stage{1,2}</filename> files. The Tab key can be used
+everywhere to make Grub show the alternatives:</para>
<screen><userinput>root (hd0,3)</userinput></screen>
-<para>Tell Grub to install itself into the MBR (Master Boot Record) of
+<warning><para>The following command will overwrite the current boot
+loader. Do not run the command if this is not desired, for example, if
+using a third party boot manager to manage the Master Boot Record
+(MBR). In this scenario, it would make more sense to install
+Grub into the <quote>boot sector</quote> of the LFS partition. In this
+case, this next command would become <userinput>setup
+(hd0,3)</userinput>.</para></warning>
+
+<para>Tell Grub to install itself into the MBR of
<filename class="partition">hda</filename>:</para>
<screen><userinput>setup (hd0)</userinput></screen>
-<para>If all is well, Grub will have reported finding its files in
-<filename class="directory">/boot/grub</filename>. That's all there is to it:</para>
+<para>If all went well, Grub will have reported finding its files in
+<filename class="directory">/boot/grub</filename>. That's all there is
+to it. Quit the <command>grub</command> shell:</para>
<screen><userinput>quit</userinput></screen>
-<para>Now we need to create a <quote>menu list</quote> file, defining Grub's
-boot menu:</para>
+<para>Create a <quote>menu list</quote> file defining Grub's boot menu:</para>
<screen><userinput>cat &gt; /boot/grub/menu.lst &lt;&lt; "EOF"
<literal># Begin /boot/grub/menu.lst
@@ -55,7 +102,7 @@ root (hd0,3)
kernel /boot/lfskernel-&linux-version; root=/dev/hda4</literal>
EOF</userinput></screen>
-<para>You may want to add an entry for your host distribution. It might look
+<para>Add an entry for the host distribution if desired. It might look
like this:</para>
<screen><userinput>cat &gt;&gt; /boot/grub/menu.lst &lt;&lt; "EOF"
@@ -65,8 +112,8 @@ kernel /boot/kernel-2.4.20 root=/dev/hda3
initrd /boot/initrd-2.4.20</literal>
EOF</userinput></screen>
-<para>Also, if you happen to dual-boot Windows, the following entry should
-allow booting it:</para>
+<para>If dual-booting Windows, the following entry will allow
+booting it:</para>
<screen><userinput>cat &gt;&gt; /boot/grub/menu.lst &lt;&lt; "EOF"
<literal>title Windows
@@ -74,11 +121,16 @@ rootnoverify (hd0,0)
chainloader +1</literal>
EOF</userinput></screen>
-<para>The FHS stipulates that Grub's menu.lst file should be symlinked to
-/etc/grub/menu.lst. To satisfy this requirement, issue the following
-command:</para>
+<para>If <command>info grub</command> does not provide all necessary material, additional
+information regarding Grub is located on its website at:
+<ulink url="http://www.gnu.org/software/grub/"/>.</para>
+
+<para>The FHS stipulates that Grub's <filename>menu.lst</filename> file should be symlinked to
+<filename class="symlink">/etc/grub/menu.lst</filename>. To satisfy this requirement, issue the
+following command:</para>
<screen><userinput>mkdir /etc/grub &amp;&amp;
ln -s /boot/grub/menu.lst /etc/grub</userinput></screen>
</sect1>
+
diff --git a/chapter08/introduction.xml b/chapter08/introduction.xml
index d936cf2ed..6fa80cadc 100644
--- a/chapter08/introduction.xml
+++ b/chapter08/introduction.xml
@@ -7,6 +7,10 @@
<title>Introduction</title>
<?dbhtml filename="introduction.html"?>
-<para>See testing</para>
+<para>It is time to make the LFS system bootable. This chapter
+discusses creating an <filename>fstab</filename> file, building a
+kernel for the new LFS system, and installing the Grub boot loader so
+that the LFS system can be selected for booting at startup.</para>
</sect1>
+
diff --git a/chapter08/kernel.xml b/chapter08/kernel.xml
index 9fe3bc889..4b775a3d9 100644
--- a/chapter08/kernel.xml
+++ b/chapter08/kernel.xml
@@ -3,26 +3,37 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
-<sect1 id="ch-bootable-kernel" xreflabel="Linux" role="wrap">
+<sect1 id="ch-bootable-kernel" role="wrap">
<title>Linux-&linux-version;</title>
<?dbhtml filename="kernel.html"?>
<indexterm zone="ch-bootable-kernel"><primary sortas="a-Linux">Linux</primary></indexterm>
<sect2 role="package"><title/>
+<para>The Linux package contains the kernel and the header files.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
-<seglistitem><seg>All default options: 4.20 SBU</seg>
-<seg>All default options: 181 MB</seg></seglistitem>
+<seglistitem><seg>4.20 SBU</seg>
+<seg>181 MB</seg></seglistitem>
</segmentedlist>
+<segmentedlist>
+<segtitle>Linux installation depends on</segtitle>
+<seglistitem><seg>Bash, Binutils, Coreutils, Findutils,
+GCC, Glibc, Grep, Gzip, Make, Modutils, Perl, and Sed</seg></seglistitem>
+</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of the kernel</title>
+<para>Building the kernel involves a few steps&mdash;configuration,
+compilation, and installation. Read the <filename>README</filename>
+file in the kernel source tree for alternate methods to the way this
+book configures the kernel.</para>
+
<para>Kernel version 2.6.10 has a security vulnerability that will allow user
processes to gain root privledges upon loading of a kernel module. See:
<ulink url="http://www.uwsg.iu.edu/hypermail/linux/kernel/0412.3/0679.html"/> for more information. The following patch fixes this problem:</para>
@@ -33,50 +44,200 @@ processes to gain root privledges upon loading of a kernel module. See:
<screen><userinput>make mrproper</userinput></screen>
-<!--NEW: the sed command has been removed-->
+<para>This ensures that the kernel tree is absolutely clean. The
+kernel team recommends that this command be issued prior to each
+kernel compilation. Do not rely on the source tree being clean after
+un-tarring.</para>
-<para>If, in <xref linkend="ch-scripts-console"/>, you decided you want
-to compile the keymap into the kernel, issue the command below:</para>
+<para>If, in <xref linkend="ch-scripts-console" role=","/> it was decided to
+compile the keymap into the kernel, issue the command below:</para>
<screen><userinput>loadkeys -m /usr/share/kbd/keymaps/<replaceable>[path to keymap]</replaceable> &gt; \
drivers/char/defkeymap.c</userinput></screen>
-<para>Configure the kernel via a menu-driven interface. BLFS has some
-information regarding particular kernel configuration requirements of
-packages outside of LFS at
-<ulink url="&blfs-root;view/svn/longindex.html#kernel-config-index"/>.</para>
+<para>For example, if using a Dutch keyboard, use
+<phrase
+condition="html"><filename>/usr/share/kbd/keymaps/i386/qwerty/nl.map.gz</filename></phrase><phrase
+condition="pdf"><filename>/usr/share/kbd/keymaps/i386/
+qwerty/nl.map.gz</filename></phrase>.</para>
+
+<para>Configure the kernel via a menu-driven interface:</para>
<screen><userinput>make menuconfig</userinput></screen>
+<para>Alternatively, <command>make oldconfig</command> may be more appropriate in some
+situations. See the <filename>README</filename> file for more
+information.</para>
+
+<note><para>When configuring the kernel, be sure to enable the
+<quote>Support for hot-pluggable devices</quote> option under the
+<quote>General Setup</quote> menu. This enables hotplug events that
+are used by <command>udev</command> to populate the <filename
+class="directory">/dev</filename> directory with device
+nodes.</para></note>
+
+<para>If desired, skip kernel configuration by copying the kernel
+config file, <filename>.config</filename>, from the host system
+(assuming it is available) to the unpacked <filename
+class="directory">linux-&linux-version;</filename> directory. However,
+we do not recommend this option. It is often better to explore all the
+configuration menus and create the kernel configuration from
+scratch.</para>
+
+<para>For POSIX-shared memory support, ensure that the kernel config
+option <quote>Virtual memory file system support</quote> is enabled.
+It resides within the <quote>File systems</quote> menu and is normally
+enabled by default.</para>
+
+<para>LFS bootscripts make the assumption that either both
+<quote>Support for Host-side USB</quote> and <quote>USB device
+filesystem</quote> have been compiled directly into the kernel, or
+that neither is compiled at all. Bootscripts will not work properly
+if it is a module (usbcore.ko).</para>
+
+<note><para>NPTL requires the kernel to be compiled with GCC 3.x, in
+this case &gcc-version;. Compiling with 2.95.x is known to cause failures in
+the glibc test suite, so it is not recommended to compile the kernel
+with gcc 2.95.x.</para></note>
+
<para>Compile the kernel image and modules:</para>
<screen><userinput>make</userinput></screen>
-<para>Install the modules, if your kernel configuration uses them:</para>
+<para>If using kernel modules, an
+<filename>/etc/modprobe.conf</filename> file may be needed.
+Information pertaining to modules and kernel configuration is
+located in the kernel documentation in the <filename
+class="directory">linux-&linux-version;/Documentation</filename>
+directory. The <emphasis>modprobe.conf</emphasis> man page may also be
+of interest.</para>
+
+<para>Be very careful when reading other documentation because it
+usually applies to 2.4.x kernels only. As far as we know, kernel
+configuration issues specific to Hotplug and Udev are not documented.
+The problem is that Udev will create a device node only if Hotplug or
+a user-written script inserts the corresponding module into the
+kernel, and not all modules are detectable by Hotplug. Note that
+statements like the one below in the
+<filename>/etc/modprobe.conf</filename> file do not work with
+Udev:</para>
+
+<para><screen>alias char-major-XXX some-module</screen></para>
+
+<para>Because of the complications with Hotplug, Udev, and modules, we
+strongly recommend starting with a completely non-modular kernel
+configuration, especially if this is the first time using Udev.</para>
+
+<para>Install the modules, if the kernel configuration uses them:</para>
<screen><userinput>make modules_install</userinput></screen>
-<para>The path to the kernel image may vary depending on the platform you're
-using. Issue the following command to install the kernel:</para>
+<para>If there are many modules and very little space, consider
+stripping and compressing the modules. For most users, such
+compression is not worth the time, but if the system is pressed for
+space, see <ulink
+url="http://www.linux-mips.org/archives/linux-mips/2002-04/msg00031.html"/>.</para>
+
+<para>After kernel compilation is complete, additional steps are
+required to complete the installation. Some files need to be copied to
+the <filename class="directory">/boot</filename> directory.</para>
+
+<para>The path to the kernel image may vary depending on the platform
+being used. Issue the following command to install the kernel:</para>
<screen><userinput>cp arch/i386/boot/bzImage /boot/lfskernel-&linux-version;</userinput></screen>
+<para><filename>System.map</filename> is a symbol file for the kernel.
+It maps the function entry points of every function in the kernel API,
+as well as the addresses of the kernel data structures for the running
+kernel. Issue the following command to install the map file:</para>
+
<screen><userinput>cp System.map /boot/System.map-&linux-version;</userinput></screen>
+<para>The kernel configuration file <filename>.config</filename>
+produced by the <command>make menuconfig</command> step
+above contains all the configuration selections for the kernel
+that was just compiled. It is a good idea to keep this file for future
+reference:</para>
+
<screen><userinput>cp .config /boot/config-&linux-version;</userinput></screen>
-<para>If you are going to keep the kernel source tree around, you may want to
-run <command>chown -R 0:0</command> on the
-<filename class="directory">linux-&linux-version;</filename> directory to ensure all files are
-owned by user <emphasis>root</emphasis>.</para>
+<para>It is important to note that the files in the kernel source
+directory are not owned by <emphasis>root</emphasis>. Whenever a
+package is unpacked as user <emphasis>root</emphasis> (like we did
+inside chroot), the files have the user and group IDs of whatever
+they were on the packager's computer. This is usually not a problem
+for any other package to be installed because the source tree is
+removed after the installation. However, the Linux source tree is
+often retained for a long time. Because of this, there is a chance
+that whatever user ID the packager used will be assigned to somebody
+on the machine. That person would then have write access to the kernel
+source.</para>
+
+<para>If the kernel source tree is going to be retained, run
+<command>chown -R 0:0</command> on the <filename
+class="directory">linux-&linux-version;</filename> directory to ensure
+all files are owned by user <emphasis>root</emphasis>.</para>
+
+<warning><para>Some kernel documentation recommends creating a symlink from
+<filename class="symlink">/usr/src/linux</filename> pointing to the kernel
+source directory. This is specific to kernels prior to the 2.6 series and
+<emphasis>must not</emphasis> be created on an LFS system as it can cause
+problems for packages you may wish to build once your base LFS system is
+complete.</para></warning>
</sect2>
<sect2 id="contents-kernel" role="content"><title>Contents of Linux</title>
-<para>See testing</para>
+<segmentedlist>
+<segtitle>Installed files</segtitle>
+<seglistitem><seg>kernel, kernel headers,
+and System.map</seg></seglistitem>
+</segmentedlist>
+
+<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
+<?dbfo list-presentation="list"?>
+
+<varlistentry id="kernel">
+<term><filename>kernel</filename></term>
+<listitem>
+<para>The engine of the Linux system. When turning on the computer,
+the kernel is the first part of the operating system that gets loaded.
+It detects and initializes all components of the computer's hardware,
+then makes these components available as a tree of files to the
+software and turns a single CPU into a multitasking machine capable
+of running scores of programs seemingly at the same time.</para>
+<indexterm zone="ch-bootable-kernel kernel"><primary sortas="b-kernel">kernel</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="kernel-headers">
+<term><filename>kernel headers</filename></term>
+<listitem>
+<para>Defines the interface to the services that the kernel provides.
+The headers in the system's <filename
+class="directory">include</filename> directory should
+<emphasis>always</emphasis> be the ones against which Glibc was
+compiled and therefore, should <emphasis>not</emphasis> be replaced
+when upgrading the kernel.</para>
+<indexterm zone="ch-bootable-kernel kernel-headers"><primary sortas="e-kernel-headers">kernel headers</primary></indexterm>
+</listitem>
+</varlistentry>
+
+<varlistentry id="System.map">
+<term><filename>System.map</filename></term>
+<listitem>
+<para>A list of addresses and symbols; it maps the entry points and
+addresses of all the functions and data structures in the
+kernel</para>
+<indexterm zone="ch-bootable-kernel System.map"><primary sortas="e-/boot/System.map">/boot/System.map</primary></indexterm>
+</listitem>
+</varlistentry>
+</variablelist>
</sect2>
</sect1>
+
diff --git a/chapter09/chapter09.xml b/chapter09/chapter09.xml
index 76ddd3856..51f0ba6eb 100644
--- a/chapter09/chapter09.xml
+++ b/chapter09/chapter09.xml
@@ -9,8 +9,8 @@
<?dbhtml filename="chapter09.html"?>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="theend.xml"/>
-<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="reboot.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="getcounted.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="reboot.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="whatnow.xml"/>
</chapter>
diff --git a/chapter09/getcounted.xml b/chapter09/getcounted.xml
index 06d0d7791..df48e09ba 100644
--- a/chapter09/getcounted.xml
+++ b/chapter09/getcounted.xml
@@ -7,6 +7,12 @@
<title>Get Counted</title>
<?dbhtml filename="getcounted.html"?>
-<para>See testing</para>
+<para>Now that you have finished the book, do you want to be counted
+as an LFS user? Head over to <ulink
+url="&lfs-root;cgi-bin/lfscounter.cgi"/> and register as an LFS user
+by entering your name and the first LFS version you have used.</para>
+
+<para>Let's reboot into LFS now.</para>
</sect1>
+
diff --git a/chapter09/reboot.xml b/chapter09/reboot.xml
index 82c026b36..8bc45eafd 100644
--- a/chapter09/reboot.xml
+++ b/chapter09/reboot.xml
@@ -7,13 +7,35 @@
<title>Rebooting the System</title>
<?dbhtml filename="reboot.html"?>
+<para>Now that all of the software has been installed, it is time to reboot
+your computer. However, you should be aware of a few things. The system you
+have created in this book is quite minimal, and most likely will not have
+the functionality you would need to be able to continue forward. By installing
+a few extra packages from the BLFS book while still in our current chroot
+environment, you can leave yourself in a much better position to continue on
+once you reboot into your new LFS installation. Installing a text mode web
+browser, such as Lynx, you can easily view the BLFS book in one virtual
+terminal, while building packages in another. The GPM package will also allow
+you to perform copy/paste actions in your virtual terminals. Lastly, if you
+are in a situation where static IP configuration does not meet your networking
+requirements, installing packages such as dhcpcd or ppp at this point might
+also be useful.</para>
+
+
+<para>Now that we have said that, lets move on to booting our shiny new LFS
+installation for the first time! First exit from the chroot environment:</para>
+
<screen><userinput>logout</userinput></screen>
+<para>Then unmount the virtual files systems:</para>
+
<screen><userinput>umount $LFS/dev/pts
umount $LFS/dev/shm
umount $LFS/dev
umount $LFS/proc
-umount $LFS/sys</userinput></screen>
+umount $LFS/sys</userinput></screen>
+
+<para>Unmount the LFS file system itself:</para>
<screen><userinput>umount $LFS</userinput></screen>
@@ -24,6 +46,15 @@ partitions before unmounting the main one, like this:</para>
umount $LFS/home
umount $LFS</userinput></screen>
+<para>Now, reboot the system with:</para>
+
<screen><userinput>shutdown -r now</userinput></screen>
+<para>Assuming the Grub boot loader was set up as outlined earlier, the menu
+is set to boot <emphasis>LFS &version;</emphasis> automatically.</para>
+
+<para>When the reboot is complete, the LFS system is ready for use and
+software can be added.</para>
+
</sect1>
+
diff --git a/chapter09/theend.xml b/chapter09/theend.xml
index 6e28b27e9..91dab3861 100644
--- a/chapter09/theend.xml
+++ b/chapter09/theend.xml
@@ -7,8 +7,18 @@
<title>The End</title>
<?dbhtml filename="theend.html"?>
-<para>Create the /etc/lfs-release file:</para>
+<indexterm zone="ch-finish-theend"><primary sortas="e-/etc/lfs-release">/etc/lfs-release</primary></indexterm>
+
+<para>Well done! The new LFS system is installed! We wish you much
+success with your shiny new custom-built Linux system.</para>
+
+<para>It may be a good idea to create an
+<filename>/etc/lfs-release</filename> file. By having this file, it is
+very easy for you (and for us if you need to ask for help at some
+point) to find out which LFS version is installed on the system.
+Create this file by running:</para>
<screen><userinput>echo &version; &gt; /etc/lfs-release</userinput></screen>
</sect1>
+
diff --git a/chapter09/whatnow.xml b/chapter09/whatnow.xml
index 056ce5398..4df9d0cad 100644
--- a/chapter09/whatnow.xml
+++ b/chapter09/whatnow.xml
@@ -7,6 +7,43 @@
<title>What Now?</title>
<?dbhtml filename="whatnow.html"?>
-<para>See testing</para>
+<para>Thank you for reading this LFS book. We hope that you have
+found this book helpful and have learned more about the system
+creation process.</para>
+
+<para>Now that the LFS system is installed, you may be wondering
+<quote>What next?</quote> To answer that question, we have compiled a
+list of resources for you.</para>
+
+<itemizedlist>
+<listitem><para>Beyond Linux From Scratch</para>
+
+<para>The Beyond Linux From Scratch book covers installation
+procedures for a wide range of software beyond the scope of the LFS
+Book. The BLFS project is located at <ulink url="&blfs-root;"/>.</para></listitem>
+
+<listitem><para>LFS Hints</para>
+
+<para>The LFS Hints are a collection of educational documents
+submitted by volunteers in the LFS community. The hints are available
+at <ulink url="&hints-index;"/>.</para></listitem>
+
+<listitem><para>Mailing lists</para>
+
+<para>There are several LFS mailing lists you may subscribe to if you
+are in need of help, want to stay current with the latest developments,
+want to contribute to the project, and more. See <xref
+linkend="ch-scatter-maillists"/> for more
+information.</para></listitem>
+
+<listitem><para>The Linux Documentation Project</para>
+
+<para>The goal of The Linux Documentation Project (TLDP) is to
+collaborate on all of the issues of Linux documentation. The TLDP features
+a large collection of HOWTOs, guides, and man pages. It is located at
+<ulink url="http://www.tldp.org/"/>.</para></listitem>
+
+</itemizedlist>
</sect1>
+
diff --git a/general.ent b/general.ent
index cab1ff4b5..e45ab0330 100644
--- a/general.ent
+++ b/general.ent
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!ENTITY version "SVN-20050205">
-<!ENTITY releasedate "February 5, 2005">
+<!ENTITY version "6.1-testing-20050205">
+<!ENTITY releasedate "Febraury 5, 2005">
<!ENTITY milestone "6.1">
<!ENTITY lfs-root "http://www.linuxfromscratch.org/">
@@ -8,8 +8,9 @@
<!ENTITY faq-root "&lfs-root;faq/">
<!ENTITY hints-root "&lfs-root;hints/downloads/files/">
<!ENTITY hints-index "&lfs-root;hints/list.html">
-<!ENTITY patches-root "&lfs-root;patches/lfs/cvs/unstable/">
+<!ENTITY patches-root "&lfs-root;patches/lfs/cvs/testing/">
<!ENTITY wiki-root "http://wiki.linuxfromscratch.org/">
+<!ENTITY freshmeat "http://freshmeat.net/projects/">
<!ENTITY buildtime "Approximate build time">
<!ENTITY diskspace "Required disk space">
diff --git a/prologue/audience.xml b/prologue/audience.xml
index 2d2edf45d..b9a1842a1 100644
--- a/prologue/audience.xml
+++ b/prologue/audience.xml
@@ -7,6 +7,85 @@
<title>Audience</title>
<?dbhtml filename="audience.html"?>
-<para>See testing</para>
+<para>There are many reasons why somebody would want to read this
+book. The principle reason is to install a Linux system straight
+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>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>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>Another benefit of LFS is the ability to create a very compact
+Linux system. When installing a regular distribution, one is often
+forced to install several programs which are probably never used.
+These programs waste precious 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 compared to most existing setups. 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>We could compare Linux distributions to a hamburger purchased at
+a fast-food restaurant&mdash;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&mdash;broil it, bake it, deep-fry
+it, or barbecue it.</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>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>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>
+
diff --git a/prologue/bookinfo.xml b/prologue/bookinfo.xml
index 1fbf9e04d..2aca11534 100644
--- a/prologue/bookinfo.xml
+++ b/prologue/bookinfo.xml
@@ -14,20 +14,12 @@
<copyright id="copyright">
- <year>1999-2005</year>
+ <year>1999&ndash;2005</year>
<holder>Gerard Beekmans</holder>
</copyright>
-
-<abstract>
-<para><note><para>In this book there is only the commands to build an LFS system
-and new stuff. For a full version with all the explanations see <ulink
-url="&lfs-root;lfs/view/testing"/>.</para></note></para>
-</abstract>
-
-
<legalnotice>
-<para>Copyright (c) 1999-2005, Gerard Beekmans</para>
+<para>Copyright (c) 1999&ndash;2005, Gerard Beekmans</para>
<para>All rights reserved.</para>
@@ -38,14 +30,14 @@ met:</para>
<itemizedlist>
<listitem><para>Redistributions in any form must retain the above copyright
-notice, this list of conditions and the following disclaimer.</para></listitem>
+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>
+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>
+a reference to the <quote>Linux From Scratch</quote> project</para></listitem>
</itemizedlist>
@@ -62,5 +54,5 @@ 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>
-
</bookinfo>
+
diff --git a/prologue/dedication.xml b/prologue/dedication.xml
index a523b2936..41cca4d77 100644
--- a/prologue/dedication.xml
+++ b/prologue/dedication.xml
@@ -7,3 +7,4 @@
<title>Dedication</title>
<para>This book is dedicated</para>
</dedication>
+
diff --git a/prologue/foreword.xml b/prologue/foreword.xml
index c9aaf7242..7f2c31288 100644
--- a/prologue/foreword.xml
+++ b/prologue/foreword.xml
@@ -7,6 +7,61 @@
<title>Foreword</title>
<?dbhtml filename="foreword.html"?>
-<para>See testing</para>
+<para>My adventures in Linux began six years ago when I downloaded and
+installed my first distribution. After working with it for awhile, 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 alternate
+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>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>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>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 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>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 straight 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>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></para>
+
+<literallayout>--
+Gerard Beekmans
+gerard@linuxfromscratch.org</literallayout>
</sect1>
+
diff --git a/prologue/organization.xml b/prologue/organization.xml
index 70d8572e4..f701fc388 100644
--- a/prologue/organization.xml
+++ b/prologue/organization.xml
@@ -7,6 +7,34 @@
<title>Structure</title>
<?dbhtml filename="organization.html"?>
-<para>See testing</para>
+<para>This book is divided into the following parts.</para>
+
+<sect2>
+<title>Part I - Introduction</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>
+
+<sect2>
+<title>Part II - Preparing for the Build</title>
+
+<para>Part II describes how to prepare for the building process&mdash;making
+a partition, downloading the packages, and compiling temporary
+tools.</para>
+</sect2>
+
+<sect2>
+<title>Part III - Building the LFS System</title>
+
+<para>Part III guides the reader through the building of the LFS
+system&mdash;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>
diff --git a/prologue/prerequisites.xml b/prologue/prerequisites.xml
index b22902560..506fe4487 100644
--- a/prologue/prerequisites.xml
+++ b/prologue/prerequisites.xml
@@ -7,6 +7,31 @@
<title>Prerequisites</title>
<?dbhtml filename="prerequisites.html"?>
-<para>See testing</para>
+<para>This book assumes that the reader has a reasonable knowledge of using
+and installing Linux software. Before building an LFS system, we
+recommend reading the following HOWTOs:</para>
+
+<itemizedlist>
+<listitem><para remap="verbatim">Software-Building-HOWTO
+<ulink url="http://www.tldp.org/HOWTO/Software-Building-HOWTO.html"/></para>
+
+<para>This is a comprehensive guide to building and installing
+<quote>generic</quote> Unix software distributions under Linux.</para></listitem>
+
+<listitem><para remap="verbatim">The Linux Users' Guide
+<ulink url="http://espc22.murdoch.edu.au/~stewart/guide/guide.html"/></para>
+
+<para>This guide covers the usage of assorted Linux software.</para></listitem>
+
+<listitem><para remap="verbatim">The Essential Pre-Reading Hint
+<ulink url="&hints-root;essential_prereading.txt"/></para>
+
+<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>
+
diff --git a/prologue/typography.xml b/prologue/typography.xml
index d13d31282..3a74378a4 100644
--- a/prologue/typography.xml
+++ b/prologue/typography.xml
@@ -7,6 +7,52 @@
<title>Typography</title>
<?dbhtml filename="typography.html"?>
-<para>See testing</para>
+<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><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>
+
+<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><emphasis>Emphasis</emphasis></para>
+
+<para>This form of text is used for several purposes in the book,
+mainly to emphasize important points or items.</para>
+
+<para><ulink url="&lfs-root;"/></para>
+
+<para>This format is used for hyperlinks, both within the LFS
+community and to external pages, including HOWTOs, download locations,
+and websites.</para>
+
+<screen><userinput>cat &gt; $LFS/etc/group &lt;&lt; "EOF"
+<literal>root:x:0:
+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><replaceable>[REPLACED TEXT]</replaceable></para>
+
+<para>This format is used to encapsulate text that is not to be typed
+as seen<phrase condition="html"> or copy-and-pasted</phrase>.</para>
</sect1>
+
diff --git a/stylesheets/lfs-chunked.xsl b/stylesheets/lfs-chunked.xsl
index bfe985b7a..47b564447 100644
--- a/stylesheets/lfs-chunked.xsl
+++ b/stylesheets/lfs-chunked.xsl
@@ -24,7 +24,7 @@
Voila! (Man I hope we can do this better in XSLT 2.0) -->
- <xsl:include href="http://docbook.sourceforge.net/release/xsl/1.67.2/xhtml/chunk-code.xsl"/>
+ <xsl:include href="http://docbook.sourceforge.net/release/xsl/1.67.2/xhtml/profile-chunk-code.xsl"/>
<!-- Including our others customized chunks templates -->
<xsl:include href="xhtml/lfs-legalnotice.xsl"/>
diff --git a/stylesheets/lfs-nochunks.xsl b/stylesheets/lfs-nochunks.xsl
index f3b2fb30a..375f1d8cd 100644
--- a/stylesheets/lfs-nochunks.xsl
+++ b/stylesheets/lfs-nochunks.xsl
@@ -5,7 +5,7 @@
version="1.0">
<!-- We use XHTML -->
- <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.67.2/xhtml/docbook.xsl"/>
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.67.2/xhtml/profile-docbook.xsl"/>
<!-- Fix encoding issues with default UTF-8 output of the xhtml stylesheet -->
<xsl:output method="html" encoding="ISO-8859-1" indent="no" />
diff --git a/stylesheets/lfs.css b/stylesheets/lfs.css
index 22b70d0f8..68c23331d 100644
--- a/stylesheets/lfs.css
+++ b/stylesheets/lfs.css
@@ -230,11 +230,6 @@ tt, code, kbd, pre, .command {
font-family: monospace;
}
-pre {
- margin-top: .5em;
- margin-bottom: .5em;
-}
-
pre.userinput {
color: #101310;
background-color: #e5e5e5;