aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile75
-rw-r--r--chapter01/changelog.xml6
-rw-r--r--chapter01/how.xml2
-rw-r--r--chapter01/whatsnew.xml12
-rw-r--r--chapter02/creatingpartition.xml2
-rw-r--r--chapter03/packages.xml44
-rw-r--r--chapter03/patches.xml10
-rw-r--r--chapter05/gcc-pass1.xml2
-rw-r--r--chapter05/glibc.xml40
-rw-r--r--chapter06/acl.xml6
-rw-r--r--chapter06/attr.xml5
-rw-r--r--chapter06/autoconf.xml2
-rw-r--r--chapter06/chapter06d.xml87
-rw-r--r--chapter06/coreutils.xml8
-rw-r--r--chapter06/createfiles.xml54
-rw-r--r--chapter06/dbus.xml63
-rw-r--r--chapter06/diffutils.xml2
-rw-r--r--chapter06/e2fsprogs.xml13
-rw-r--r--chapter06/findutils.xml15
-rw-r--r--chapter06/glibc.xml48
-rw-r--r--chapter06/gmp.xml2
-rw-r--r--chapter06/m4.xml2
-rw-r--r--chapter06/man-db.xml4
-rw-r--r--chapter06/mpfr.xml5
-rw-r--r--chapter06/ncurses.xml6
-rw-r--r--chapter06/pkgmgt.xml24
-rw-r--r--chapter06/procps.xml10
-rw-r--r--chapter06/readline.xml2
-rw-r--r--chapter06/systemd.xml379
-rw-r--r--chapter06/util-linux.xml14
-rw-r--r--chapter07/chapter07d.xml25
-rw-r--r--chapter07/clock.xml104
-rw-r--r--chapter07/consoled.xml137
-rw-r--r--chapter07/etcshellsd.xml48
-rw-r--r--chapter07/introductiond.xml73
-rw-r--r--chapter07/locale.xml152
-rw-r--r--chapter07/networkd.xml270
-rw-r--r--chapter07/symlinksd.xml63
-rw-r--r--chapter07/sysd-custom.xml253
-rw-r--r--chapter07/systemd-custom.xml175
-rw-r--r--chapter07/udevd.xml337
-rw-r--r--chapter08/fstab.xml29
-rw-r--r--chapter08/grub.xml12
-rw-r--r--chapter08/kernel.xml57
-rw-r--r--chapter09/reboot.xml4
-rw-r--r--chapter09/theend.xml42
-rw-r--r--general.ent20
-rw-r--r--indexd.xml48
-rw-r--r--packages.ent16
-rw-r--r--patches.ent5
-rw-r--r--prologue/bookinfo.xml16
51 files changed, 2191 insertions, 639 deletions
diff --git a/Makefile b/Makefile
index c6f8f8e02..c1a0d8409 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
BASEDIR = ~/lfs-book
+SYSDDIR = ~/lfs-systemd
DUMPDIR = ~/lfs-commands
RENDERTMP = $(HOME)/tmp
CHUNK_QUIET = 1
@@ -13,11 +14,20 @@ else
Q = @
endif
-lfs: validate profile-html
+sysv: validate profile-html
+ $(Q)xsltproc --nonet \
+ --output $(RENDERTMP)/lfs-html2.xml \
+ --stringparam profile.revision sysv \
+ stylesheets/lfs-xsl/profile.xsl \
+ $(RENDERTMP)/lfs-html.xml
+
@echo "Generating chunked XHTML files..."
- $(Q)xsltproc --nonet -stringparam chunk.quietly $(CHUNK_QUIET) \
- -stringparam rootid "$(ROOT_ID)" -stringparam base.dir $(BASEDIR)/ \
- stylesheets/lfs-chunked.xsl $(RENDERTMP)/lfs-html.xml
+ $(Q)xsltproc --nonet \
+ --stringparam chunk.quietly $(CHUNK_QUIET) \
+ --stringparam rootid "$(ROOT_ID)" \
+ --stringparam base.dir $(BASEDIR)/ \
+ stylesheets/lfs-chunked.xsl \
+ $(RENDERTMP)/lfs-html2.xml
@echo "Copying CSS code and images..."
$(Q)if [ ! -e $(BASEDIR)/stylesheets ]; then \
@@ -37,11 +47,51 @@ lfs: validate profile-html
tidy -config tidy.conf $$filename; \
true; \
/bin/bash obfuscate.sh $$filename; \
- sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
+ sed -e "s@text/html@application/xhtml+xml@g" \
+ -e "s/\xa9/\©/ " \
+ -i $$filename; \
done;
$(Q)$(MAKE) $(BASEDIR)/wget-list $(BASEDIR)/md5sums
+systemd: validated profile-html
+ $(Q)xsltproc --nonet \
+ --output $(RENDERTMP)/lfs-html2.xml \
+ --stringparam profile.revision systemd \
+ stylesheets/lfs-xsl/profile.xsl \
+ $(RENDERTMP)/lfs-html.xml
+
+ @echo "Generating chunked XHTML files..."
+ $(Q)xsltproc --nonet \
+ --stringparam chunk.quietly $(CHUNK_QUIET) \
+ --stringparam rootid "$(ROOT_ID)" \
+ --stringparam base.dir $(SYSDDIR)/ \
+ stylesheets/lfs-chunked.xsl \
+ $(RENDERTMP)/lfs-html2.xml
+
+ @echo "Copying CSS code and images..."
+ $(Q)if [ ! -e $(SYSDDIR)/stylesheets ]; then \
+ mkdir -p $(SYSDDIR)/stylesheets; \
+ fi;
+ $(Q)cp stylesheets/lfs-xsl/*.css $(SYSDDIR)/stylesheets
+
+ $(Q)if [ ! -e $(SYSDDIR)/images ]; then \
+ mkdir -p $(SYSDDIR)/images; \
+ fi;
+ $(Q)cp images/*.png $(SYSDDIR)/images
+
+ @echo "Running Tidy and obfuscate.sh..."
+ $(Q)for filename in `find $(SYSDDIR) -name "*.html"`; do \
+ tidy -config tidy.conf $$filename; \
+ true; \
+ /bin/bash obfuscate.sh $$filename; \
+ sed -e "s@text/html@application/xhtml+xml@g" \
+ -e "s/\xa9/\©/ " \
+ -i $$filename; \
+ done;
+
+# $(Q)$(MAKE) $(SYSDDIR)/wget-list $(SYSDDIR)/md5sumsd
+
pdf: validate
@echo "Generating profiled XML for PDF..."
$(Q)xsltproc --nonet --stringparam profile.condition pdf \
@@ -94,7 +144,13 @@ validate: tmpdir
$(Q)./aux-file-data.sh $(RENDERTMP)/lfs-full.xml
@echo "Validation complete."
-profile-html: validate
+validated: tmpdir
+ @echo "Validating the book..."
+ $(Q)xmllint --nonet --noent --xinclude --postvalid \
+ -o $(RENDERTMP)/lfs-full.xml indexd.xml
+ @echo "Validation complete."
+
+profile-html:
@echo "Generating profiled XML for XHTML..."
$(Q)xsltproc --nonet --stringparam profile.condition html \
--output $(RENDERTMP)/lfs-html.xml stylesheets/lfs-xsl/profile.xsl \
@@ -117,6 +173,13 @@ $(BASEDIR)/md5sums: stylesheets/wget-list.xsl chapter03/chapter03.xml packages.e
"s/BOOTSCRIPTS-MD5SUM/$(shell md5sum lfs-bootscripts*.tar.bz2 | cut -d' ' -f1)/" \
$(BASEDIR)/md5sums
+md5sumsd: $(SYSDDIR)/md5sumsd
+$(SYSDDIR)/md5sumsd: stylesheets/wget-list.xsl chapter03/chapter03.xml packages.ent patches.ent
+ @echo "Generating md5sum file..."
+ $(Q)mkdir -p $(SYSDDIR)
+ $(Q)xsltproc --xinclude --nonet --output $(SYSDDIR)/md5sums \
+ stylesheets/md5sum.xsl chapter03/chapter03.xml
+
dump-commands: validate
@echo "Dumping book commands..."
$(Q)xsltproc --output $(DUMPDIR)/ \
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index 430fb33a1..ed0d08870 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -18,6 +18,8 @@
<para>Below is a list of changes made since the previous release of the
book.</para>
+ <para revision="systemd">A test</para>
+
<itemizedlist>
<title>Changelog Entries:</title>
@@ -34,6 +36,10 @@
</listitem>
</itemizedlist>
</listitem>
+
+ Note: If a change is only specific to sysv or systemd, then use
+ <listitem revision="sysv"> or <listitem revision="systemd"> as
+ appropriate for the entry or if needed the entire day's listitem.
-->
<listitem>
<para>2016-05-16</para>
diff --git a/chapter01/how.xml b/chapter01/how.xml
index c4f3a0a8b..a92a3fad7 100644
--- a/chapter01/how.xml
+++ b/chapter01/how.xml
@@ -81,7 +81,7 @@
for package compilations to complete, you can continue using your computer as
normal.</para>
- <para>To finish the installation, the LFS-Bootscripts are set up in
+ <para>To finish the installation, the basic system configuration is 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 continuing the LFS experience beyond this book.
diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml
index e043ec2a4..04b2f10c0 100644
--- a/chapter01/whatsnew.xml
+++ b/chapter01/whatsnew.xml
@@ -58,10 +58,13 @@
<listitem>
<para>DejaGNU &dejagnu-version;</para>
</listitem>
+ <!--<listitem revision="systemd">
+ <para>D-Bus-&dbus-version;</para>
+ </listitem>-->
<!--<listitem>
<para>Diffutils &diffutils-version;</para>
</listitem>-->
- <!--<listitem>
+ <!--<listitem revision="sysv">
<para>Eudev &eudev-version;</para>
</listitem>-->
<!--<listitem>
@@ -196,10 +199,13 @@
<!--<listitem>
<para>Shadow &shadow-version;</para>
</listitem>-->
- <!--<listitem>
+ <!--<listitem revision="sysv">
<para>Sysklogd &sysklogd-version;</para>
</listitem>-->
- <!--<listitem>
+ <!--<listitem revision="systemd">
+ <para>Systemd &systemd-version;</para>
+ </listitem>-->
+ <!--<listitem revision="sysv">
<para>SysVinit &sysvinit-version;</para>
</listitem>-->
<listitem>
diff --git a/chapter02/creatingpartition.xml b/chapter02/creatingpartition.xml
index 6d34531b3..4aa57e6c5 100644
--- a/chapter02/creatingpartition.xml
+++ b/chapter02/creatingpartition.xml
@@ -36,7 +36,7 @@
additional software will probably be installed which will require additional
space. A 20 GB partition is a reasonable size to provide for growth. The LFS
system itself will not take up this much room. A large portion of this
- requirement is to provide sufficient free temporary storagei as well as
+ requirement is to provide sufficient free temporary storage as well as
for adding additional capabilities after LFS is complete. Additionally, compiling
packages can require a lot of disk space which will be reclaimed after the
package is installed.</para>
diff --git a/chapter03/packages.xml b/chapter03/packages.xml
index dfef86115..40febc0ae 100644
--- a/chapter03/packages.xml
+++ b/chapter03/packages.xml
@@ -112,8 +112,8 @@
<para>MD5 sum: <literal>&coreutils-md5;</literal></para>
</listitem>
</varlistentry>
-<!--
- <varlistentry>
+
+ <varlistentry revision="systemd">
<term>D-Bus (&dbus-version;) - <token>&dbus-size;</token>:</term>
<listitem>
<para>Home page: <ulink url="&dbus-home;"/></para>
@@ -121,7 +121,7 @@
<para>MD5 sum: <literal>&dbus-md5;</literal></para>
</listitem>
</varlistentry>
--->
+
<varlistentry>
<term>DejaGNU (&dejagnu-version;) - <token>&dejagnu-size;</token>:</term>
<listitem>
@@ -140,22 +140,14 @@
</listitem>
</varlistentry>
- <varlistentry>
+ <varlistentry revision="sysv">
<term>Eudev (&eudev-version;) - <token>&eudev-size;</token>:</term>
<listitem>
<para>Download: <ulink url="&eudev-url;"/></para>
<para>MD5 sum: <literal>&eudev-md5;</literal></para>
</listitem>
</varlistentry>
-<!--
- <varlistentry>
- <term>Eudev-manpages (&eudev-version;) - <token>&eudev-manpages-size;</token>:</term>
- <listitem>
- <para>Download: <ulink url="&eudev-manpages-url;"/></para>
- <para>MD5 sum: <literal>&eudev-manpages-md5;</literal></para>
- </listitem>
- </varlistentry>
--->
+
<varlistentry>
<term>E2fsprogs (&e2fsprogs-version;) - <token>&e2fsprogs-size;</token>:</term>
<listitem>
@@ -503,22 +495,6 @@
</listitem>
</varlistentry>
- <!-- FIXME:
- <varlistentry>
- <term>Ncurses Rollup Patch (&ncurses-date;) - 328 KB:</term>
- <listitem>
- <para><ulink url="ftp://invisible-island.net/ncurses/&ncurses-version;/"/></para>
-
- <note>
- <para>Ncurses Rollup Patch (&ncurses-date;) 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.
- There is no alternative download location yet.</para>
- </note>
- </listitem>
- </varlistentry>
- -->
-
<varlistentry>
<term>Patch (&patch-version;) - <token>&patch-size;</token>:</term>
<listitem>
@@ -594,7 +570,7 @@
</listitem>
</varlistentry>
- <varlistentry>
+ <varlistentry revision="sysv">
<term>Sysklogd (&sysklogd-version;) - <token>&sysklogd-size;</token>:</term>
<listitem>
<para>Home page: <ulink url="&sysklogd-home;"/></para>
@@ -602,8 +578,8 @@
<para>MD5 sum: <literal>&sysklogd-md5;</literal></para>
</listitem>
</varlistentry>
-<!--
- <varlistentry>
+
+ <varlistentry revision="systemd">
<term>Systemd (&systemd-version;) - <token>&systemd-size;</token>:</term>
<listitem>
<para>Home page: <ulink url="&systemd-home;"/></para>
@@ -611,8 +587,8 @@
<para>MD5 sum: <literal>&systemd-md5;</literal></para>
</listitem>
</varlistentry>
--->
- <varlistentry>
+
+ <varlistentry revision="sysv">
<term>Sysvinit (&sysvinit-version;) - <token>&sysvinit-size;</token>:</term>
<listitem>
<para>Home page: <ulink url="&sysvinit-home;"/></para>
diff --git a/chapter03/patches.xml b/chapter03/patches.xml
index 2161ae3b9..3d678ff0e 100644
--- a/chapter03/patches.xml
+++ b/chapter03/patches.xml
@@ -90,7 +90,15 @@
</listitem>
</varlistentry>
- <varlistentry>
+ <varlistentry revision="systemd">
+ <term>Systemd Compat Patch - <token>&systemd-compat-patch-size;</token>:</term>
+ <listitem>
+ <para>Download: <ulink url="&patches-root;&systemd-compat-patch;"/></para>
+ <para>MD5 sum: <literal>&systemd-compat-patch-md5;</literal></para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry revision="sysv">
<term>Sysvinit Consolidated Patch - <token>&sysvinit-consolidated-patch-size;</token>:</term>
<listitem>
<para>Download: <ulink url="&patches-root;&sysvinit-consolidated-patch;"/></para>
diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml
index 64077a414..694bfe780 100644
--- a/chapter05/gcc-pass1.xml
+++ b/chapter05/gcc-pass1.xml
@@ -196,7 +196,7 @@ cd build</userinput></screen>
<varlistentry>
<term><parameter>--disable-decimal-float, --disable-threads,
- --disable-libatomic, --disable-libgomp, --disable-libmpx
+ --disable-libatomic, --disable-libgomp, --disable-libmpx,
--disable-libquadmath, --disable-libssp, --disable-libvtv,
--disable-libstdcxx</parameter></term>
<listitem>
diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml
index 53865f690..2a72325c9 100644
--- a/chapter05/glibc.xml
+++ b/chapter05/glibc.xml
@@ -42,11 +42,7 @@
<sect2 role="installation">
<title>Installation of Glibc</title>
-<!--
- <para>First fix a build problem that affects i386 systems:</para>
-<screen><userinput remap="pre">patch -Np1 -i ../&glibc-upstream-patch;</userinput></screen>
--->
<para>Fix some problems identified upstream:</para>
<screen><userinput remap="pre">patch -Np1 -i ../&glibc-upstream-patch;</userinput></screen>
@@ -80,15 +76,7 @@ cd build</userinput></screen>
cross-compiler in <filename class="directory">/tools</filename>.</para>
</listitem>
</varlistentry>
-<!--
- <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-kernel=&min-kernel;</parameter></term>
<listitem>
@@ -97,16 +85,7 @@ cd build</userinput></screen>
kernels are not enabled.</para>
</listitem>
</varlistentry>
-<!--
- <varlistentry>
- <term><parameter>- -enable-obsolete-rpc</parameter></term>
- <listitem>
- <para>This installs NIS and RPC related headers that are not
- installed by default. They are required to build GCC and by
- several BLFS packages.</para>
- </listitem>
- </varlistentry>
--->
+
<varlistentry>
<term><parameter>--with-headers=/tools/include</parameter></term>
<listitem>
@@ -169,21 +148,6 @@ cd build</userinput></screen>
<screen><userinput remap="make">make</userinput></screen>
-<!--
- <para>This package does come with a test suite, however, it cannot be
- run at this time because we do not have a C++ compiler yet.</para>
-
- <note>
- <para>The test suite also requires locale data to be installed in order to run
- successfully. Locale data provides information to the system regarding
- such things as the date, time, and currency formats accepted and output by
- system utilities. 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. To install
- the Glibc locales anyway, use instructions from <xref
- linkend="ch-system-glibc" role="."/></para>
- </note>
--->
<para>Install the package:</para>
<screen><userinput remap="install">make install</userinput></screen>
diff --git a/chapter06/acl.xml b/chapter06/acl.xml
index 9dbc1b2a8..7d448c121 100644
--- a/chapter06/acl.xml
+++ b/chapter06/acl.xml
@@ -59,11 +59,15 @@
<para>Prepare Acl for compilation:</para>
-<screen><userinput remap="configure">./configure --prefix=/usr \
+<screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr \
--bindir=/bin \
--disable-static \
--libexecdir=/usr/lib</userinput></screen>
+<screen revision="systemd"><userinput remap="configure">./configure --prefix=/usr \
+ --disable-static \
+ --libexecdir=/usr/lib</userinput></screen>
+
<para>Compile the package:</para>
<screen><userinput remap="make">make</userinput></screen>
diff --git a/chapter06/attr.xml b/chapter06/attr.xml
index 03044a745..65d509f9a 100644
--- a/chapter06/attr.xml
+++ b/chapter06/attr.xml
@@ -53,10 +53,13 @@
<para>Prepare Attr for compilation:</para>
-<screen><userinput remap="configure">./configure --prefix=/usr \
+<screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr \
--bindir=/bin \
--disable-static</userinput></screen>
+<screen revision="systemd"><userinput remap="configure">./configure --prefix=/usr \
+ --disable-static</userinput></screen>
+
<para>Compile the package:</para>
<screen><userinput remap="make">make</userinput></screen>
diff --git a/chapter06/autoconf.xml b/chapter06/autoconf.xml
index 519811692..bf3d9ac9a 100644
--- a/chapter06/autoconf.xml
+++ b/chapter06/autoconf.xml
@@ -56,7 +56,7 @@
<para>This takes a long time, about &autoconf-ch6-sbu-tests; SBUs. In addition,
several tests are skipped that use Automake. For full test coverage,
Autoconf can be re-tested after Automake has been installed. In addition,
- two fail due to changes in libtool-2.4.3 and later.</para>
+ two tests fail due to changes in libtool-2.4.3 and later.</para>
<para>Install the package:</para>
diff --git a/chapter06/chapter06d.xml b/chapter06/chapter06d.xml
new file mode 100644
index 000000000..d08135f7e
--- /dev/null
+++ b/chapter06/chapter06d.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+
+<chapter id="chapter-building-system" xreflabel="Chapter 6">
+ <?dbhtml dir="chapter06"?>
+ <?dbhtml filename="chapter06.html"?>
+
+ <title>Installing Basic System Software</title>
+
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kernfs.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgmgt.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chroot.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="creatingdirs.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="createfiles.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="linux-headers.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-pages.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="adjusting.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zlib.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gmp.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpfr.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpc.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bzip2.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgconfig.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="attr.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acl.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libcap.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="shadow.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="psmisc.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iana-etc.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="flex.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="readline.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bc.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libtool.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gdbm.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gperf.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expat.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inetutils.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="perl.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xml-parser.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="intltool.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="autoconf.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="automake.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kmod.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="procps.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="e2fsprogs.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="groff.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grub.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="less.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iproute2.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kbd.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libpipeline.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="make.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patch.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dbus.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-db.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tar.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="vim.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="aboutdebug.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="strippingagain.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="revisedchroot.xml"/>
+
+</chapter>
diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml
index d40e4f716..18cfe5063 100644
--- a/chapter06/coreutils.xml
+++ b/chapter06/coreutils.xml
@@ -137,12 +137,16 @@ mv -v /usr/bin/chroot /usr/sbin
mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8
sed -i s/\"1\"/\"8\"/1 /usr/share/man/man8/chroot.8</userinput></screen>
- <para>Some of the scripts in the LFS-Bootscripts package depend on
- <command>head</command>, <command>sleep</command>, and
+ <para revision="sysv">Some of the scripts in the LFS-Bootscripts package
+ depend on <command>head</command>, <command>sleep</command>, and
<command>nice</command>. As <filename class="directory">/usr</filename>
may not be available during the early stages of booting, those binaries
need to be on the root partition:</para>
+ <para revision="systemd">Some packages in BLFS and beyond expect the
+ following programs in <filename class="directory">/bin</filename>, so make
+ sure they are placed there:</para>
+
<screen><userinput remap="install">mv -v /usr/bin/{head,sleep,nice,test,[} /bin</userinput></screen>
</sect2>
diff --git a/chapter06/createfiles.xml b/chapter06/createfiles.xml
index 842336ab2..4c88468c3 100644
--- a/chapter06/createfiles.xml
+++ b/chapter06/createfiles.xml
@@ -146,7 +146,7 @@ ln -sv bash /bin/sh</userinput></screen>
<para>Create the <filename>/etc/passwd</filename> file by running the following
command:</para>
-<screen><userinput>cat &gt; /etc/passwd &lt;&lt; "EOF"
+<screen revision="sysv"><userinput>cat &gt; /etc/passwd &lt;&lt; "EOF"
<literal>root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/dev/null:/bin/false
daemon:x:6:6:Daemon User:/dev/null:/bin/false
@@ -154,13 +154,55 @@ messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal>
EOF</userinput></screen>
+<screen revision="systmed"><userinput>cat &gt; /etc/passwd &lt;&lt; "EOF"
+<literal>root:x:0:0:root:/root:/bin/bash
+bin:x:1:1:bin:/dev/null:/bin/false
+daemon:x:6:6:Daemon User:/dev/null:/bin/false
+messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false
+systemd-bus-proxy:x:72:72:systemd Bus Proxy:/:/bin/false
+systemd-journal-gateway:x:73:73:systemd Journal Gateway:/:/bin/false
+systemd-journal-remote:x:74:74:systemd Journal Remote:/:/bin/false
+systemd-journal-upload:x:75:75:systemd Journal Upload:/:/bin/false
+systemd-network:x:76:76:systemd Network Management:/:/bin/false
+systemd-resolve:x:77:77:systemd Resolver:/:/bin/false
+systemd-timesync:x:78:78:systemd Time Synchronization:/:/bin/false
+systemd-coredump:x:79:79:systemd Core Dumper:/:/bin/false
+nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal>
+EOF</userinput></screen>
+
<para>The actual password for <systemitem class="username">root</systemitem>
(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"
+<screen revision="sysv"><userinput>cat &gt; /etc/group &lt;&lt; "EOF"
+<literal>root:x:0:
+bin:x:1:daemon
+sys:x:2:
+kmem:x:3:
+tape:x:4:
+tty:x:5:
+daemon:x:6:
+floppy:x:7:
+disk:x:8:
+lp:x:9:
+dialout:x:10:
+audio:x:11:
+video:x:12:
+utmp:x:13:
+usb:x:14:
+cdrom:x:15:
+adm:x:16:
+messagebus:x:18:
+systemd-journal:x:23:
+input:x:24:
+mail:x:34:
+nogroup:x:99:
+users:x:999:</literal>
+EOF</userinput></screen>
+
+<screen revision="systemd"><userinput>cat &gt; /etc/group &lt;&lt; "EOF"
<literal>root:x:0:
bin:x:1:daemon
sys:x:2:
@@ -182,6 +224,14 @@ messagebus:x:18:
systemd-journal:x:23:
input:x:24:
mail:x:34:
+systemd-bus-proxy:x:72:
+systemd-journal-gateway:x:73:
+systemd-journal-remote:x:74:
+systemd-journal-upload:x:75:
+systemd-network:x:76:
+systemd-resolve:x:77:
+systemd-timesync:x:78:
+systemd-coredump:x:79:
nogroup:x:99:
users:x:999:</literal>
EOF</userinput></screen>
diff --git a/chapter06/dbus.xml b/chapter06/dbus.xml
index 46f0439e4..ee5390137 100644
--- a/chapter06/dbus.xml
+++ b/chapter06/dbus.xml
@@ -48,11 +48,14 @@
<para>Prepare D-Bus for compilation:</para>
-<screen><userinput remap="configure">./configure --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --docdir=/usr/share/doc/dbus-&dbus-version; \
- --with-console-auth-dir=/run/console</userinput></screen>
+<screen><userinput remap="configure"> ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-static \
+ --disable-doxygen-docs \
+ --disable-xml-docs \
+ --docdir=/usr/share/doc/dbus-&dbus-version; \
+ --with-console-auth-dir=/run/console</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>
@@ -74,7 +77,7 @@
<para>This package does come with a test suite, but it requires several
packages that are not included in LFS. Instructions for running the
test suite can be found in the BLFS book at
- <ulink url="&blfs-root;/view/&short-version;/general/dbus.html"/>.</para>
+ <ulink url="&blfs-book;general/dbus.html"/>.</para>
<para>Install the package:</para>
@@ -88,15 +91,10 @@
<screen><userinput remap="install">mv -v /usr/lib/libdbus-1.so.* /lib
ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</userinput></screen>
- <para>Create a symlink, so that D-Bus and Systemd can use the same
+ <para>Create a symlink, so that D-Bus and systemd can use the same
<filename>machine-id</filename> file:</para>
-<screen><userinput remap="install">ln -sv /etc/machine-id /var/lib/dbus</userinput></screen>
-
- <para>Finally, generate a D-Bus UUID to avoid possible warnings
- when building some packages in BLFS:</para>
-
-<screen><userinput remap="install">dbus-uuidgen --ensure</userinput></screen>
+<screen><userinput remap="install">ln -sfv /etc/machine-id /var/lib/dbus</userinput></screen>
</sect2>
@@ -110,11 +108,11 @@ ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</useri
<seglistitem>
<seg>dbus-cleanup-sockets, dbus-daemon, dbus-launch, dbus-monitor,
- dbus-send, and dbus-uuidgen</seg>
+ dbus-run-session, dbus-send, and dbus-uuidgen</seg>
<seg>libdbus-1.{a,so}</seg>
<seg>/etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0,
/usr/share/dbus-1, /usr/share/doc/dbus-&dbus-version;,
- /var/lib/dbus</seg>
+ and /var/lib/dbus</seg>
</seglistitem>
</segmentedlist>
@@ -126,7 +124,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</useri
<varlistentry id="dbus-cleanup-sockets">
<term><command>dbus-cleanup-sockets</command></term>
<listitem>
- <para>Used to clean up leftover sockets in a directory.</para>
+ <para>Used to clean up leftover sockets in a directory</para>
<indexterm zone="ch-system-dbus dbus-cleanup-sockets">
<primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary>
</indexterm>
@@ -136,7 +134,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</useri
<varlistentry id="dbus-daemon">
<term><command>dbus-daemon</command></term>
<listitem>
- <para>The D-Bus message bus daemon.</para>
+ <para>The D-Bus message bus daemon</para>
<indexterm zone="ch-system-dbus dbus-daemon">
<primary sortas="b-dbus-daemon">dbus-daemon</primary>
</indexterm>
@@ -147,7 +145,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</useri
<term><command>dbus-launch</command></term>
<listitem>
<para>Starts <command>dbus-daemon</command> from a shell
- script.</para>
+ script</para>
<indexterm zone="ch-system-dbus dbus-launch">
<primary sortas="b-dbus-launch">dbus-launch</primary>
</indexterm>
@@ -157,17 +155,29 @@ ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</useri
<varlistentry id="dbus-monitor">
<term><command>dbus-monitor</command></term>
<listitem>
- <para>Monitors messages passing through a D-Bus message bus.</para>
+ <para>Monitors messages passing through a D-Bus message bus</para>
<indexterm zone="ch-system-dbus dbus-monitor">
<primary sortas="b-dbus-monitor">dbus-monitor</primary>
</indexterm>
</listitem>
</varlistentry>
+ <varlistentry id="dbus-run-session">
+ <term><command>dbus-run-session</command></term>
+ <listitem>
+ <para>Starts a session bus instance of <command>dbus-daemon</command>
+ from a shell script and starts a specified program in that
+ session</para>
+ <indexterm zone="ch-system-dbus dbus-run-session">
+ <primary sortas="b-dbus-run-session">dbus-run-session</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="dbus-send">
<term><command>dbus-send</command></term>
<listitem>
- <para>Sends a message to a D-Bus message bus.</para>
+ <para>Sends a message to a D-Bus message bus</para>
<indexterm zone="ch-system-dbus dbus-send">
<primary sortas="b-dbus-send">dbus-send</primary>
</indexterm>
@@ -177,13 +187,24 @@ ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</useri
<varlistentry id="dbus-uuidgen">
<term><command>dbus-uuidgen</command></term>
<listitem>
- <para>Generates a universally unique ID.</para>
+ <para>Generates a universally unique ID</para>
<indexterm zone="ch-system-dbus dbus-uuidgen">
<primary sortas="b-dbus-uuidgen">dbus-uuidgen</primary>
</indexterm>
</listitem>
</varlistentry>
+ <varlistentry id="libdbus-1">
+ <term><filename class="libraryfile">libdbus-1</filename></term>
+ <listitem>
+ <para>Contains API functions used to communicate with the D-Bus
+ message bus</para>
+ <indexterm zone="ch-system-dbus libdbus-1">
+ <primary sortas="c-libdbus-1">libdbus-1</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</sect2>
diff --git a/chapter06/diffutils.xml b/chapter06/diffutils.xml
index 782f2eb03..89bd81be7 100644
--- a/chapter06/diffutils.xml
+++ b/chapter06/diffutils.xml
@@ -57,7 +57,7 @@
<screen><userinput remap="test">make check</userinput></screen>
- <para>The test-update-copyright.sh failure can be ignored.</para>
+ <para>The test-update-copyright.sh failure can be safely ignored.</para>
<para>Install the package:</para>
diff --git a/chapter06/e2fsprogs.xml b/chapter06/e2fsprogs.xml
index 5927b3eb0..e7f7cf39b 100644
--- a/chapter06/e2fsprogs.xml
+++ b/chapter06/e2fsprogs.xml
@@ -521,18 +521,7 @@ install-info --dir-file=/usr/share/info/dir /usr/share/info/com_err.info</userin
</indexterm>
</listitem>
</varlistentry>
-<!--
- <varlistentry id="libquota">
- <term><filename class="libraryfile">libquota</filename></term>
- <listitem>
- <para>Provides an interface for creating and updating quota files
- and ext4 superblock fields</para>
- <indexterm zone="ch-system-e2fsprogs libquota">
- <primary sortas="c-libquota">libquota</primary>
- </indexterm>
- </listitem>
- </varlistentry>
--->
+
<varlistentry id="libss">
<term><filename class="libraryfile">libss</filename></term>
<listitem>
diff --git a/chapter06/findutils.xml b/chapter06/findutils.xml
index 8c6d77a2b..8eb46d515 100644
--- a/chapter06/findutils.xml
+++ b/chapter06/findutils.xml
@@ -73,11 +73,16 @@
<screen><userinput remap="install">make install</userinput></screen>
- <para>Some of the scripts in the LFS-Bootscripts package depend on
- <command>find</command>. As <filename class="directory">/usr</filename>
- may not be available during the early stages of booting, this program
- needs to be on the root partition. The <command>updatedb</command>
- script also needs to be modified to correct an explicit path:</para>
+ <para revision="sysv">Some of the scripts in the LFS-Bootscripts package
+ depend on <command>find</command>. As <filename
+ class="directory">/usr</filename> may not be available during the early
+ stages of booting, this program needs to be on the root partition. The
+ <command>updatedb</command> script also needs to be modified to correct an
+ explicit path:</para>
+
+ <para revision="systemd"> Some packages in BLFS and beyond expect the
+ <command>find</command> program in <filename
+ class="directory">/bin</filename>, so make sure it's placed there:</para>
<screen><userinput remap="install">mv -v /usr/bin/find /bin
sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</userinput></screen>
diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml
index e577e229a..02abb3dad 100644
--- a/chapter06/glibc.xml
+++ b/chapter06/glibc.xml
@@ -153,6 +153,12 @@ cd build</userinput></screen>
<screen><userinput remap="install">cp -v ../nscd/nscd.conf /etc/nscd.conf
mkdir -pv /var/cache/nscd</userinput></screen>
+ <para revision="systemd">Install the systemd support files for
+ <command>nscd</command>:</para>
+
+ <screen revision="systemd"><userinput remap="install">install -v -Dm644 ../nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf
+install -v -Dm644 ../nscd/nscd.service /lib/systemd/system/nscd.service</userinput></screen>
+
<para>Next, install the locales that can make the system respond in a
different language. None of the locales are required, but if some of them
are missing, the test suites of future packages would skip important
@@ -326,7 +332,9 @@ unset ZONEINFO</userinput></screen>
<para>Then create the <filename>/etc/localtime</filename> file by
running:</para>
-<screen><userinput>cp -v /usr/share/zoneinfo/<replaceable>&lt;xxx&gt;</replaceable> /etc/localtime</userinput></screen>
+<screen revision="sysv"><userinput>cp -v /usr/share/zoneinfo/<replaceable>&lt;xxx&gt;</replaceable> /etc/localtime</userinput></screen>
+
+<screen revision="systemd"><userinput>ln -sfv /usr/share/zoneinfo/<replaceable>&lt;xxx&gt;</replaceable> /etc/localtime</userinput></screen>
<para>Replace <replaceable>&lt;xxx&gt;</replaceable> with the name of the
time zone selected (e.g., Canada/Eastern).</para>
@@ -562,17 +570,7 @@ mkdir -pv /etc/ld.so.conf.d</userinput></screen>
</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="pldd">
<term><command>pldd</command></term>
<listitem>
@@ -582,18 +580,7 @@ mkdir -pv /etc/ld.so.conf.d</userinput></screen>
</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>
@@ -837,18 +824,7 @@ mkdir -pv /etc/ld.so.conf.d</userinput></screen>
</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>
diff --git a/chapter06/gmp.xml b/chapter06/gmp.xml
index da655db6a..2950b6715 100644
--- a/chapter06/gmp.xml
+++ b/chapter06/gmp.xml
@@ -92,7 +92,7 @@ make html</userinput></screen>
<screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
<caution><para>The code in gmp is highly optimized for the processor where
- it is built. Occasionally the code that detects the processor misidentifies
+ it is built. Occasionally, the code that detects the processor misidentifies
the system capabilities and there will be errors in the tests or other
applications using the gmp libraries with the message "Illegal
instruction". In this case, gmp should be reconfigured with the option
diff --git a/chapter06/m4.xml b/chapter06/m4.xml
index 29c6e8c49..804173a8f 100644
--- a/chapter06/m4.xml
+++ b/chapter06/m4.xml
@@ -52,7 +52,7 @@
<screen><userinput remap="test">make check</userinput></screen>
- <para>The test-update-copyright.sh failure can be ignored.</para>
+ <para>The test-update-copyright.sh failure can safely be ignored.</para>
<para>Install the package:</para>
diff --git a/chapter06/man-db.xml b/chapter06/man-db.xml
index 364074867..4e81cc998 100644
--- a/chapter06/man-db.xml
+++ b/chapter06/man-db.xml
@@ -91,6 +91,10 @@
<screen><userinput remap="install">make install</userinput></screen>
+ <para>Remove a reference to a non-existent user:</para>
+
+<screen><userinput remap="install">sed -i "s:man root:root root:g" /usr/lib/tmpfiles.d/man-db.conf</userinput></screen>
+
</sect2>
<sect2>
diff --git a/chapter06/mpfr.xml b/chapter06/mpfr.xml
index b43c3d9aa..ff8e323b7 100644
--- a/chapter06/mpfr.xml
+++ b/chapter06/mpfr.xml
@@ -40,12 +40,7 @@
<sect2 role="installation">
<title>Installation of MPFR</title>
-<!--
- <para>First, apply the following patch to fix various bugs that have been
- addressed upstream:</para>
-<screen><userinput remap="pre">patch -Np1 -i ../&mpfr-upstream-patch;</userinput></screen>
--->
<para>Prepare MPFR for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
diff --git a/chapter06/ncurses.xml b/chapter06/ncurses.xml
index a78d573b2..b37f1f69c 100644
--- a/chapter06/ncurses.xml
+++ b/chapter06/ncurses.xml
@@ -142,9 +142,9 @@ cp -v -R doc/* /usr/share/doc/ncurses-&ncurses-version;</userinput></screen>
<para>The instructions above don't create non-wide-character Ncurses
libraries since no package installed by compiling from sources would link
- against them at runtime. Currently, the only known binary-only
- applications that link against non-wide-character Ncurses require version
- 5. If you must have such libraries because of some binary-only
+ against them at runtime. However, the only known binary-only
+ applications that link against non-wide-character Ncurses libraries
+ require version 5. If you must have such libraries because of some binary-only
application or to be compliant with LSB, build the package again with the
following commands:</para>
diff --git a/chapter06/pkgmgt.xml b/chapter06/pkgmgt.xml
index a451f2162..d004e1e7c 100644
--- a/chapter06/pkgmgt.xml
+++ b/chapter06/pkgmgt.xml
@@ -260,21 +260,27 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen>
<filename>/etc/fstab</filename>,
<filename>/etc/passwd</filename>,
<filename>/etc/group</filename>,
- <filename>/etc/shadow</filename>,
- <filename>/etc/ld.so.conf</filename>,
- <filename>/etc/sysconfig/rc.site</filename>,
- <filename>/etc/sysconfig/network</filename>, and
- <filename>/etc/sysconfig/ifconfig.eth0</filename>.
+ <phrase revision="systemd">
+ <filename>/etc/shadow</filename>, and
+ <filename>/etc/ld.so.conf</filename>.
+ </phrase>
+ <phrase revision="sysv">
+ <filename>/etc/shadow</filename>,
+ <filename>/etc/ld.so.conf</filename>,
+ <filename>/etc/sysconfig/rc.site</filename>,
+ <filename>/etc/sysconfig/network</filename>, and
+ <filename>/etc/sysconfig/ifconfig.eth0</filename>.
+ </phrase>
</para>
<para>A custom kernel may need to be built for the new system depending on
differences in system hardware and the original kernel
configuration.</para>
- <note><para>There have been some reports of issues when copying between
- similar but not identical architectures. For instance the instruction set
- for Intel architectures is not identical with AMD processors and later
- versions of some processors may have instructions not available in
+ <note><para>There have been some reports of issues when copying between
+ similar but not identical architectures. For instance, the instruction set
+ for an Intel system is not identical with an AMD processor and later
+ versions of some processors may have instructions that are unavailable in
earlier versions.</para></note>
<para>Finally the new system has to be made bootable via <xref
diff --git a/chapter06/procps.xml b/chapter06/procps.xml
index 71c0e0b04..e4b1909fc 100644
--- a/chapter06/procps.xml
+++ b/chapter06/procps.xml
@@ -42,13 +42,21 @@
<para>Now prepare procps-ng for compilation:</para>
-<screen><userinput remap="configure">./configure --prefix=/usr \
+<screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr \
--exec-prefix= \
--libdir=/usr/lib \
--docdir=/usr/share/doc/procps-ng-&procps-ng-version; \
--disable-static \
--disable-kill</userinput></screen>
+<screen revision="systemd"><userinput remap="configure">./configure --prefix=/usr \
+ --exec-prefix= \
+ --libdir=/usr/lib \
+ --docdir=/usr/share/doc/procps-ng-&procps-ng-version; \
+ --disable-static \
+ --disable-kill \
+ --with-systemd</userinput></screen>
+
<variablelist>
<title>The meaning of the configure options:</title>
diff --git a/chapter06/readline.xml b/chapter06/readline.xml
index 8ec5cddf1..3b162d5ea 100644
--- a/chapter06/readline.xml
+++ b/chapter06/readline.xml
@@ -106,7 +106,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libhistory.so ) /usr/lib/libhistory.so</us
<seglistitem>
<seg>libhistory.so and libreadline.so</seg>
- <seg>/usr/include/readline and
+ <seg>/usr/include/readline, /usr/share/readline, and
/usr/share/doc/readline-&readline-version;</seg>
</seglistitem>
</segmentedlist>
diff --git a/chapter06/systemd.xml b/chapter06/systemd.xml
index 107500f8f..bbfac9c61 100644
--- a/chapter06/systemd.xml
+++ b/chapter06/systemd.xml
@@ -17,13 +17,13 @@
<title>Systemd-&systemd-version;</title>
<indexterm zone="ch-system-systemd">
- <primary sortas="a-Systemd">Systemd</primary>
+ <primary sortas="a-systemd">systemd</primary>
</indexterm>
<sect2 role="package">
<title/>
- <para>The Systemd package contains programs for controlling the startup,
+ <para>The systemd package contains programs for controlling the startup,
running, and shutdown of the system.</para>
<segmentedlist>
@@ -38,51 +38,67 @@
</sect2>
<sect2 role="installation">
- <title>Installation of Systemd</title>
+ <title>Installation of systemd</title>
- <note><para>If systemd is not desired at all, it can be skipped. However a
- udev replacement must be installed. See the hint at <ulink
- url="http://www.linuxfromscratch.org/hints/downloads/files/eudev-alt-hint.txt"/>
- to find procedures to install
- <application>eudev</application>.</para></note>
+ <para>First, fix a build error when using Util-Linux built in
+ Chapter 5:</para>
+
+<screen><userinput remap="pre">sed -i "s:blkid/::" $(grep -rl "blkid/blkid.h")</userinput></screen>
+
+ <para>Apply the following patch so that compat
+ <command>pkg-config</command> files get installed without installing compat
+ libs which are useless on LFS:</para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../&systemd-compat-patch;</userinput></screen>
+
+ <para>Disable two tests that always fail:</para>
+
+<screen><userinput remap="pre">sed -e 's@test/udev-test.pl @@' \
+ -e 's@test-copy$(EXEEXT) @@' \
+ -i Makefile.in</userinput></screen>
+
+ <para>Rebuild generated files after modifying Makefile.am and
+ Makefile.in:</para>
- <para>First, create a file to allow Systemd to build when using Util-Linux
- built in Chapter 5:</para>
+<screen><userinput remap="pre">autoreconf -fi</userinput></screen>
+
+ <para>Create a file to allow systemd to build when using Util-Linux
+ built in Chapter 5, to disable LTO by default, and to build without
+ xlstproc:</para>
<screen><userinput remap="pre">cat &gt; config.cache &lt;&lt; "EOF"
<literal>KILL=/bin/kill
+MOUNT_PATH=/bin/mount
+UMOUNT_PATH=/bin/umount
HAVE_BLKID=1
BLKID_LIBS="-lblkid"
BLKID_CFLAGS="-I/tools/include/blkid"
-cc_cv_CFLAGS__flto=no</literal>
+HAVE_LIBMOUNT=1
+MOUNT_LIBS="-lmount"
+MOUNT_CFLAGS="-I/tools/include/libmount"
+cc_cv_CFLAGS__flto=no
+XSLTPROC="/usr/bin/xsltproc"</literal>
EOF</userinput></screen>
- <para>Additionally, fix a build error when using Util-Linux built in
- Chapter 5:</para>
-
-<screen><userinput remap="pre">sed -i "s:blkid/::" $(grep -rl "blkid/blkid.h")</userinput></screen>
-
- <para>Apply a patch so that compat <command>pkg-config</command> files get
- installed without installing compat libs which are useless on LFS:</para>
-
-<screen><userinput remap="pre">patch -Np1 -i ../&systemd-compat-patch;</userinput></screen>
-
- <para>Prepare Systemd for compilation:</para>
-
-<screen><userinput remap="configure">./configure --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --config-cache \
- --with-rootprefix= \
- --with-rootlibdir=/lib \
- --enable-split-usr \
- --disable-gudev \
- --without-python \
- --docdir=/usr/share/doc/systemd-&systemd-version; \
- --with-dbuspolicydir=/etc/dbus-1/system.d \
- --with-dbusinterfacedir=/usr/share/dbus-1/interfaces \
- --with-dbussessionservicedir=/usr/share/dbus-1/services \
- --with-dbussystemservicedir=/usr/share/dbus-1/system-services</userinput></screen>
+ <para>LTO is disabled by default because it causes
+ <command>systemd</command> and other auxiliary programs to link to
+ <filename class="libraryfile">libgcc_s.so</filename>, slows the build down
+ and makes the compiled code larger.</para>
+
+ <para>Prepare systemd for compilation:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --config-cache \
+ --with-rootprefix= \
+ --with-rootlibdir=/lib \
+ --enable-split-usr \
+ --disable-firstboot \
+ --disable-ldconfig \
+ --disable-sysusers \
+ --without-python \
+ --docdir=/usr/share/doc/systemd-&systemd-version;</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>
@@ -108,25 +124,50 @@ EOF</userinput></screen>
<varlistentry>
<term><parameter>--enable-split-usr</parameter></term>
<listitem>
- <para>This switch ensures that Systemd will work on
+ <para>This switch ensures that systemd will work on
systems where /bin, /lib and /sbin directories are not
symlinks to their /usr counterparts.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>--disable-gudev --without-python</parameter></term>
+ <term><parameter>--without-python</parameter></term>
<listitem>
- <para>These switches disable optional features because
- LFS does not provide their dependencies.</para>
+ <para>This switch prevents <command>configure</command>
+ from trying to use Python which isn't built
+ in LFS.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>--with-dbus*</parameter></term>
+ <term><parameter>--disable-firstboot</parameter></term>
<listitem>
- <para>These switches ensure that D-Bus configuratil files
- get installed in the correct locations.</para>
+ <para>This switch prevents installation of systemd
+ services responsible for setting up the system for
+ the first time. They are not useful for LFS because
+ everything is done manually.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter>--disable-ldconfig</parameter></term>
+ <listitem>
+ <para>This switch prevents installation of a systemd
+ unit that runs <command>ldconfig</command> at
+ boot, making the boot time longer. Remove it if the
+ described feature is desired, even though it's not
+ useful for source distributions such as LFS.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter>--disable-sysusers</parameter></term>
+ <listitem>
+ <para>This switch prevents installation of systemd
+ services responsible for setting up the
+ <filename>/etc/group</filename> and
+ <filename>/etc/passwd</filename> files. Both files
+ were created early in this chapter.</para>
</listitem>
</varlistentry>
@@ -136,64 +177,52 @@ EOF</userinput></screen>
<screen><userinput remap="make">make LIBRARY_PATH=/tools/lib</userinput></screen>
- <para>First prevent few broken test cases from running:</para>
-
-<screen><userinput remap="test">sed -e "s:test/udev-test.pl::g" \
- -e "s:test-bus-cleanup\$(EXEEXT) ::g" \
- -e "s:test-bus-gvariant\$(EXEEXT) ::g" \
- -i Makefile</userinput></screen>
-
- <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make -k check</userinput></screen>
-
- <para>Note that some tests might fail because the test are being run in a
- chroot environment. For full test coverage, the test suite should be run
- from a system booted using Systemd.</para>
+ <para>This package has a test suite, but it can only be run after the
+ package has been installed.</para>
<para>Install the package:</para>
<screen><userinput remap="install">make LD_LIBRARY_PATH=/tools/lib install</userinput></screen>
- <para>Move NSS myhostname library to <filename
- class="directory">/lib</filename>:</para>
+ <para>Move NSS libraries to <filename class="directory">/lib</filename>:</para>
-<screen><userinput remap="install">mv -v /usr/lib/libnss_myhostname.so.2 /lib</userinput></screen>
+<screen><userinput remap="install">mv -v /usr/lib/libnss_{myhostname,mymachines,resolve}.so.2 /lib</userinput></screen>
<para>Remove an unnecessary directory:</para>
<screen><userinput remap="install">rm -rfv /usr/lib/rpm</userinput></screen>
- <para>Create the Sysvinit compatibility symlinks, and move some man pages
- and a library that conflict with <xref linkend="ch-system-sysvinit"/> so
- both systems can be installed side-by-side:</para>
+ <para>Create the Sysvinit compatibility symlinks, so systemd is used
+ as the default init system:</para>
<screen><userinput remap="install">for tool in runlevel reboot shutdown poweroff halt telinit; do
- ln -sfv ../bin/systemctl /sbin/${tool}-systemd
- mv -v /usr/share/man/man8/${tool}.8 /usr/share/man/man8/${tool}-systemd.8
+ ln -sfv ../bin/systemctl /sbin/${tool}
done
+ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
-ln -sfv ../lib/systemd/systemd /sbin/init-systemd
-mv -v /etc/init.d /etc/init.d-systemd</userinput></screen>
-
+<!--
<para>Remove a reference to a non-existent group:</para>
<screen><userinput remap="install">sed -i "s:0775 root lock:0755 root root:g" /usr/lib/tmpfiles.d/legacy.conf</userinput></screen>
+-->
<para>Create the <filename>/etc/machine-id</filename> file needed by
- Journald:</para>
+ <command>systemd-journald</command>:</para>
<screen><userinput remap="install">systemd-machine-id-setup</userinput></screen>
- <para>Finally install some LFS specific udev rules:</para>
+ <para>Since the testsuite largely depends on the host system kernel
+ configuration, some tests may fail. It also needs a modification in
+ order not to look for a program that will be installed by Util-Linux
+ package later in this chapter. To test the results, issue:</para>
-<screen><userinput remap="install">tar -xf ../&udev-lfs-version;.tar.bz2
-make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
+<screen><userinput remap="test">sed -i "s:minix:ext4:g" src/test/test-path-util.c
+make LD_LIBRARY_PATH=/tools/lib -k check</userinput></screen>
</sect2>
<sect2 id="contents-systemd" role="content">
- <title>Contents of Systemd</title>
+ <title>Contents of systemd</title>
<segmentedlist>
<segtitle>Installed programs</segtitle>
@@ -201,22 +230,24 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<segtitle>Installed directories</segtitle>
<seglistitem>
- <seg>bootctl, busctl, halt, hostnamectl, init, journalctl, kernel-install,
- localectl, loginctl, machinectl, poweroff, reboot, runlevel, shutdown,
- systemctl, systemd-analyze, systemd-ask-password, systemd-cat, systemd-cgls,
- systemd-cgtop, systemd-coredumpctl, systemd-delta, systemd-detect-virt,
- systemd-inhibit, systemd-machine-id-setup, systemd-notify, systemd-nspawn,
- systemd-run, systemd-stdio-bridge, systemd-tmpfiles, systemd-tty-ask-password-agent,
+ <seg>bootctl, busctl, coredumpctl, halt, hostnamectl, init, journalctl,
+ kernel-install, localectl, loginctl, machinectl, networkctl, poweroff,
+ reboot, runlevel, shutdown, systemctl, systemd-analyze,
+ systemd-ask-password, systemd-cat, systemd-cgls, systemd-cgtop,
+ systemd-delta, systemd-detect-virt, systemd-escape, systemd-hwdb,
+ systemd-inhibit, systemd-machine-id-setup, systemd-notify,
+ systemd-nspawn, systemd-path, systemd-resolve, systemd-run,
+ systemd-stdio-bridge, systemd-tmpfiles, systemd-tty-ask-password-agent,
telinit, timedatectl, and udevadm</seg>
-
- <seg>libnss_myhostname.so.2, libsystemd.so, libudev.so</seg>
+ <seg>libnss_myhostname.so.2, libnss_mymachines.so.2,
+ libnss_resolve.so.2, libsystemd.so, and libudev.so</seg>
<seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
/etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
/etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
/usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d,
/usr/lib/sysctl.d, /usr/lib/systemd, /usr/lib/tmpfiles.d,
- /usr/share/doc/systemd-&systemd-version;, /usr/share/systemd,
- /var/lib/systemd, /var/log/journal</seg>
+ /usr/share/doc/systemd-&systemd-version;, /usr/share/factory,
+ /usr/share/systemd, /var/lib/systemd, and /var/log/journal</seg>
</seglistitem>
</segmentedlist>
@@ -228,7 +259,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="bootctl">
<term><command>bootctl</command></term>
<listitem>
- <para>used to query the firmware and boot manager settings.</para>
+ <para>used to query the firmware and boot manager settings</para>
<indexterm zone="ch-system-systemd bootctl">
<primary sortas="b-bootctl">bootctl</primary>
</indexterm>
@@ -238,13 +269,23 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="busctl">
<term><command>busctl</command></term>
<listitem>
- <para>used to introspect and monitor the D-Bus bus.</para>
+ <para>Used to introspect and monitor the D-Bus bus</para>
<indexterm zone="ch-system-systemd busctl">
<primary sortas="b-busctl">busctl</primary>
</indexterm>
</listitem>
</varlistentry>
+ <varlistentry id="coredumpctl">
+ <term><command>coredumpctl</command></term>
+ <listitem>
+ <para>Used to retrieve coredumps from the systemd Journal</para>
+ <indexterm zone="ch-system-systemd coredumpctl">
+ <primary sortas="b-coredumpctl">coredumpctl</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="halt">
<term><command>halt</command></term>
<listitem>
@@ -252,7 +293,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<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>
+ brought down</para>
<indexterm zone="ch-system-systemd halt">
<primary sortas="b-halt">halt</primary>
</indexterm>
@@ -262,8 +303,8 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="hostnamectl">
<term><command>hostnamectl</command></term>
<listitem>
- <para>used to query and change the system hostname and related
- settings.</para>
+ <para>Used to query and change the system hostname and related
+ settings</para>
<indexterm zone="ch-system-systemd hostnamectl">
<primary sortas="b-hostnamectl">hostnamectl</primary>
</indexterm>
@@ -275,7 +316,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<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>
+ proceses it is instructed to</para>
<indexterm zone="ch-system-systemd init">
<primary sortas="b-init">init</primary>
</indexterm>
@@ -285,7 +326,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="journalctl">
<term><command>journalctl</command></term>
<listitem>
- <para>used to query the contents of the Systemd Journal.</para>
+ <para>Used to query the contents of the systemd Journal</para>
<indexterm zone="ch-system-systemd journalctl">
<primary sortas="b-journalctl">journalctl</primary>
</indexterm>
@@ -295,8 +336,8 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="kernel-install">
<term><command>kernel-install</command></term>
<listitem>
- <para>used to add and remove kernel and initramfs images to and
- from /boot.</para>
+ <para>Used to add and remove kernel and initramfs images to and
+ from /boot</para>
<indexterm zone="ch-system-systemd kernel-install">
<primary sortas="b-kernel-install">kernel-install</primary>
</indexterm>
@@ -306,8 +347,8 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="localectl">
<term><command>localectl</command></term>
<listitem>
- <para>used to query and change the system locale and keyboard layout
- settings.</para>
+ <para>Used to query and change the system locale and keyboard layout
+ settings</para>
<indexterm zone="ch-system-systemd localectl">
<primary sortas="b-localectl">localectl</primary>
</indexterm>
@@ -317,8 +358,8 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="loginctl">
<term><command>loginctl</command></term>
<listitem>
- <para>used to introspect and control the state of the Systemd Login
- Manager.</para>
+ <para>Used to introspect and control the state of the systemd Login
+ Manager</para>
<indexterm zone="ch-system-systemd loginctl">
<primary sortas="b-loginctl">loginctl</primary>
</indexterm>
@@ -328,7 +369,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="machinectl">
<term><command>machinectl</command></term>
<listitem>
- <para>used to introspect and control the state of the Systemd Virtual
+ <para>Used to introspect and control the state of the systemd Virtual
Machine and Container Registration Manager</para>
<indexterm zone="ch-system-systemd machinectl">
<primary sortas="b-machinectl">machinectl</primary>
@@ -336,11 +377,22 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
</listitem>
</varlistentry>
+ <varlistentry id="networkctl">
+ <term><command>networkctl</command></term>
+ <listitem>
+ <para>Used to introspect the state of the network links as seen by
+ systemd-networkd</para>
+ <indexterm zone="ch-system-systemd networkctl">
+ <primary sortas="b-networkctl">networkctl</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>
+ (see <command>halt</command>)</para>
<indexterm zone="ch-system-systemd poweroff">
<primary sortas="b-poweroff">poweroff</primary>
</indexterm>
@@ -351,7 +403,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<term><command>reboot</command></term>
<listitem>
<para>Tells the kernel to reboot the system (see
- <command>halt</command>).</para>
+ <command>halt</command>)</para>
<indexterm zone="ch-system-systemd reboot">
<primary sortas="b-reboot">reboot</primary>
</indexterm>
@@ -362,7 +414,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<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>
+ last run-level record in <filename>/var/run/utmp</filename></para>
<indexterm zone="ch-system-systemd runlevel">
<primary sortas="b-runlevel">runlevel</primary>
</indexterm>
@@ -373,7 +425,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<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>
+ and notifying all logged-in users</para>
<indexterm zone="ch-system-systemd shutdown">
<primary sortas="b-shutdown">shutdown</primary>
</indexterm>
@@ -383,8 +435,8 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="systemctl">
<term><command>systemctl</command></term>
<listitem>
- <para>used to introspect and control the state of the Systemd system and
- service manager.</para>
+ <para>Used to introspect and control the state of the systemd system
+ and service manager</para>
<indexterm zone="ch-system-systemd systemctl">
<primary sortas="b-systemctl">systemctl</primary>
</indexterm>
@@ -394,8 +446,8 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="systemd-analyze">
<term><command>systemd-analyze</command></term>
<listitem>
- <para>used to determine system boot-up performance of the current boot.
- </para>
+ <para>Used to determine system boot-up performance of the current
+ boot</para>
<indexterm zone="ch-system-systemd systemd-analyze">
<primary sortas="b-systemd-analyze">systemd-analyze</primary>
</indexterm>
@@ -405,8 +457,8 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="systemd-ask-password">
<term><command>systemd-ask-password</command></term>
<listitem>
- <para>used to query a system password or passphrase from the user, using a
- question message specified on the command line.</para>
+ <para>Used to query a system password or passphrase from the user,
+ using a question message specified on the command line</para>
<indexterm zone="ch-system-systemd systemd-ask-password">
<primary sortas="b-systemd-ask-password">systemd-ask-password</primary>
</indexterm>
@@ -416,7 +468,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="systemd-cat">
<term><command>systemd-cat</command></term>
<listitem>
- <para>used to connect STDOUT and STDERR of a process with the Journal.
+ <para>Used to connect STDOUT and STDERR of a process with the Journal
</para>
<indexterm zone="ch-system-systemd systemd-cat">
<primary sortas="b-systemd-cat">systemd-cat</primary>
@@ -427,8 +479,8 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="systemd-cgls">
<term><command>systemd-cgls</command></term>
<listitem>
- <para>recursively shows the contents of the selected Linux control group
- hierarchy in a tree.</para>
+ <para>Recursively shows the contents of the selected Linux control
+ group hierarchy in a tree</para>
<indexterm zone="ch-system-systemd systemd-cgls">
<primary sortas="b-systemd-cgls">systemd-cgls</primary>
</indexterm>
@@ -438,30 +490,20 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="systemd-cgtop">
<term><command>systemd-cgtop</command></term>
<listitem>
- <para>shows the top control groups of the local Linux control group hierarchy,
- ordered by their CPU, memory and disk I/O load.</para>
+ <para>Shows the top control groups of the local Linux control group
+ hierarchy, ordered by their CPU, memory and disk I/O load</para>
<indexterm zone="ch-system-systemd systemd-cgtop">
<primary sortas="b-systemd-cgtop">systemd-cgtop</primary>
</indexterm>
</listitem>
</varlistentry>
- <varlistentry id="systemd-coredumpctl">
- <term><command>systemd-coredumpctl</command></term>
- <listitem>
- <para>used to retrieve coredumps from the Systemd Journal</para>
- <indexterm zone="ch-system-systemd systemd-coredumpctl">
- <primary sortas="b-systemd-coredumpctl">systemd-coredumpctl</primary>
- </indexterm>
- </listitem>
- </varlistentry>
-
<varlistentry id="systemd-delta">
<term><command>systemd-delta</command></term>
<listitem>
- <para>used to identify and compare configuration files in
+ <para>Used to identify and compare configuration files in
<filename class="directory">/etc</filename> that override default
- counterparts in <filename class="directory">/usr</filename>.</para>
+ counterparts in <filename class="directory">/usr</filename></para>
<indexterm zone="ch-system-systemd systemd-delta">
<primary sortas="b-systemd-delta">systemd-delta</primary>
</indexterm>
@@ -471,18 +513,39 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="systemd-detect-virt">
<term><command>systemd-detect-virt</command></term>
<listitem>
- <para>detects execution in a virtualized environment.</para>
+ <para>Detects execution in a virtualized environment</para>
<indexterm zone="ch-system-systemd systemd-detect-virt">
<primary sortas="b-systemd-detect-virt">systemd-detect-virt</primary>
</indexterm>
</listitem>
</varlistentry>
+ <varlistentry id="systemd-escape">
+ <term><command>systemd-escape</command></term>
+ <listitem>
+ <para>Used to escape strings for inclusion in systemd unit
+ names</para>
+ <indexterm zone="ch-system-systemd systemd-escape">
+ <primary sortas="b-systemd-escape">systemd-escape</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="systemd-hwdb">
+ <term><command>systemd-hwdb</command></term>
+ <listitem>
+ <para>Used to manage hardware database (hwdb)</para>
+ <indexterm zone="ch-system-systemd systemd-hwdb">
+ <primary sortas="b-systemd-hwdb">systemd-hwdb</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="systemd-inhibit">
<term><command>systemd-inhibit</command></term>
<listitem>
- <para>used to execute a program with a shutdown, sleep or idle inhibitor lock
- taken.</para>
+ <para>Used to execute a program with a shutdown, sleep or idle
+ inhibitor lock taken</para>
<indexterm zone="ch-system-systemd systemd-inhibit">
<primary sortas="b-systemd-inhibit">systemd-inhibit</primary>
</indexterm>
@@ -492,9 +555,9 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="systemd-machine-id-setup">
<term><command>systemd-machine-id-setup</command></term>
<listitem>
- <para>used by system installer tools to initialize the machine ID stored in
- <filename>/etc/machine-id</filename> at install time with a randomly
- generated ID.</para>
+ <para>Used by system installer tools to initialize the machine ID
+ stored in <filename>/etc/machine-id</filename> at install time with a
+ randomly generated ID</para>
<indexterm zone="ch-system-systemd systemd-machine-id-setup">
<primary sortas="b-systemd-machine-id-setup">systemd-machine-id-setup</primary>
</indexterm>
@@ -504,8 +567,8 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="systemd-notify">
<term><command>systemd-notify</command></term>
<listitem>
- <para>used by daemon scripts to notify the init system about status changes.
- </para>
+ <para>Used by daemon scripts to notify the init system about status
+ changes</para>
<indexterm zone="ch-system-systemd systemd-notify">
<primary sortas="b-systemd-notify">systemd-notify</primary>
</indexterm>
@@ -515,25 +578,47 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="systemd-nspawn">
<term><command>systemd-nspawn</command></term>
<listitem>
- <para>used to run a command or OS in a light-weight namespace container.</para>
+ <para>Used to run a command or OS in a light-weight namespace
+ container</para>
<indexterm zone="ch-system-systemd systemd-nspawn">
<primary sortas="b-systemd-nspawn">systemd-nspawn</primary>
</indexterm>
</listitem>
</varlistentry>
+ <varlistentry id="systemd-path">
+ <term><command>systemd-path</command></term>
+ <listitem>
+ <para>Used to query system and user paths</para>
+ <indexterm zone="ch-system-systemd systemd-path">
+ <primary sortas="b-systemd-path">systemd-path</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="systemd-resolve">
+ <term><command>systemd-resolve</command></term>
+ <listitem>
+ <para>Used to resolve domain names, IPV4 and IPv6 addresses, DNS
+ resource records, and services</para>
+ <indexterm zone="ch-system-systemd systemd-resolve">
+ <primary sortas="b-systemd-resolve">systemd-resolve</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="systemd-run">
<term><command>systemd-run</command></term>
<listitem>
- <para>used to create and start a transient .service or a .scope unit and
- run the specified command in it.</para>
+ <para>Used to create and start a transient .service or a .scope unit
+ and run the specified command in it</para>
<indexterm zone="ch-system-systemd systemd-run">
<primary sortas="b-systemd-run">systemd-run</primary>
</indexterm>
</listitem>
</varlistentry>
-<!-- <varlistentry id="systemd-stdio-bridge">
+ <!-- <varlistentry id="systemd-stdio-bridge">
<term><command>systemd-stdio-bridge</command></term>
<listitem>
<para>To be completed</para>
@@ -546,9 +631,10 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="systemd-tmpfiles">
<term><command>systemd-tmpfiles</command></term>
<listitem>
- <para>creates, deletes and cleans up volatile and temporary files and directories,
- based on the configuration file format and location specified in
- <filename class="directory">tmpfiles.d</filename> directories.</para>
+ <para>Creates, deletes and cleans up volatile and temporary files and
+ directories, based on the configuration file format and location
+ specified in
+ <filename class="directory">tmpfiles.d</filename> directories</para>
<indexterm zone="ch-system-systemd systemd-tmpfiles">
<primary sortas="b-systemd-tmpfiles">systemd-tmpfiles</primary>
</indexterm>
@@ -558,7 +644,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="systemd-tty-ask-password-agent">
<term><command>systemd-tty-ask-password-agent</command></term>
<listitem>
- <para>used to list or process pending Systemd password requests</para>
+ <para>Used to list or process pending systemd password requests</para>
<indexterm zone="ch-system-systemd systemd-tty-ask-password-agent">
<primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary>
</indexterm>
@@ -568,7 +654,8 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="telinit">
<term><command>telinit</command></term>
<listitem>
- <para>Tells <command>init</command> which run-level to change to.</para>
+ <para>Tells <command>init</command> which run-level to change
+ to</para>
<indexterm zone="ch-system-systemd telinit">
<primary sortas="b-telinit">telinit</primary>
</indexterm>
@@ -578,7 +665,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="timedatectl">
<term><command>timedatectl</command></term>
<listitem>
- <para>used to query and change the system clock and its settings.
+ <para>Used to query and change the system clock and its settings
</para>
<indexterm zone="ch-system-systemd timedatectl">
<primary sortas="b-timedatectl">timedatectl</primary>
@@ -592,7 +679,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<para>Generic Udev administration tool: controls the udevd daemon,
provides info from the Udev database, monitors uevents, waits for
uevents to finish, tests Udev configuration, and triggers uevents
- for a given device.</para>
+ for a given device</para>
<indexterm zone="ch-system-systemd udevadm">
<primary sortas="b-udevadm">udevadm</primary>
</indexterm>
@@ -602,7 +689,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="libsystemd">
<term><filename class="libraryfile">libsystemd</filename></term>
<listitem>
- <para>Systemd utility library.</para>
+ <para>systemd utility library</para>
<indexterm zone="ch-system-systemd libsystemd">
<primary sortas="c-libsystemd">libsystemd</primary>
</indexterm>
@@ -612,7 +699,7 @@ make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
<varlistentry id="libudev">
<term><filename class="libraryfile">libudev</filename></term>
<listitem>
- <para>A library to access Udev device information.</para>
+ <para>A library to access Udev device information</para>
<indexterm zone="ch-system-systemd libudev">
<primary sortas="c-libudev">libudev</primary>
</indexterm>
diff --git a/chapter06/util-linux.xml b/chapter06/util-linux.xml
index 6a81f3186..f4a7c5640 100644
--- a/chapter06/util-linux.xml
+++ b/chapter06/util-linux.xml
@@ -62,7 +62,7 @@
-->
<para>Prepare Util-linux for compilation:</para>
-<screen><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
+<screen revision="sysv"><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
--docdir=/usr/share/doc/util-linux-&util-linux-version; \
--disable-chfn-chsh \
--disable-login \
@@ -76,6 +76,18 @@
--without-systemd \
--without-systemdsystemunitdir</userinput></screen>
+<screen revision="systemd"><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
+ --docdir=/usr/share/doc/util-linux-&util-linux-version; \
+ --disable-chfn-chsh \
+ --disable-login \
+ --disable-nologin \
+ --disable-su \
+ --disable-setpriv \
+ --disable-runuser \
+ --disable-pylibmount \
+ --disable-static \
+ --without-python</userinput></screen>
+
<para>The --disable and --without options prevent warnings about
building components that require packages not in LFS or are
inconsistent with programs installed by other packages.</para>
diff --git a/chapter07/chapter07d.xml b/chapter07/chapter07d.xml
new file mode 100644
index 000000000..a2c30abe0
--- /dev/null
+++ b/chapter07/chapter07d.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+
+<chapter id="chapter-bootscripts" xreflabel="Chapter 7">
+ <?dbhtml dir="chapter07"?>
+ <?dbhtml filename="chapter07.html"?>
+
+ <title>Basic System Configuration</title>
+
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introductiond.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="networkd.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="udevd.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="symlinksd.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="clock.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="consoled.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="locale.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inputrc.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="etcshellsd.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd-custom.xml"/>
+
+</chapter>
diff --git a/chapter07/clock.xml b/chapter07/clock.xml
new file mode 100644
index 000000000..0dbdc7eaf
--- /dev/null
+++ b/chapter07/clock.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+
+<sect1 id="ch-scripts-clock">
+ <?dbhtml filename="clock.html"?>
+
+ <title>Configuring the system clock</title>
+
+ <indexterm zone="ch-scripts-clock">
+ <primary sortas="d-clock">clock</primary>
+ <secondary>configuring</secondary></indexterm>
+
+ <para>This section discusses how to configure the
+ <command>systemd-timedated</command> system service, which configures
+ system clock and timezone.</para>
+
+ <para>If you cannot remember whether or not the hardware clock is set to UTC,
+ find out by running the <userinput>hwclock --localtime --show</userinput>
+ command. This will display 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 the time shown by
+ <command>hwclock</command>. For example, if you are currently in the MST
+ timezone, which is also known as GMT -0700, add seven hours to the local
+ time.</para>
+
+ <para><command>systemd-timedated</command> reads <filename>/etc/adjtime</filename>,
+ and depending on the contents of the file, it sets the clock to either UTC or
+ local time.</para>
+
+ <para>Create the <filename>/etc/adjtime</filename> file with the following contents
+ if your hardware clock is set to local time:</para>
+
+<screen role="nodump"><userinput>cat &gt; /etc/adjtime &lt;&lt; "EOF"
+<literal>0.0 0 0.0
+0
+LOCAL</literal>
+EOF</userinput></screen>
+
+ <para>If <filename>/etc/adjtime</filename> isn't present at first boot,
+ <command>systemd-timedated</command> will assume that hardware clock is
+ set to UTC and adjust the file according to that.</para>
+
+ <para>You can also use the <command>timedatectl</command> utility to tell
+ <command>systemd-timedated</command> if your hardware clock is set to
+ UTC or local time:</para>
+
+<screen role="nodump"><userinput>timedatectl set-local-rtc 1</userinput></screen>
+
+ <para><command>timedatectl</command> can also be used to change system time and
+ time zone.</para>
+
+ <para>To change your current system time, issue:</para>
+
+<screen role="nodump"><userinput>timedatectl set-time YYYY-MM-DD HH:MM:SS</userinput></screen>
+
+ <para>Hardware clock will also be updated accordingly.</para>
+
+ <para>To change your current time zone, issue:</para>
+
+<screen role="nodump"><userinput>timedatectl set-timezone TIMEZONE</userinput></screen>
+
+ <para>You can get list of available time zones by running:</para>
+
+<screen role="nodump"><userinput>timedatectl list-timezones</userinput></screen>
+
+ <note><para>Please note that <command>timedatectl</command> command can
+ be used only on a system booted with systemd.</para></note>
+
+ <sect2>
+ <title>Network Time Synchronization</title>
+
+ <para>Starting with version 213, systemd ships a daemon called
+ <command>systemd-timesyncd</command> which can be used to
+ synchronize the system time with remote NTP servers.</para>
+
+ <para>The daemon is not intended as a replacement for the well
+ established NTP daemon, but as a client only implementation
+ of the SNTP protocol which can be used for less advanced
+ tasks and on resource limited systems.</para>
+
+ <para>Starting with systemd version 216, the
+ <command>systemd-timesyncd</command> daemon is enabled by
+ default. If you want to disable it, issue the following
+ command:</para>
+
+<screen role="nodump"><userinput>systemctl disable systemd-timesyncd</userinput></screen>
+
+ <para>The <filename>/etc/systemd/timesyncd.conf</filename> file
+ can be used to change the NTP servers that
+ <command>systemd-timesyncd</command> synchronizes with.</para>
+
+ <para>Please note that when system clock is set to Local Time,
+ <command>systemd-timesyncd</command> won't update hardware
+ clock.</para>
+
+ </sect2>
+
+</sect1>
diff --git a/chapter07/consoled.xml b/chapter07/consoled.xml
new file mode 100644
index 000000000..ea1062c23
--- /dev/null
+++ b/chapter07/consoled.xml
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+
+<sect1 id="ch-scripts-console">
+ <?dbhtml filename="console.html"?>
+
+ <title>Configuring the Linux Console</title>
+
+ <indexterm zone="ch-scripts-console">
+ <primary sortas="d-console">console</primary>
+ <secondary>configuring</secondary>
+ </indexterm>
+
+ <para>This section discusses how to configure the
+ <command>systemd-vconsole-setup</command> system service, which configures
+ the virtual console font and console keymap.</para>
+
+ <para>The <command>systemd-vconsole-setup</command> service reads the
+ <filename>/etc/vconsole.conf</filename> file for configuration
+ information. Decide which keymap and screen font will be used. Various
+ language-specific HOWTOs can also help with this, see <ulink
+ url="http://www.tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>.
+ Examine <command>localectl list-keymaps</command> output for a list of
+ valid console keymaps. Look in
+ <filename class="directory">/usr/share/consolefonts</filename>
+ directory for valid screen fonts.</para>
+
+ <para>The <filename>/etc/vconsole.conf</filename> file should contain lines
+ of the form: VARIABLE="value". The following variables are recognized:</para>
+
+ <variablelist>
+
+ <varlistentry>
+ <term>KEYMAP</term>
+ <listitem>
+ <para>This variable specifies the key mapping table for the keyboard. If
+ unset, it defaults to <literal>us</literal>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>KEYMAP_TOGGLE</term>
+ <listitem>
+ <para>This variable can be used to configure a second toggle keymap and
+ is unset by default.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>FONT</term>
+ <listitem>
+ <para>This variable specifies the font used by the virtual
+ console.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>FONT_MAP</term>
+ <listitem>
+ <para>This variable specifies the console map to be used.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>FONT_UNIMAP</term>
+ <listitem>
+ <para>This variable specifies the Unicode font map.</para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+
+ <para>An example for a German keyboard and console is given below:</para>
+
+<screen role="nodump"><userinput>cat &gt; /etc/vconsole.conf &lt;&lt; "EOF"
+<literal>KEYMAP=de-latin1
+FONT=Lat2-Terminus16</literal>
+EOF</userinput></screen>
+
+ <para>You can change KEYMAP value at runtime by using the
+ <command>localectl</command> utility:</para>
+
+<screen role="nodump"><userinput>localectl set-keymap MAP</userinput></screen>
+
+ <note><para>Please note that <command>localectl</command> command can
+ be used only on a system booted with systemd.</para></note>
+
+ <para>You can also use <command>localectl</command> utility with the
+ corresponding parameters to change X11 keyboard layout, model, variant
+ and options:</para>
+
+<screen role="nodump"><userinput>localectl set-x11-keymap LAYOUT [MODEL] [VARIANT] [OPTIONS]</userinput></screen>
+
+ <para>To list possible values for <command>localectl set-x11-keymap</command>
+ parameters, run <command>localectl</command> with parameters listed below:
+ </para>
+
+ <variablelist>
+
+ <varlistentry>
+ <term>list-x11-keymap-models</term>
+ <listitem>
+ <para>Show known X11 keyboard mapping models.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>list-x11-keymap-layouts</term>
+ <listitem>
+ <para>Show known X11 keyboard mapping layouts.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>list-x11-keymap-variants</term>
+ <listitem>
+ <para>Show known X11 keyboard mapping variants.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>list-x11-keymap-options</term>
+ <listitem>
+ <para>Show known X11 keyboard mapping options.</para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+
+ <note><para>Using any of the parameters listed above requires
+ XKeyboard Config package from BLFS.</para></note>
+
+</sect1>
diff --git a/chapter07/etcshellsd.xml b/chapter07/etcshellsd.xml
new file mode 100644
index 000000000..ddccafa9b
--- /dev/null
+++ b/chapter07/etcshellsd.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+
+<sect1 id="ch-config-shells" xreflabel="Creating the /etc/shells File">
+ <?dbhtml filename="etcshells.html"?>
+
+ <sect1info>
+ <othername>$LastChangedBy$</othername>
+ <date>$Date$</date>
+ </sect1info>
+
+ <title>Creating the /etc/shells File</title>
+
+ <indexterm zone="ch-config-shells">
+ <primary sortas="e-etc-shells">/etc/shells</primary>
+ </indexterm>
+
+ <para>The <filename>shells</filename> file contains a list of
+ login shells on the system. Applications use this file to determine
+ whether a shell is valid. For each shell a single line should be
+ present, consisting of the shell's path, relative to the root of the
+ directory structure (/).</para>
+
+ <para>For example, this file is consulted by <command>chsh</command>
+ to determine whether an unprivileged user may change the login shell for her
+ own account. If the command name is not listed, the user will be denied of
+ change.</para>
+
+ <para>It is a requirement for applications such as
+ <application>GDM</application> which does not populate the
+ face browser if it can't find <filename>/etc/shells</filename>, or
+ FTP daemons which traditionally disallow access to users
+ with shells not included in this file.</para>
+
+<screen role="root"><userinput>cat &gt; /etc/shells &lt;&lt; "EOF"
+<literal># Begin /etc/shells
+
+/bin/sh
+/bin/bash
+
+# End /etc/shells</literal>
+EOF</userinput></screen>
+
+</sect1>
diff --git a/chapter07/introductiond.xml b/chapter07/introductiond.xml
new file mode 100644
index 000000000..59d618b8b
--- /dev/null
+++ b/chapter07/introductiond.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+
+<sect1 id="ch-scripts-introduction">
+ <?dbhtml filename="introduction.html"?>
+
+ <title>Introduction</title>
+
+ <para>This chapter discusses configuration files and systemd services.
+ First, the general configuration files needed to set up networking are
+ presented.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><xref linkend="ch-scripts-network" role="."/></para>
+ </listitem>
+ <listitem>
+ <para><xref linkend="ch-scripts-hostname" role="."/></para>
+ </listitem>
+ <listitem>
+ <para><xref linkend="ch-scripts-hosts" role="."/></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Second, issues that affect the proper setup of devices are
+ discussed.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><xref linkend="ch-scripts-udev" role="."/></para>
+ </listitem>
+ <listitem>
+ <para><xref linkend="ch-scripts-symlinks" role="."/></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Third, configuring the system clock and keyboard layout.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><xref linkend="ch-scripts-clock" role="."/></para>
+ </listitem>
+ <listitem>
+ <para><xref linkend="ch-scripts-console" role="."/></para>
+ </listitem>
+ </itemizedlist>
+
+
+ <para>Fourth, a brief introduction to the scripts and configuration
+ files used when the user logs into the system.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><xref linkend="ch-scripts-locale" role="."/></para>
+ </listitem>
+ <listitem>
+ <para><xref linkend="ch-scripts-inputrc" role="."/></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>And finally, configuring the systemd behavior.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><xref linkend="ch-scripts-systemd-custom" role="."/></para>
+ </listitem>
+ </itemizedlist>
+
+</sect1>
diff --git a/chapter07/locale.xml b/chapter07/locale.xml
new file mode 100644
index 000000000..76dbb7251
--- /dev/null
+++ b/chapter07/locale.xml
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+
+<sect1 id="ch-scripts-locale">
+ <?dbhtml filename="locale.html"?>
+
+ <title>Configuring the System Locale</title>
+
+ <indexterm zone="ch-scripts-locale">
+ <primary sortas="e-etc-locale-conf">/etc/locale.conf</primary>
+ </indexterm>
+
+ <para>The <filename>/etc/locale.conf</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 <command>bash</command> 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>Replace <replaceable>&lt;ll&gt;</replaceable> below with the two-letter code
+ for the desired language (e.g., <quote>en</quote>) and
+ <replaceable>&lt;CC&gt;</replaceable> with the two-letter code for the appropriate
+ country (e.g., <quote>GB</quote>). <replaceable>&lt;charmap&gt;</replaceable> should
+ be replaced with the canonical charmap for your chosen locale. Optional
+ modifiers such as <quote>@euro</quote> may also be present.</para>
+
+ <para>The list of all locales supported by Glibc can be obtained by running
+ the following command:</para>
+
+<screen role="nodump"><userinput>locale -a</userinput></screen>
+
+ <para>Charmaps can have a number of aliases, e.g., <quote>ISO-8859-1</quote>
+ is also referred to as <quote>iso8859-1</quote> and <quote>iso88591</quote>.
+ Some applications cannot handle the various synonyms correctly (e.g., require
+ that <quote>UTF-8</quote> is written as <quote>UTF-8</quote>, not
+ <quote>utf8</quote>), so it is safest in most
+ cases to choose the canonical name for a particular locale. To determine
+ the canonical name, run the following command, where <replaceable>&lt;locale
+ name&gt;</replaceable> is the output given by <command>locale -a</command> for
+ your preferred locale (<quote>en_GB.iso88591</quote> in our example).</para>
+
+<screen role="nodump"><userinput>LC_ALL=<replaceable>&lt;locale name&gt;</replaceable> locale charmap</userinput></screen>
+
+ <para>For the <quote>en_GB.iso88591</quote> locale, the above command
+ will print:</para>
+
+<screen><computeroutput>ISO-8859-1</computeroutput></screen>
+
+ <para>This results in a final locale setting of <quote>en_GB.ISO-8859-1</quote>.
+ It is important that the locale found using the heuristic above is tested prior
+ to it being added to the Bash startup files:</para>
+
+<screen role="nodump"><userinput>LC_ALL=&lt;locale name&gt; locale language
+LC_ALL=&lt;locale name&gt; locale charmap
+LC_ALL=&lt;locale name&gt; locale int_curr_symbol
+LC_ALL=&lt;locale name&gt; locale int_prefix</userinput></screen>
+
+ <para>The above commands should print the language name, the character
+ encoding used by the locale, the local currency, and the prefix to dial
+ before the telephone number in order to get into the country. If any of the
+ commands above fail with a message similar to the one shown below, this means
+ that your locale was either not installed in Chapter 6 or is not supported by
+ the default installation of Glibc.</para>
+
+<screen><computeroutput>locale: Cannot set LC_* to default locale: No such file or directory</computeroutput></screen>
+
+ <para>If this happens, you should either install the desired locale using the
+ <command>localedef</command> command, or consider choosing a different locale.
+ Further instructions assume that there are no such error messages from
+ Glibc.</para>
+
+ <!-- FIXME: the xlib example will became obsolete real soon -->
+ <para>Some packages beyond LFS may also lack support for your chosen locale. One
+ example is the X library (part of the X Window System), which outputs the
+ following error message if the locale does not exactly match one of the character
+ map names in its internal files:</para>
+
+<screen><computeroutput>Warning: locale not supported by Xlib, locale set to C</computeroutput></screen>
+
+ <para>In several cases Xlib expects that the character map will be listed in
+ uppercase notation with canonical dashes. For instance, "ISO-8859-1" rather
+ than "iso88591". It is also possible to find an appropriate specification by
+ removing the charmap part of the locale specification. This can be checked
+ by running the <command>locale charmap</command> command in both locales.
+ For example, one would have to change "de_DE.ISO-8859-15@euro" to
+ "de_DE@euro" in order to get this locale recognized by Xlib.</para>
+
+ <para>Other packages can also function incorrectly (but may not necessarily
+ display any error messages) if the locale name does not meet their expectations.
+ In those cases, investigating how other Linux distributions support your locale
+ might provide some useful information.</para>
+
+ <para>Once the proper locale settings have been determined, create the
+ <filename>/etc/locale.conf</filename> file:</para>
+
+<screen><userinput>cat &gt; /etc/locale.conf &lt;&lt; "EOF"
+<literal>LANG=<replaceable>&lt;ll&gt;_&lt;CC&gt;.&lt;charmap&gt;&lt;@modifiers&gt;</replaceable></literal>
+EOF</userinput></screen>
+
+ <para>Note that you can modify <filename>/etc/locale.conf</filename> with
+ systemd <command>localectl</command> utility. To use <command>localectl</command>
+ for the example above, run:</para>
+
+<screen role="nodump"><userinput>localectl set-locale LANG="<replaceable>&lt;ll&gt;_&lt;CC&gt;.&lt;charmap&gt;&lt;@modifiers&gt;</replaceable>"</userinput></screen>
+
+ <para>You can also specify other language specific environment variables such
+ as <envar>LANG</envar>, <envar>LC_CTYPE</envar>, <envar>LC_NUMERIC</envar> or
+ any other environment variable from <command>locale</command> output. Just
+ separate them with a space. An example where <envar>LANG</envar> is set as
+ en_US.UTF-8 but <envar>LC_CTYPE</envar> is set as just en_US is:</para>
+
+<screen role="nodump"><userinput>localectl set-locale LANG="en_US.UTF-8" LC_CTYPE="en_US"</userinput></screen>
+
+ <note><para>Please note that <command>localectl</command> command can
+ be used only on a system booted with systemd.</para></note>
+
+ <para>The <quote>C</quote> (default) and <quote>en_US</quote> (the recommended
+ one for United States English users) locales are different. <quote>C</quote>
+ uses the US-ASCII 7-bit character set, and treats bytes with the high bit set
+ as invalid characters. That's why, e.g., the <command>ls</command> command
+ substitutes them with question marks in that locale. Also, an attempt to send
+ mail with such characters from Mutt or Pine results in non-RFC-conforming
+ messages being sent (the charset in the outgoing mail is indicated as <quote>unknown
+ 8-bit</quote>). So you can use the <quote>C</quote> locale only if you are sure that
+ you will never need 8-bit characters.</para>
+
+ <para>UTF-8 based locales are not supported well by many programs.
+ Work is in progress to document and, if possible, fix such problems, see
+ <ulink url="&blfs-book;introduction/locale-issues.html"/>.</para>
+
+</sect1>
diff --git a/chapter07/networkd.xml b/chapter07/networkd.xml
new file mode 100644
index 000000000..86dcb3e53
--- /dev/null
+++ b/chapter07/networkd.xml
@@ -0,0 +1,270 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+
+<sect1 id="ch-scripts-network">
+ <?dbhtml filename="network.html"?>
+
+ <title>General Network Configuration</title>
+
+ <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>
+
+ <sect2>
+ <title>Network Interface Configuration Files</title>
+
+ <para>Starting with version 209, systemd ships a network configuration
+ daemon called <command>systemd-networkd</command> which can be used for
+ basic network configuration. Additionally, since version 213, DNS name
+ resolution can be handled by <command>systemd-resolved</command> in place
+ of a static <filename>/etc/resolv.conf</filename> file. Both services are
+ enabled by defualt, and absolutely should not be disabled.</para>
+
+ <para>Configuration files for <command>systemd-networkd</command> (and
+ <command>systemd-resolved</command>) can be placed in
+ <filename class="directory">/usr/lib/systemd/network</filename>
+ or <filename class="directory">/etc/systemd/network</filename>. Files in
+ <filename class="directory">/etc/systemd/network</filename> have a
+ higher priority than the ones in
+ <filename class="directory">/usr/lib/systemd/network</filename>.
+ There are three types of configuration files:
+ <filename class="extension">.link</filename>,
+ <filename class="extension">.netdev</filename> and
+ <filename class="extension">.network</filename> files. For detailed
+ descriptions and example contents of these configuration files, consult
+ the <filename>systemd-link(5)</filename>,
+ <filename>systemd-netdev(5)</filename> and
+ <filename>systemd-network(5)</filename> manual pages.</para>
+
+ <note><para>Udev may assign network card interface names based
+ on system physical characteristics such as enp2s1. If you are
+ not sure what your interface name is, you can always run
+ <command>ip link</command> after you have booted your system.
+ </para></note>
+
+ <sect3 id="systemd-networkd-static">
+ <title>Static IP Configuration</title>
+
+ <para>The command below creates a basic configuration file for a
+ Static IP setup (using both systemd-networkd and
+ systemd-resolved):</para>
+
+<screen role="nodump"><userinput>cat &gt; /etc/systemd/network/10-eth0-static.network &lt;&lt; "EOF"
+<literal>[Match]
+Name=eth0
+
+[Network]
+Address=192.168.0.2/24
+Gateway=192.168.0.1
+DNS=192.168.0.1
+Domains=<replaceable>&lt;Your Domain Name&gt;</replaceable></literal>
+EOF</userinput></screen>
+
+ <para>Multiple DNS entries can be added if you have more than one DNS
+ server. Do not include DNS or Domains entries if you intend to use a
+ static <filename>/etc/reslov.conf</filename> file.</para>
+
+ </sect3>
+
+ <sect3 id="systemd-networkd-dhcp">
+ <title>DHCP Configuration</title>
+
+ <para>The command below creates a basic configuration file for an IPv4
+ DHCP setup:</para>
+
+<screen role="nodump"><userinput>cat &gt; /etc/systemd/network/10-eth0-dhcp.network &lt;&lt; "EOF"
+<literal>[Match]
+Name=eth0
+
+[Network]
+DHCP=ipv4
+
+[DHCP]
+UseDomains=true</literal>
+EOF</userinput></screen>
+
+ </sect3>
+
+ </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>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>.</para>
+
+ <sect3 id="resolv-conf-systemd-resoloved">
+ <title>systemd-resolved Configuration</title>
+
+ <note><para>If using another means to configure your network
+ interfaces (ex: ppp, network-manager, etc.), or if using any type of
+ local resolver (ex: bind, dnsmasq, etc.), or any other software that
+ generates an <filename>/etc/resolv.conf</filename> (ex: resolvconf), the
+ <command>systemd-resolved</command> service should not be
+ used.</para></note>
+
+ <para>When using <command>systemd-resolved</command> for DNS
+ configuration, it is responsible for creating the
+ <filename>/etc/resolv.conf</filename> file. Since version 226, the
+ symlink for <filename>/etc/resolv.conf</filename> is created by systemd
+ when needed, so no further configuration is necessary.</para>
+
+ </sect3>
+
+ <sect3 id="resolv-conf-static">
+ <title>Static resolv.conf Configuration</title>
+
+ <para>If a static <filename>/etc/resolv.conf</filename> is desired,
+ create it by running the following command:</para>
+
+<screen role="nodump"><userinput>cat &gt; /etc/resolv.conf &lt;&lt; "EOF"
+<literal># Begin /etc/resolv.conf
+
+domain <replaceable>&lt;Your Domain Name&gt;</replaceable>
+nameserver <replaceable>&lt;IP address of your primary nameserver&gt;</replaceable>
+nameserver <replaceable>&lt;IP address of your secondary nameserver&gt;</replaceable>
+
+# End /etc/resolv.conf</literal>
+EOF</userinput></screen>
+
+ <para>The <varname>domain</varname> statement can be omitted
+ or replaced with a <varname>search</varname> statement. See the man page
+ for resolv.conf for more details.</para>
+
+ <para>Replace
+ <replaceable>&lt;IP address of the nameserver&gt;</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>
+
+ <note><para>The Google Public IPv4 DNS addresses are
+ <parameter>8.8.8.8</parameter> and <parameter>8.8.4.4</parameter>
+ for IPv4, and <parameter>2001:4860:4860::8888</parameter> and
+ <parameter>2001:4860:4860::8844</parameter> for IPv6.</para></note>
+
+ </sect3>
+
+ </sect2>
+
+ <sect2 id="ch-scripts-hostname">
+ <title>Configuring the system hostname</title>
+
+ <indexterm zone="ch-scripts-hostname">
+ <primary sortas="d-hostname">hostname</primary>
+ <secondary>configuring</secondary>
+ </indexterm>
+
+ <para>During the boot process, the file <filename>/etc/hostname</filename>
+ is used for establishing the system's hostname.</para>
+
+ <para>Create the <filename>/etc/hostname</filename> file and enter a
+ hostname by running:</para>
+
+<screen><userinput>echo "<replaceable>&lt;lfs&gt;</replaceable>" &gt; /etc/hostname</userinput></screen>
+
+ <para><replaceable>&lt;lfs&gt;</replaceable> needs to be replaced with the
+ name given to the computer. Do not enter the Fully Qualified Domain Name
+ (FQDN) here. That information is put in the
+ <filename>/etc/hosts</filename> file.</para>
+
+ </sect2>
+
+ <sect2 id="ch-scripts-hosts">
+ <title>Customizing the /etc/hosts File</title>
+
+ <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>Decide on a fully-qualified domain name (FQDN), and possible aliases
+ for use in the <filename>/etc/hosts</filename> file. If using static
+ addresses, you'll also need to decide on an IP address. The syntax
+ for a hosts file entry is:</para>
+
+<screen><literal>IP_address myhost.example.org aliases</literal></screen>
+
+ <para>Unless the computer is to be visible to the Internet (i.e., 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><literal>Private Network Address Range Normal Prefix
+10.0.0.1 - 10.255.255.254 8
+172.x.0.1 - 172.x.255.254 16
+192.168.y.1 - 192.168.y.254 24</literal></screen>
+
+ <para>x can be any number in the range 16-31. y can be any number in the
+ range 0-255.</para>
+
+ <para>A valid private IP address could be 192.168.1.1. A valid FQDN for
+ this IP could be lfs.example.org.</para>
+
+ <para>Even if not using a network card, a valid FQDN is still required.
+ This is necessary for certain programs to operate correctly.</para>
+
+ <para>If using DHCP, DHCPv6, IPv6 Autoconfiguration, or if a network card
+ is not going to be configured, create the <filename>/etc/hosts</filename>
+ file by running the following command:</para>
+
+<screen><userinput>cat &gt; /etc/hosts &lt;&lt; "EOF"
+<literal># Begin /etc/hosts
+
+127.0.0.1 <replaceable>&lt;HOSTNAME.example.org&gt;</replaceable> <replaceable>&lt;HOSTNAME&gt;</replaceable> localhost <replaceable>[alias1] [alias2] ...</replaceable>
+::1 <replaceable>&lt;HOSTNAME.example.org&gt;</replaceable> <replaceable>&lt;HOSTNAME&gt;</replaceable> localhost <replaceable>[alias1] [alias2] ...</replaceable>
+
+# End /etc/hosts</literal>
+EOF</userinput></screen>
+
+ <para>The ::1 entry is the IPv6 counterpart of 127.0.0.1 and represents
+the IPv6 loopback interface.</para>
+
+ <para>If ussing a staic address, create the <filename>/etc/hosts</filename>
+ file by running this command instead:</para>
+
+<screen role="nodump"><userinput>cat &gt; /etc/hosts &lt;&lt; "EOF"
+<literal># Begin /etc/hosts
+
+127.0.0.1 localhost
+::1 localhost
+<replaceable>&lt;192.168.0.2&gt;</replaceable> <replaceable>&lt;HOSTNAME.example.org&gt;</replaceable> <replaceable>&lt;HOSTNAME&gt;</replaceable> <replaceable>[alias1] [alias2] ...</replaceable>
+
+# End /etc/hosts</literal>
+EOF</userinput></screen>
+
+ <para>The <replaceable>&lt;192.168.0.2&gt;</replaceable>,
+ <replaceable>&lt;HOSTNAME.example.org&gt;</replaceable>, and
+ <replaceable>&lt;HOSTNAME&gt;</replaceable> values need to be
+ changed for specific uses or requirements (if assigned an IP address by a
+ network/system administrator and the machine will be connected to an
+ existing network). The optional alias name(s) can be omitted.</para>
+
+ </sect2>
+
+</sect1>
diff --git a/chapter07/symlinksd.xml b/chapter07/symlinksd.xml
new file mode 100644
index 000000000..354ae319a
--- /dev/null
+++ b/chapter07/symlinksd.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+
+<sect1 id="ch-scripts-symlinks">
+ <?dbhtml filename="symlinks.html"?>
+
+ <title>Creating Custom Symlinks to Devices</title>
+
+ <sect2>
+ <title>Dealing with duplicate devices</title>
+
+ <para>As explained in <xref linkend="ch-scripts-udev"/>, the order in
+ which devices with the same function appear in
+ <filename class="directory">/dev</filename> is essentially random.
+ E.g., if you have a USB web camera and a TV tuner, sometimes
+ <filename>/dev/video0</filename> refers to the camera and
+ <filename>/dev/video1</filename> refers to the tuner, and sometimes
+ after a reboot the order changes to the opposite one.
+ For all classes of hardware except sound cards and network cards, this is
+ fixable by creating udev rules for custom persistent symlinks.
+ The case of network cards is covered separately in
+ <xref linkend="ch-scripts-network"/>, and sound card configuration can
+ be found in <ulink url="&blfs-book;postlfs/devices.html">BLFS</ulink>.</para>
+
+ <para>For each of your devices that is likely to have this problem
+ (even if the problem doesn't exist in your current Linux distribution),
+ find the corresponding directory under
+ <filename class="directory">/sys/class</filename> or
+ <filename class="directory">/sys/block</filename>.
+ For video devices, this may be
+ <filename
+ class="directory">/sys/class/video4linux/video<replaceable>X</replaceable></filename>.
+ Figure out the attributes that identify the device uniquely (usually,
+ vendor and product IDs and/or serial numbers work):</para>
+
+<screen role="nodump"><userinput>udevadm info -a -p /sys/class/video4linux/video0</userinput></screen>
+
+ <para>Then write rules that create the symlinks, e.g.:</para>
+
+<screen role="nodump"><userinput>cat &gt; /etc/udev/rules.d/83-duplicate_devs.rules &lt;&lt; "EOF"
+<literal>
+# Persistent symlinks for webcam and tuner
+KERNEL=="video*", ATTRS{idProduct}=="1910", ATTRS{idVendor}=="0d81", \
+ SYMLINK+="webcam"
+KERNEL=="video*", ATTRS{device}=="0x036f", ATTRS{vendor}=="0x109e", \
+ SYMLINK+="tvtuner"
+</literal>
+EOF</userinput></screen>
+
+ <para>The result is that <filename>/dev/video0</filename> and
+ <filename>/dev/video1</filename> devices still refer randomly to the tuner
+ and the web camera (and thus should never be used directly), but there are
+ symlinks <filename>/dev/tvtuner</filename> and
+ <filename>/dev/webcam</filename> that always point to the correct
+ device.</para>
+
+ </sect2>
+
+</sect1>
diff --git a/chapter07/sysd-custom.xml b/chapter07/sysd-custom.xml
deleted file mode 100644
index e5872ece9..000000000
--- a/chapter07/sysd-custom.xml
+++ /dev/null
@@ -1,253 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
-]>
-
-<sect1 id="ch-scripts-sysd-custom">
- <?dbhtml filename="sysd-custom.html"?>
-
- <title>Systemd Usage and Confiuration</title>
-
- <indexterm zone="ch-scripts-sysd-custom">
- <primary sortas="e-Systemd">Systemd Customization</primary>
- </indexterm>
-
- <sect2>
- <title>Basic Configuration</title>
-
- <para>The <filename>/etc/systemd/system.conf</filename> file contains a set
- of items to control basic operations. The default file has all entries
- commented out with the default settings indicated. This file is where the
- log level may be changed as well as some basic journal settings.</para>
-
- </sect2>
-
- <sect2>
- <title>Disabling Screen Clearing at Boot Time</title>
-
- <para>The normal behavior for systemd is to clear the secreen at
- the end of the boot sequence. If desired, this behavior may be
- changed by the following:</para>
-
-<screen role="nodump"><userinput>mkdir -p /etc/systemd/system/getty@tty1.service.d
-
-cat > /etc/systemd/system/getty@tty1.service.d/noclear.conf &lt;&lt; EOF
-[Service]
-TTYVTDisallocate=no
-EOF</userinput></screen>
-
- <para>The boot messages can always be revied by using the
- <userinput>journalctl -b</userinput> command as the root user.</para>
-
- </sect2>
-
- <sect2>
- <title>Disabling tmpfs for /tmp </title>
-
- <para>By default, <filename class="directory">/tmp</filename> is created as
- a tmpfs. If this is not desired, it can be overridden by the following:</para>
-
-<screen role="nodump"><userinput>ln -s /dev/null /etc/systemd/system/tmp.mount</userinput></screen>
-
- <para>This is not necessary if there is a separate partition for /tmp
- specified in <filename>/etc/fstab</filename>.</para>
- </sect2>
-
- <sect2>
- <title>Configuring Automatic File Creation and Deletion</title>
-
- <para>There are several services that create or delete files or
- directories:</para>
-
- <itemizedlist>
- <listitem><para>systemd-tmpfiles-clean.service</para></listitem>
- <listitem><para>systemd-tmpfiles-setup-dev.service</para></listitem>
- <listitem><para>systemd-tmpfiles-setup.service</para></listitem>
- </itemizedlist>
-
- <para>The system location for the configuration files is
- <filename>/usr/lib/tmpfiles.d/*.conf</filename>. The local
- configuration files are in <filename>/etc/tmpfiles.d/*.conf</filename>.
- Files in /etc/tmpfiles.d override files with the same name in
- /usr/lib/tmpfiles.d. See <userinput>man tmpfiles.d</userinput>
- for file format details.</para>
-
- </sect2>
-
- <sect2>
- <title>Adding Custom Units and Services</title>
-
- <para>A custom service can be added by creating a directory and
- configuration file in <filename class="directory">/etc/systemd/system/</filename>.
- For example:</para>
-
-<screen role="nodump"><userinput>mkdir -p /etc/systemd/system/foobar.service.d
-
-cat > /etc/systemd/system/foobar.service.d/foobar.conf &lt;&lt; EOF
-[Service]
-Restart=always
-RestartSec=30
-EOF</userinput></screen>
-
- <para>See the man page for systemd.unit for more information. After
- creating the configuration file, run <userinput>systemctl
- daemon-reload</userinput> and <userinput>systemctl restart
- foobar</userinput> to activate a service or changes to a service.</para>
-
- </sect2>
-
- <sect2 id="ch-scripts-systemd-console">
- <title>Setting Console Fonts and Keyboard</title>
-
- <indexterm zone="ch-scripts-systemd-console">
- <primary sortas="d-console">systemd console</primary>
- <secondary>configuring</secondary>
- </indexterm>
-
- <para>This section discusses how to configure the
- <command>systemd-vconsole-setup</command> system service, which configures
- the virtual console font and console keymap.</para>
-
- <para>The <command>systemd-vconsole-setup</command> service reads the
- <filename>/etc/vconsole.conf</filename> file for configuration
- information. Decide which keymap and screen font will be used. Various
- language-specific HOWTOs can also help with this, see <ulink
- url="http://www.tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>.
- Examine <command>localectl list-keymaps</command> output for a list of
- valid console keymaps. Look in
- <filename class="directory">/usr/share/consolefonts</filename>
- directory for valid screen fonts.</para>
-
- <para>The <filename>/etc/vconsole.conf</filename> file should contain lines
- of the form: VARIABLE="value". The following variables are recognized:</para>
-
- <variablelist>
-
- <varlistentry>
- <term>KEYMAP</term>
- <listitem>
- <para>This variable specifies the key mapping table for the keyboard. If
- unset, it defaults to <literal>us</literal>.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>KEYMAP_TOGGLE</term>
- <listitem>
- <para>This variable can be used to configure a second toggle keymap and
- is unset by default.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>FONT</term>
- <listitem>
- <para>This variable specifies the font used by the virtual
- console.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>FONT_MAP</term>
- <listitem>
- <para>This variable specifies the console map to be used.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>FONT_UNIMAP</term>
- <listitem>
- <para>This variable specifies the unicode font map.</para>
- </listitem>
- </varlistentry>
-
- </variablelist>
-
- <para>An example for a German keyboard and console is given below:</para>
-
-<screen role="nodump"><userinput>cat &gt; /etc/vconsole.conf &lt;&lt; "EOF"
-<literal>KEYMAP=de-latin1
-FONT=Lat2-Terminus16</literal>
-EOF</userinput></screen>
-
- <para>You can change KEYMAP value at runtime by using the
- <command>localectl</command> utility:</para>
-
-<screen role="nodump"><userinput>localectl set-keymap MAP</userinput></screen>
-
- <note><para>Please note that <command>localectl</command> command can
- be used only on a system booted with Systemd.</para></note>
-
- </sect2>
-
- <sect2>
- <title>Clock Configuration</title>
-
- <indexterm zone="ch-scripts-clock">
- <primary sortas="d-clock">clock</primary>
- <secondary>configuring</secondary></indexterm>
-
- <para>This section discusses how to configure the
- <command>systemd-timedated</command> system service, which configures
- system clock and timezone.</para>
-
- <para><command>systemd-timedated</command> reads
- <filename>/etc/adjtime</filename>, and depending on the contents of the file,
- it sets the clock to either UTC or local time. Create the
- <filename>/etc/adjtime</filename> file with the following contents <emphasis>if your
- hardware clock is set to local time</emphasis>:</para>
-
-<screen role="nodump"><userinput>cat &gt; /etc/adjtime &lt;&lt; "EOF"
-<literal>0.0 0 0.0
-0
-LOCAL</literal>
-EOF</userinput></screen>
-
- <para>If <filename>/etc/adjtime</filename> isn't present at first boot,
- <command>systemd-timedated</command> will assume that hardware clock is
- set to UTC and create the file using that setting.</para>
-
- <para>You can also use the <command>timedatectl</command> utility to tell
- <command>systemd-timedated</command> if your hardware clock is set to
- UTC or local time:</para>
-
-<screen role="nodump"><userinput>timedatectl set-local-rtc 1</userinput></screen>
-
- <para><command>timedatectl</command> can also be used to change system time and
- time zone.</para>
-
- <para>To change your current system time, issue:</para>
-
-<screen role="nodump"><userinput>timedatectl set-time YYYY:MM:DD HH:MM:SS</userinput></screen>
-
- <para>Hardware clock will also be updated accordingly.</para>
-
- <para>To change your current time zone, issue:</para>
-
-<screen role="nodump"><userinput>timedatectl set-timezone TIMEZONE</userinput></screen>
-
- <para>You can get list of available time zones by running:</para>
-
-<screen role="nodump"><userinput>timedatectl list-timezones</userinput></screen>
-
- <note><para>The <command>timedatectl</command> command can
- be used only on a system booted with Systemd.</para></note>
-
- </sect2>
-
- <sect2>
- <title>Debugging the Boot Sequence</title>
-
- <para>There are several commands that can be used to help debug the systemd
- boot process. Here are some examples:</para>
-
- <itemizedlist>
- <listitem><para>systemctl list-units -t service [--all]</para></listitem>
- <listitem><para>systemctl list-units -t target [--all]</para></listitem>
- <listitem><para>systemctl show -p Wants multi-user.target</para></listitem>
- <listitem><para>systemctl status sshd.service</para></listitem>
- </itemizedlist>
-
- </sect2>
-
-</sect1>
diff --git a/chapter07/systemd-custom.xml b/chapter07/systemd-custom.xml
new file mode 100644
index 000000000..0c8ca75b9
--- /dev/null
+++ b/chapter07/systemd-custom.xml
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+
+<sect1 id="ch-scripts-systemd-custom">
+ <?dbhtml filename="systemd-custom.html"?>
+
+ <title>Systemd Usage and Configuration</title>
+
+ <indexterm zone="ch-scripts-systemd-custom">
+ <primary sortas="e-Systemd">Systemd Customization</primary>
+ </indexterm>
+
+ <sect2>
+ <title>Basic Configuration</title>
+
+ <para>The <filename>/etc/systemd/system.conf</filename> file contains a set
+ of options to control basic systemd operations. The default file has all
+ entries commented out with the default settings indicated. This file is
+ where the log level may be changed as well as some basic logging settings.
+ See <filename>systemd-system.conf(5)</filename> manual page for details on
+ each configuration option.</para>
+
+ </sect2>
+
+ <sect2>
+ <title>Disabling Screen Clearing at Boot Time</title>
+
+ <para>The normal behavior for systemd is to clear the screen at
+ the end of the boot sequence. If desired, this behavior may be
+ changed by running the following command:</para>
+
+<screen role="nodump"><userinput>mkdir -pv /etc/systemd/system/getty@tty1.service.d
+
+cat &gt; /etc/systemd/system/getty@tty1.service.d/noclear.conf &lt;&lt; EOF
+<literal>[Service]
+TTYVTDisallocate=no</literal>
+EOF</userinput></screen>
+
+ <para>The boot messages can always be revied by using the
+ <userinput>journalctl -b</userinput> command as the root user.</para>
+
+ </sect2>
+
+ <sect2>
+ <title>Disabling tmpfs for /tmp</title>
+
+ <para>By default, <filename class="directory">/tmp</filename> is created as
+ a tmpfs. If this is not desired, it can be overridden by the following:</para>
+
+<screen role="nodump"><userinput>ln -sfv /dev/null /etc/systemd/system/tmp.mount</userinput></screen>
+
+ <para>This is not necessary if there is a separate partition for
+ <filename class="directory">/tmp</filename> specified in
+ <filename>/etc/fstab</filename>.</para>
+
+ </sect2>
+
+ <sect2>
+ <title>Configuring Automatic File Creation and Deletion</title>
+
+ <para>There are several services that create or delete files or
+ directories:</para>
+
+ <itemizedlist>
+ <listitem><para>systemd-tmpfiles-clean.service</para></listitem>
+ <listitem><para>systemd-tmpfiles-setup-dev.service</para></listitem>
+ <listitem><para>systemd-tmpfiles-setup.service</para></listitem>
+ </itemizedlist>
+
+ <para>The system location for the configuration files is
+ <filename>/usr/lib/tmpfiles.d/*.conf</filename>. The local
+ configuration files are in
+ <filename class="directory">/etc/tmpfiles.d</filename>. Files in
+ <filename class="directory">/etc/tmpfiles.d</filename> override
+ files with the same name in
+ <filename class="directory">/usr/lib/tmpfiles.d</filename>. See
+ <filename>tmpfiles.d(5)</filename> manual page for file format
+ details.</para>
+
+ </sect2>
+
+ <sect2>
+ <title>Overriding Default Services Behavior</title>
+
+ <para>A systemd service contents can be overriden by creating a directory
+ and a configuration file in <filename
+ class="directory">/etc/systemd/system</filename>. For example:</para>
+
+<screen role="nodump"><userinput>mkdir -pv /etc/systemd/system/foobar.service.d
+
+cat > /etc/systemd/system/foobar.service.d/foobar.conf &lt;&lt; EOF
+<literal>[Service]
+Restart=always
+RestartSec=30</literal>
+EOF</userinput></screen>
+
+ <para>See <filename>systemd.unit(5)</filename> manual page for more
+ information. After creating the configuration file, run
+ <userinput>systemctl daemon-reload</userinput> and <userinput>systemctl
+ restart foobar</userinput> to activate the changes to a service.</para>
+
+ </sect2>
+
+ <sect2>
+ <title>Debugging the Boot Sequence</title>
+
+ <para>Rather than plain shell scripts used in SysVinit or BSD style init
+ systems, systemd uses a unified format for different type of startup
+ files (or units). The command <command>systemctl</command> is used to
+ enable, disable, controll state, and obtain status of unit files. Here
+ are some examples of frequently used commands:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><command>systemctl list-units -t <replaceable>&lt;service&gt;</replaceable> [--all]</command>:
+ lists loaded unit files of type service.</para>
+ </listitem>
+ <listitem>
+ <para><command>systemctl list-units -t <replaceable>&lt;target&gt;</replaceable> [--all]</command>:
+ lists loaded unit files of type target.</para>
+ </listitem>
+ <listitem>
+ <para><command>systemctl show -p Wants <replaceable>&lt;multi-user.target&gt;</replaceable></command>:
+ shows all units that depend on the multi-user target. Targets are
+ special unit files that are anogalous to runlevels under
+ SysVinit.</para>
+ </listitem>
+ <listitem>
+ <para><command>systemctl status <replaceable>&lt;servicename.service&gt;</replaceable></command>:
+ shows the status of the servicename service. The .service extension
+ can be omitted if there are no other unit files with the same name,
+ such as .socket files (which create a listening socket that provides
+ similar functionality to inetd/xinetd).</para>
+ </listitem>
+ </itemizedlist>
+
+ </sect2>
+
+ <sect2>
+ <title>Working with the Systemd Journal</title>
+
+ <para>Logging on a system booted with systemd is handled by
+ systemd-journald (default), rather than a typical unix syslog daemon.
+ systemd-journald write log entries to a binary file format, rather than
+ a plain text log file. To assist with parsing the file, the command
+ <command>journalctl</command> is provided. Here are some examples of
+ frequently used commands:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><command>journalctl -r</command>: shows all contents of the
+ journal in reverse chronological order.</para>
+ </listitem>
+ <listitem>
+ <para><command>journalctl -u <replaceable>UNIT</replaceable></command>:
+ shows the journal entries associated with the specified UNIT
+ file.</para>
+ </listitem>
+ <listitem>
+ <para><command>journalctl -b[=ID] -r</command>: shows the journal
+ entries since last successfull boot (or for boot ID) in reverse
+ chronological order.</para>
+ </listitem>
+ <listitem>
+ <para><command>journalctl -f</command>: povides functionality similar
+ to tail -f (follow).</para>
+ </listitem>
+ </itemizedlist>
+
+ </sect2>
+</sect1>
diff --git a/chapter07/udevd.xml b/chapter07/udevd.xml
new file mode 100644
index 000000000..548a2d2ee
--- /dev/null
+++ b/chapter07/udevd.xml
@@ -0,0 +1,337 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+
+<sect1 id="ch-scripts-udev">
+ <?dbhtml filename="udev.html"?>
+
+ <title>Device and Module Handling on an LFS System</title>
+
+ <indexterm zone="ch-scripts-udev">
+ <primary sortas="a-Udev">Udev</primary>
+ <secondary>usage</secondary>
+ </indexterm>
+
+ <para>In <xref linkend="chapter-building-system"/>, we installed Udev
+ from the systemd source 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>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.</para>
+
+ <para>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">devtmpfs</systemitem> file system (a virtual file system
+ that resides entirely in system memory). Device nodes do not require much
+ space, so the memory that is used is negligible.</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 was marked as deprecated for a long
+ period &ndash; due to a lack of maintenance &ndash; and was finally removed
+ from the kernel in June, 2006.</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 hardware configuration 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>
+
+ <sect3>
+ <title>Sysfs</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 for them. Drivers that
+ have been compiled into the kernel directly register their objects with a
+ <systemitem class="filesystem">sysfs</systemitem> (devtmpfs internally)
+ as they are detected by the kernel. For drivers compiled as modules, this
+ registration will happen when the module is loaded. Once the <systemitem
+ class="filesystem">sysfs</systemitem> filesystem is mounted (on /sys),
+ data which the drivers register with <systemitem
+ class="filesystem">sysfs</systemitem> are available to userspace
+ processes and to udevd for processing (including modifications to device
+ nodes).</para>
+
+ </sect3>
+
+ <sect3>
+ <title>Device Node Creation</title>
+
+ <para>Device files are created by the kernel by the <systemitem
+ class="filesystem">devtmpfs</systemitem> filesystem. Any driver that
+ wishes to register a device node will go through <systemitem
+ class="filesystem">devtmpfs</systemitem> (via the driver core) to do it.
+ When a <systemitem class="filesystem">devtmpfs</systemitem> instance is
+ mounted on <filename class="directory">/dev</filename>, the device node
+ will initially be created with a fixed name, permissions, and
+ owner.</para>
+
+ <para>A short time later, the kernel will send a uevent to <command>
+ udevd</command>. Based on the rules specified in the files within the
+ <filename class="directory">/etc/udev/rules.d</filename>, <filename
+ class="directory">/lib/udev/rules.d</filename>, and <filename
+ class="directory">/run/udev/rules.d</filename> directories, <command>
+ udevd</command> will create additional symlinks to the device node, or
+ change its permissions, owner, or group, or modify the internal
+ <command>udevd</command> database entry (name) for that object.</para>
+
+ <para>The rules in these three directories are numbered in a similar
+ fashion to the LFS-Bootscripts package and all three directories are
+ merged together. If <command>udevd</command> can't find a rule for the
+ device it is creating, it will leave the permissions and ownership at
+ whatever <systemitem class="filesystem">devtmpfs</systemitem> used
+ initially.</para>
+
+ </sect3>
+
+ <sect3>
+ <title>Module Loading</title>
+
+ <para>Device drivers compiled as modules may have aliases built into them.
+ Aliases are visible in the output of the <command>modinfo</command>
+ program and are usually related to the bus-specific identifiers of devices
+ supported by a module. For example, the <emphasis>snd-fm801</emphasis>
+ driver supports PCI devices with vendor ID 0x1319 and device ID 0x0801,
+ and has an alias of <quote>pci:v00001319d00000801sv*sd*bc04sc01i*</quote>.
+ For most devices, the bus driver exports the alias of the driver that
+ would handle the device via <systemitem
+ class="filesystem">sysfs</systemitem>. E.g., the
+ <filename>/sys/bus/pci/devices/0000:00:0d.0/modalias</filename> file
+ might contain the string
+ <quote>pci:v00001319d00000801sv00001319sd00001319bc04sc01i00</quote>.
+ The default rules provided with Udev will cause <command>udevd</command>
+ to call out to <command>/sbin/modprobe</command> with the contents of the
+ <envar>MODALIAS</envar> uevent environment variable (which should be the
+ same as the contents of the <filename>modalias</filename> file in sysfs),
+ thus loading all modules whose aliases match this string after wildcard
+ expansion.</para>
+
+ <para>In this example, this means that, in addition to
+ <emphasis>snd-fm801</emphasis>, the obsolete (and unwanted)
+ <emphasis>forte</emphasis> driver will be loaded if it is
+ available. See below for ways in which the loading of unwanted drivers can
+ be prevented.</para>
+
+ <para>The kernel itself is also able to load modules for network
+ protocols, filesystems and NLS support on demand.</para>
+
+ </sect3>
+
+ <sect3>
+ <title>Handling Hotpluggable/Dynamic Devices</title>
+
+ <para>When you plug in a device, such as a Universal Serial Bus (USB) MP3
+ player, the kernel recognizes that the device is now connected and
+ generates a uevent. This uevent is then handled by
+ <command>udevd</command> as described above.</para>
+
+ </sect3>
+
+ </sect2>
+
+ <sect2>
+ <title>Problems with Loading Modules and Creating Devices</title>
+
+ <para>There are a few possible problems when it comes to automatically
+ creating device nodes.</para>
+
+ <sect3>
+ <title>A kernel module is not loaded automatically</title>
+
+ <para>Udev will only load a module if it has a bus-specific alias and the
+ bus driver properly exports the necessary aliases to <systemitem
+ class="filesystem">sysfs</systemitem>. In other cases, one should
+ arrange module loading by other means. With Linux-&linux-version;, Udev is
+ known to load properly-written drivers for INPUT, IDE, PCI, USB, SCSI,
+ SERIO, and FireWire devices.</para>
+
+ <para>To determine if the device driver you require has the necessary
+ support for Udev, run <command>modinfo</command> with the module name as
+ the argument. Now try locating the device directory under
+ <filename class="directory">/sys/bus</filename> and check whether there is
+ a <filename>modalias</filename> file there.</para>
+
+ <para>If the <filename>modalias</filename> file exists in <systemitem
+ class="filesystem">sysfs</systemitem>, the driver supports the device and
+ can talk to it directly, but doesn't have the alias, it is a bug in the
+ driver. Load the driver without the help from Udev and expect the issue
+ to be fixed later.</para>
+
+ <para>If there is no <filename>modalias</filename> file in the relevant
+ directory under <filename class="directory">/sys/bus</filename>, this
+ means that the kernel developers have not yet added modalias support to
+ this bus type. With Linux-&linux-version;, this is the case with ISA
+ busses. Expect this issue to be fixed in later kernel versions.</para>
+
+ <para>Udev is not intended to load <quote>wrapper</quote> drivers such as
+ <emphasis>snd-pcm-oss</emphasis> and non-hardware drivers such as
+ <emphasis>loop</emphasis> at all.</para>
+
+ </sect3>
+
+ <sect3>
+ <title>A kernel module is not loaded automatically, and Udev is not
+ intended to load it</title>
+
+ <para>If the <quote>wrapper</quote> module only enhances the functionality
+ provided by some other module (e.g., <emphasis>snd-pcm-oss</emphasis>
+ enhances the functionality of <emphasis>snd-pcm</emphasis> by making the
+ sound cards available to OSS applications), configure
+ <command>modprobe</command> to load the wrapper after Udev loads the
+ wrapped module. To do this, add a <quote>softdep</quote> line in any
+ <filename>/etc/modprobe.d/<replaceable>&lt;filename&gt;</replaceable>.conf</filename>
+ file. For example:</para>
+
+<screen role="nodump"><literal>softdep snd-pcm post: snd-pcm-oss</literal></screen>
+
+ <para>Note that the <quote>softdep</quote> command also allows
+ <literal>pre:</literal> dependencies, or a mixture of both
+ <literal>pre:</literal> and <literal>post:</literal>. See the
+ <filename>modprobe.d(5)</filename> manual page for more information
+ on <quote>softdep</quote> syntax and capabilities.</para>
+
+ <para>If the module in question is not a wrapper and is useful by itself,
+ configure the <command>modules</command> bootscript to load this
+ module on system boot. To do this, add the module name to the
+ <filename>/etc/sysconfig/modules</filename> file on a separate line.
+ This works for wrapper modules too, but is suboptimal in that case.</para>
+
+ </sect3>
+
+ <sect3>
+ <title>Udev loads some unwanted module</title>
+
+ <para>Either don't build the module, or blacklist it in a
+ <filename>/etc/modprobe.d/blacklist.conf</filename> file as done with the
+ <emphasis>forte</emphasis> module in the example below:</para>
+
+<screen role="nodump"><literal>blacklist forte</literal></screen>
+
+ <para>Blacklisted modules can still be loaded manually with the
+ explicit <command>modprobe</command> command.</para>
+
+ </sect3>
+
+ <sect3>
+ <title>Udev creates a device incorrectly, or makes a wrong symlink</title>
+
+ <para>This usually happens if a rule unexpectedly matches a device. For
+ example, a poorly-written rule can match both a SCSI disk (as desired)
+ and the corresponding SCSI generic device (incorrectly) by vendor.
+ Find the offending rule and make it more specific, with the help of the
+ <command>udevadm info</command> command.</para>
+
+ </sect3>
+
+ <sect3>
+ <title>Udev rule works unreliably</title>
+
+ <para>This may be another manifestation of the previous problem. If not,
+ and your rule uses <systemitem class="filesystem">sysfs</systemitem>
+ attributes, it may be a kernel timing issue, to be fixed in later kernels.
+ For now, you can work around it by creating a rule that waits for the used
+ <systemitem class="filesystem">sysfs</systemitem> attribute and appending
+ it to the <filename>/etc/udev/rules.d/10-wait_for_sysfs.rules</filename>
+ file (create this file if it does not exist). Please notify the LFS
+ Development list if you do so and it helps.</para>
+
+ </sect3>
+
+ <sect3>
+ <title>Udev does not create a device</title>
+
+ <para>Further text assumes that the driver is built statically into the
+ kernel or already loaded as a module, and that you have already checked
+ that Udev doesn't create a misnamed device.</para>
+
+ <para>Udev has no information needed to create a device node if a kernel
+ driver does not export its data to <systemitem
+ class="filesystem">sysfs</systemitem>.
+ This is most common with third party drivers from outside the kernel
+ tree. Create a static device node in
+ <filename>/lib/udev/devices</filename> with the appropriate major/minor
+ numbers (see the file <filename>devices.txt</filename> inside the kernel
+ documentation or the documentation provided by the third party driver
+ vendor). The static device node will be copied to
+ <filename class="directory">/dev</filename> by the
+ <command>udev</command> bootscript.</para>
+
+ </sect3>
+
+ <sect3>
+ <title>Device naming order changes randomly after rebooting</title>
+
+ <para>This is due to the fact that Udev, by design, handles uevents and
+ loads modules in parallel, and thus in an unpredictable order. This will
+ never be <quote>fixed</quote>. You should not rely upon the kernel device
+ names being stable. Instead, create your own rules that make symlinks with
+ stable names based on some stable attributes of the device, such as a
+ serial number or the output of various *_id utilities installed by Udev.
+ See <xref linkend="ch-scripts-symlinks"/> and
+ <xref linkend="ch-scripts-network"/> for examples.</para>
+
+ </sect3>
+
+ </sect2>
+
+ <sect2>
+ <title>Useful Reading</title>
+
+ <para>Additional helpful documentation is available at the following
+ sites:</para>
+
+ <itemizedlist>
+
+ <listitem>
+ <para>A Userspace Implementation of <systemitem class="filesystem">devfs</systemitem>
+ <ulink url="http://www.kroah.com/linux/talks/ols_2003_udev_paper/Reprint-Kroah-Hartman-OLS2003.pdf"/></para>
+ </listitem>
+
+ <listitem>
+ <para>The <systemitem class="filesystem">sysfs</systemitem> Filesystem
+ <ulink url="http://www.kernel.org/pub/linux/kernel/people/mochel/doc/papers/ols-2005/mochel.pdf"/></para>
+ </listitem>
+
+ </itemizedlist>
+
+ </sect2>
+
+</sect1>
diff --git a/chapter08/fstab.xml b/chapter08/fstab.xml
index d1be334ee..91ad2dfe0 100644
--- a/chapter08/fstab.xml
+++ b/chapter08/fstab.xml
@@ -19,7 +19,7 @@
which must be checked (for integrity errors) prior to mounting. Create a new
file systems table like this:</para>
-<screen><userinput>cat &gt; /etc/fstab &lt;&lt; "EOF"
+<screen revision="sysv"><userinput>cat &gt; /etc/fstab &lt;&lt; "EOF"
<literal># Begin /etc/fstab
# file system mount-point type options dump fsck
@@ -36,6 +36,18 @@ devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
# End /etc/fstab</literal>
EOF</userinput></screen>
+<screen revision="systemd"><userinput>cat &gt; /etc/fstab &lt;&lt; "EOF"
+<literal># Begin /etc/fstab
+
+# file system mount-point type options dump fsck
+# order
+
+/dev/<replaceable>&lt;xxx&gt;</replaceable> / <replaceable>&lt;fff&gt;</replaceable> defaults 1 1
+/dev/<replaceable>&lt;yyy&gt;</replaceable> swap swap pri=1 0 0
+
+# End /etc/fstab</literal>
+EOF</userinput></screen>
+
<para>Replace <replaceable>&lt;xxx&gt;</replaceable>,
<replaceable>&lt;yyy&gt;</replaceable>, and <replaceable>&lt;fff&gt;</replaceable>
with the values appropriate for the system, for example, <filename
@@ -44,19 +56,6 @@ EOF</userinput></screen>
class="filesystem">ext4</systemitem>. For details on the six
fields in this file, see <command>man 5 fstab</command>.</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>Filesystems with MS-DOS or Windows origin (i.e.: vfat, ntfs, smbfs, cifs,
iso9660, udf) need the <quote>iocharset</quote> mount option in order for
non-ASCII characters in file names to be interpreted properly. The value
@@ -96,8 +95,6 @@ EOF</userinput></screen>
<quote>Default iocharset for FAT</quote> (<option>CONFIG_FAT_DEFAULT_IOCHARSET</option>).
There is no way to specify these settings for the
ntfs filesystem at kernel compilation time.</para>
- <!-- Personally, I find it more foolproof to always specify the iocharset and
- codepage in /etc/fstab for MS-based filesystems - Alexander E. Patrakov -->
<para>It is possible to make the ext3 filesystem reliable across power
failures for some hard disk types. To do this, add the
diff --git a/chapter08/grub.xml b/chapter08/grub.xml
index c0bc1d983..a8e484bd8 100644
--- a/chapter08/grub.xml
+++ b/chapter08/grub.xml
@@ -39,13 +39,13 @@ grub-mkrescue --output=grub-img.iso
xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso</userinput></screen>
<note><para>Most newer systems now come with system firmware that is in
- UEFI ((Unified Extensible Firmware Interface) mode by default. To boot LFS
+ UEFI (Unified Extensible Firmware Interface) mode by default. To boot LFS
on these systems using the instructions here, the UEFI Mode and Secure Boot
- capabilities need to be turned off. There are ways to boot with these
- capabilities still enabled, but are not covered here. For details, see
- <ulink
- url="http://www.linuxfromscratch.org/hints/downloads/files/lfs-uefi.txt">the
- lfs-uefi.txt hint</ulink> at
+ capabilities need to be turned off. There are ways to boot with these
+ capabilities still enabled, but then are not covered here. For details,
+ see <ulink
+ url="http://www.linuxfromscratch.org/hints/downloads/files/lfs-uefi.txt">
+ the lfs-uefi.txt hint</ulink> at
http://www.linuxfromscratch.org/hints/downloads/files/lfs-uefi.txt.</para></note>
</sect2>
diff --git a/chapter08/kernel.xml b/chapter08/kernel.xml
index d487327b4..d955625d7 100644
--- a/chapter08/kernel.xml
+++ b/chapter08/kernel.xml
@@ -65,24 +65,57 @@
information about configuring and building the kernel can be found at
<ulink url="http://www.kroah.com/lkn/"/> </para>
- <note><para>A good starting place for setting up the kernel configuration
- is to run <command>make defconfig</command>. This will set the base
- configuration to a good state that takes your current system architecture
- into account.</para>
+ <note>
+
+ <para>A good starting place for setting up the kernel configuration is to
+ run <command>make defconfig</command>. This will set the base
+ configuration to a good state that takes your current system architecture
+ into account.</para>
- <para>Be sure to configure the following features as shown:</para>
+ <para>Be sure to enable or disable following features or the system might
+ not work correctly or boot at all:</para>
- <screen role="nodump">
+ <screen role="nodump" revision="sysv">
Device Drivers ---&gt;
Generic Driver Options ---&gt;
[ ] Support for uevent helper [CONFIG_UEVENT_HELPER]
- [*] Maintain a devtmpfs filesystem to mount at /dev [CONFIG_DEVTMPFS]</screen></note>
+ [*] Maintain a devtmpfs filesystem to mount at /dev [CONFIG_DEVTMPFS]</screen>
+
+ <screen role="nodump" revision="systemd">
+ [*] open by fhandle syscalls [CONFIG_FHANDLE]
+ [ ] Auditing support [CONFIG_AUDIT]
+ [*] Control Group support [CONFIG_CGROUPS]
+Processor type and features ---&gt;
+ [*] Enable seccomp to safely compute untrusted bytecode [CONFIG_SECCOMP]
+Networking support ---&gt;
+ Networking options ---&gt;
+ &lt;*&gt; The IPv6 protocol [CONFIG_IPV6]
+Device Drivers ---&gt;
+ Generic Driver Options ---&gt;
+ [ ] Support for uevent helper [CONFIG_UEVENT_HELPER]
+ [*] Maintain a devtmpfs filesystem to mount at /dev [CONFIG_DEVTMPFS]
+ [ ] Fallback user-helper invocation for firmware loading [CONFIG_FW_LOADER_USER_HELPER]
+Firmware Drivers ---&gt;
+ [*] Export DMI identification via sysfs to userspace [CONFIG_DMIID]
+File systems ---&gt;
+ [*] Inotify support for userspace [CONFIG_INOTIFY_USER]
+ &lt;*&gt; Kernel automounter version 4 support (also supports v3) [CONFIG_AUTOFS4_FS]
+ Pseudo filesystems ---&gt;
+ [*] Tmpfs POSIX Access Control Lists [CONFIG_TMPFS_POSIX_ACL]
+ [*] Tmpfs extended attributes [CONFIG_TMPFS_XATTR]</screen>
+
+ </note>
+
+ <note revision="systemd">
+ <para>While "The IPv6 Protocol" is not strictly
+ required, it is highly recommended by the systemd developers.</para>
+ </note>
- <para>There are several other options that may be desired depending
- on the requirements for the system. For a list of options needed
- for BLFS packages, see the <ulink
- url="&lfs-root;blfs/view/&short-version;/longindex.html#kernel-config-index">BLFS
- Index of Kernel Settings</ulink>
+ <para revision="sysv">There are several other options that may be desired
+ depending on the requirements for the system. For a list of options needed
+ for BLFS packages, see the <ulink
+ url="&lfs-root;blfs/view/&short-version;/longindex.html#kernel-config-index">BLFS
+ Index of Kernel Settings</ulink>
(&lfs-root;blfs/view/&short-version;/longindex.html#kernel-config-index).</para>
<variablelist>
diff --git a/chapter09/reboot.xml b/chapter09/reboot.xml
index 7bba9015b..590244d23 100644
--- a/chapter09/reboot.xml
+++ b/chapter09/reboot.xml
@@ -73,8 +73,8 @@
<listitem><para>/etc/vimrc </para></listitem>
<listitem><para>/root/.bash_profile </para></listitem>
<listitem><para>/root/.bashrc </para></listitem>
- <listitem><para>/etc/sysconfig/network </para></listitem>
- <listitem><para>/etc/sysconfig/ifconfig.eth0 </para></listitem>
+ <listitem revision="sysv"><para>/etc/sysconfig/network </para></listitem>
+ <listitem revision="sysv"><para>/etc/sysconfig/ifconfig.eth0 </para></listitem>
</itemizedlist>
</listitem>
</itemizedlist>
diff --git a/chapter09/theend.xml b/chapter09/theend.xml
index e7d9f3068..2d29242b0 100644
--- a/chapter09/theend.xml
+++ b/chapter09/theend.xml
@@ -18,27 +18,57 @@
<primary sortas="e-/etc/lsb-release">/etc/lsb-release</primary>
</indexterm>
+ <indexterm zone="ch-finish-theend" revision="systemd">
+ <primary sortas="e-/etc/os-release">/etc/os-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>
+ <para revision="systemd">Create an <filename>/etc/os-release</filename>
+ file required by systemd:</para>
+
+<screen revision="systemd"><userinput>cat &gt; /etc/os-release &lt;&lt; "EOF"
+NAME="Linux From Scratch"
+VERSION="&versiond;"
+ID=lfs
+PRETTY_NAME="Linux From Scratch &versiond;"
+EOF</userinput></screen>
+
+ <para revision="sysv">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 revision="sysv"><userinput>echo &version; &gt; /etc/lfs-release</userinput></screen>
-<screen><userinput>echo &version; &gt; /etc/lfs-release</userinput></screen>
+ <para revision="systemd">Creating the file
+ <filename>/etc/lfs-release</filename> is recommended for compatibility with
+ the non-systemd branch. 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 revision="systemd"><userinput>echo &version; &gt; /etc/lfs-release</userinput></screen>
<para>It is also a good idea to create a file to show the status of your
new system with respect to the Linux Standards Base (LSB). To create
this file, run:</para>
-<screen><userinput>cat &gt; /etc/lsb-release &lt;&lt; "EOF"
+<screen revision="sysv"><userinput>cat &gt; /etc/lsb-release &lt;&lt; "EOF"
DISTRIB_ID="Linux From Scratch"
DISTRIB_RELEASE="&version;"
DISTRIB_CODENAME="&lt;your name here&gt;"
DISTRIB_DESCRIPTION="Linux From Scratch"
EOF</userinput></screen>
+<screen revision="systemd"><userinput>cat &gt; /etc/lsb-release &lt;&lt; "EOF"
+DISTRIB_ID="Linux From Scratch"
+DISTRIB_RELEASE="&versiond;"
+DISTRIB_CODENAME="&lt;your name here&gt;"
+DISTRIB_DESCRIPTION="Linux From Scratch"
+EOF</userinput></screen>
+
<para>Be sure to put some sort of customization for the field
'DISTRIB_CODENAME' to make the system uniquely yours.</para>
diff --git a/general.ent b/general.ent
index aba0995e5..2a0eb55f7 100644
--- a/general.ent
+++ b/general.ent
@@ -1,10 +1,15 @@
-<!ENTITY version "SVN-20160516">
-<!ENTITY short-version "svn"> <!-- Used below in &blfs-book;. Change to x.y for release
- but not -rc releases -->
+<!ENTITY version "SVN-20160516-merge">
+<!ENTITY short-version "svn"> <!-- Used below in &blfs-book;
+ Change to x.y for release but not -rc releases -->
+<!ENTITY generic-version "development"> <!-- Use "development" or "x.y[-pre{x}]" -->
+
+<!ENTITY versiond "20160407-systemd-merge">
+<!ENTITY short-versiond "systemd">
+<!ENTITY generic-versiond "systemd">
+
<!ENTITY releasedate "May 16, 2016">
<!ENTITY copyrightdate "1999-2016"><!-- jhalfs needs a literal dash, not &ndash; -->
<!ENTITY milestone "7.10">
-<!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
<!ENTITY lfs-root "http://www.linuxfromscratch.org/">
<!ENTITY blfs-root "&lfs-root;blfs/">
@@ -18,7 +23,12 @@
<!ENTITY test-results "&lfs-root;lfs/build-logs/&generic-version;/">
<!ENTITY errata "&lfs-root;lfs/errata/&generic-version;/">
<!ENTITY min-kernel "2.6.32">
-
+
+<!ENTITY patches-rootd "&lfs-root;patches/lfs/&generic-versiond;/">
+<!ENTITY downloads-rootd "&lfs-root;lfs/downloads/&generic-versiond;/">
+<!ENTITY test-resultsd "&lfs-root;lfs/build-logs/&generic-versiond;/">
+<!ENTITY erratad "&lfs-root;lfs/errata/&generic-versiond;/">
+
<!ENTITY lfs-ticket-root "http://wiki.linuxfromscratch.org/lfs/ticket/">
<!ENTITY anduin-sources "http://anduin.linuxfromscratch.org/LFS">
diff --git a/indexd.xml b/indexd.xml
new file mode 100644
index 000000000..a733fb3c8
--- /dev/null
+++ b/indexd.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "general.ent">
+ %general-entities;
+]>
+<book>
+
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="prologue/bookinfo.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="prologue/preface.xml"/>
+
+<part id="part1">
+<title>Introduction</title>
+<?dbhtml filename="part1.html"?>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter01/chapter01.xml"/>
+</part>
+
+
+<part id="part2">
+<title>Preparing for the Build</title>
+<?dbhtml filename="part2.html"?>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter02/chapter02.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter03/chapter03.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter04/chapter04.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter05/chapter05.xml"/>
+</part>
+
+<part id="part3">
+<title>Building the LFS System</title>
+<?dbhtml filename="part3.html"?>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter06/chapter06d.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter07/chapter07d.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter08/chapter08.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chapter09/chapter09.xml"/>
+</part>
+
+<part id="part4">
+<title>Appendices</title>
+<?dbhtml filename="part4.html"?>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="appendices/acronymlist.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="appendices/acknowledgments.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="appendices/dependencies.xml"/>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="appendices/license.xml"/>
+</part>
+
+<index/>
+
+</book>
+
diff --git a/packages.ent b/packages.ent
index dd6b2dd04..485ddb409 100644
--- a/packages.ent
+++ b/packages.ent
@@ -106,6 +106,14 @@
<!ENTITY coreutils-ch6-du "168 MB">
<!ENTITY coreutils-ch6-sbu "2.6 SBU">
+<!ENTITY dbus-version "1.10.6">
+<!ENTITY dbus-size "1,908 KB">
+<!ENTITY dbus-url "http://dbus.freedesktop.org/releases/dbus/dbus-&dbus-version;.tar.gz">
+<!ENTITY dbus-md5 "26d0cf3a1c9782cb0e342101f0450440">
+<!ENTITY dbus-home "http://www.freedesktop.org/wiki/Software/dbus">
+<!ENTITY dbus-ch6-du "23 MB">
+<!ENTITY dbus-ch6-sbu "0.2 SBU">
+
<!ENTITY dejagnu-version "1.6">
<!ENTITY dejagnu-size "512 KB">
<!ENTITY dejagnu-url "&gnu;dejagnu/dejagnu-&dejagnu-version;.tar.gz">
@@ -541,6 +549,14 @@
<!ENTITY sysklogd-ch6-du "0.6 MB">
<!ENTITY sysklogd-ch6-sbu "less than 0.1 SBU">
+<!ENTITY systemd-version "229">
+<!ENTITY systemd-size "3,844 KB">
+<!ENTITY systemd-url "http://anduin.linuxfromscratch.org/sources/other/systemd/systemd-&systemd-version;.tar.xz">
+<!ENTITY systemd-md5 "5d5115ee08affe005f821bc5ea3171e8">
+<!ENTITY systemd-home "http://www.freedesktop.org/wiki/Software/systemd/">
+<!ENTITY systemd-ch6-du "1.1 GB">
+<!ENTITY systemd-ch6-sbu "5.1 SBU">
+
<!ENTITY sysvinit-version "2.88dsf">
<!ENTITY sysvinit-size "108 KB">
<!ENTITY sysvinit-url "&savannah;/releases/sysvinit/sysvinit-&sysvinit-version;.tar.bz2">
diff --git a/patches.ent b/patches.ent
index c5a871847..f3632da58 100644
--- a/patches.ent
+++ b/patches.ent
@@ -41,3 +41,8 @@
<!ENTITY sysvinit-consolidated-patch "sysvinit-&sysvinit-version;-consolidated-1.patch">
<!ENTITY sysvinit-consolidated-patch-md5 "0b7b5ea568a878fdcc4057b2bf36e5cb">
<!ENTITY sysvinit-consolidated-patch-size "3.9 KB">
+
+<!ENTITY systemd-compat-patch "systemd-&systemd-version;-compat-1.patch">
+<!ENTITY systemd-compat-patch-md5 "8a9b70794ead5a87297d7ccd7a753d78">
+<!ENTITY systemd-compat-patch-size "12 KB">
+
diff --git a/prologue/bookinfo.xml b/prologue/bookinfo.xml
index a44a137a5..6887ace1d 100644
--- a/prologue/bookinfo.xml
+++ b/prologue/bookinfo.xml
@@ -7,8 +7,8 @@
<bookinfo>
<title>Linux From Scratch</title>
- <subtitle>Version &version;</subtitle>
-
+ <subtitle revision='sysv' >Version &version; </subtitle>
+ <subtitle revision='systemd'>Version &versiond;</subtitle>
<authorgroup>
<author>
@@ -16,18 +16,26 @@
<surname>Beekmans</surname>
</author>
<author>
- <firstname>Managing Editor is Bruce</firstname>
+ <firstname>Managing Editor: Bruce</firstname>
<surname>Dubbs</surname>
</author>
+ <author revision="systemd">
+ <firstname>Editor: Douglas R.</firstname>
+ <surname>Reno</surname>
+ </author>
+ <author revision="systemd">
+ <firstname>Editor: DJ</firstname>
+ <surname>Lucas</surname>
+ </author>
</authorgroup>
-
<copyright id="copyright">
<year>&copyrightdate;</year>
<holder>Gerard Beekmans</holder>
</copyright>
<legalnotice>
+
<para>Copyright &copy; &copyrightdate;, Gerard Beekmans</para>
<para>All rights reserved.</para>