diff --git a/chapter06/createfiles.xml b/chapter06/createfiles.xml
index d988d4e14..306a60121 100644
--- a/chapter06/createfiles.xml
+++ b/chapter06/createfiles.xml
@@ -18,10 +18,6 @@
/etc/group
-
- /var/run/utmp
-
-
/var/log/btmp
@@ -151,11 +147,13 @@ ln -sv bash /bin/sh
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:64:64:systemd Bus Proxy Daemon:/:/bin/false
-systemd-journal-gateway:x:65:65:systemd Journal Gateway Daemon:/:/bin/false
-systemd-network:x:66:66:systemd Network Daemon:/:/bin/false
-systemd-resolve:x:67:67:systemd Resolve Daemon:/:/bin/false
-systemd-timesync:x:68:68:systemd Time Sync Daemon:/:/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
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
EOF
@@ -187,11 +185,13 @@ messagebus:x:18:
systemd-journal:x:23:
input:x:24:
mail:x:34:
-systemd-bus-proxy:x:64:
-systemd-journal-gateway:x:65:
-systemd-network:x:66:
-systemd-resolve:x:67:
-systemd-timesync:x:68:
+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:
nogroup:x:99:
users:x:999:
EOF
diff --git a/chapter06/systemd.xml.next b/chapter06/systemd.xml.next
new file mode 100644
index 000000000..306ca901f
--- /dev/null
+++ b/chapter06/systemd.xml.next
@@ -0,0 +1,678 @@
+
+
+ %general-entities;
+]>
+
+
+
+
+
+ systemd
+ &systemd-version;
+ &systemd-url;
+
+
+ Systemd-&systemd-version;
+
+
+ systemd
+
+
+
+
+
+ The systemd package contains programs for controlling the startup,
+ running, and shutdown of the system.
+
+
+ &buildtime;
+ &diskspace;
+
+
+ &systemd-ch6-sbu;
+ &systemd-ch6-du;
+
+
+
+
+
+ Installation of systemd
+
+ First, create a file to allow systemd to build when using Util-Linux
+ built in Chapter 5 and disable LTO by default:
+
+cat > config.cache << "EOF"
+KILL=/bin/kill
+HAVE_BLKID=1
+BLKID_LIBS="-lblkid"
+BLKID_CFLAGS="-I/tools/include/blkid"
+cc_cv_CFLAGS__flto=no
+EOF
+
+ LTO is disabled by default because it causes systemd
+ and other auxiliary programs to link to libgcc_s.so, slows the build down and makes the
+ compiled code larger.
+
+ Additionally, fix a build error when using Util-Linux built in
+ Chapter 5:
+
+sed -i "s:blkid/::" $(grep -rl "blkid/blkid.h")
+
+ Apply a patch so that compat pkg-config files get
+ installed without installing compat libs which are useless on LFS:
+
+patch -Np1 -i ../&systemd-compat-patch;
+
+ Prepare systemd for compilation:
+
+./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --config-cache \
+ --with-rootprefix= \
+ --with-rootlibdir=/lib \
+ --enable-split-usr \
+ --disable-gudev \
+ --disable-ldconfig \
+ --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
+
+
+ The meaning of the configure options:
+
+
+ --config-cache
+
+ This switch tells the build system to use
+ the config.cache file which
+ was created earlier.
+
+
+
+
+ --with-root*
+
+ These switches ensure that core programs and
+ shared libraries are installed in the subdirectories
+ of the root partition.
+
+
+
+
+ --enable-split-usr
+
+ This switch ensures that systemd will work on
+ systems where /bin, /lib and /sbin directories are not
+ symlinks to their /usr counterparts.
+
+
+
+
+ --disable-gudev --without-python
+
+ These switches disable optional features because
+ LFS does not provide their dependencies.
+
+
+
+
+ --disable-ldconfig
+
+ This switch prevents installation of a systemd
+ unit that runs ldconfig 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.
+
+
+
+
+ --with-dbus*
+
+ These switches ensure that D-Bus configuration files
+ get installed in the correct locations.
+
+
+
+
+
+ Compile the package:
+
+make LIBRARY_PATH=/tools/lib
+
+ If you are going to run the test suite, first prevent a few test
+ cases from running because they fail in a chroot environment:
+
+sed -e "s:test/udev-test.pl::g" \
+ -e "s:test-bus-cleanup\$(EXEEXT) ::g" \
+ -e "s:test-bus-gvariant\$(EXEEXT) ::g" \
+ -e "s:test-dhcp6-client\$(EXEEXT) ::g" \
+ -e "s:test-journal-flush\$(EXEEXT) ::g" \
+ -e "s:test-path-util\$(EXEEXT) ::g" \
+ -e "s:test-sched-prio\$(EXEEXT) ::g" \
+ -e "s:test-strv\$(EXEEXT) ::g" \
+ -i Makefile
+
+ To test the results, issue:
+
+make check
+
+ Install the package:
+
+make LD_LIBRARY_PATH=/tools/lib install
+
+ Prevent systemd units that are not needed on a LFS system from running:
+
+rm -fv /lib/systemd/system/sysinit.target.wants/systemd-{firstboot,sysusers,update-done}.service
+
+ Move NSS libraries to /lib:
+
+mv -v /usr/lib/libnss_{myhostname,mymachines,resolve}.so.2 /lib
+
+ Remove an unnecessary directory:
+
+rm -rfv /usr/lib/rpm
+
+ Create the Sysvinit compatibility symlinks, so systemd is used
+ as the default init system:
+
+for tool in runlevel reboot shutdown poweroff halt telinit; do
+ ln -sfv ../bin/systemctl /sbin/${tool}
+done
+ln -sfv ../lib/systemd/systemd /sbin/init
+
+ Remove a reference to a non-existent group:
+
+sed -i "s:0775 root lock:0755 root root:g" /usr/lib/tmpfiles.d/legacy.conf
+
+ Create the /etc/machine-id file needed by
+ Journald:
+
+systemd-machine-id-setup
+
+
+
+
+ Contents of systemd
+
+
+ Installed programs
+ Installed libraries
+ Installed directories
+
+
+ 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-firstboot,
+ systemd-inhibit, systemd-machine-id-setup, systemd-notify, systemd-nspawn,
+ systemd-path, systemd-run, systemd-stdio-bridge, systemd-sysusers,
+ systemd-tmpfiles, systemd-tty-ask-password-agent, telinit, timedatectl,
+ and udevadm
+ libnss_myhostname.so.2, libnss_mymachines.so.2, libnss_resolve.so.2,
+ libsystemd.so, libudev.so
+ /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/sysusers.d,
+ /usr/lib/tmpfiles.d, /usr/share/doc/systemd-&systemd-version;,
+ /usr/share/factory, /usr/share/systemd, /var/lib/systemd,
+ /var/log/journal
+
+
+
+
+ Short Descriptions
+
+
+
+
+ bootctl
+
+ used to query the firmware and boot manager settings.
+
+ bootctl
+
+
+
+
+
+ busctl
+
+ Used to introspect and monitor the D-Bus bus.
+
+ busctl
+
+
+
+
+
+ coredumpctl
+
+ Used to retrieve coredumps from the systemd Journal
+
+ coredumpctl
+
+
+
+
+
+ halt
+
+ Normally invokes shutdown with the
+ -h option, except when already in run-level 0,
+ then it tells the kernel to halt the system; it notes in the
+ file /var/log/wtmp that the system is being
+ brought down.
+
+ halt
+
+
+
+
+
+ hostnamectl
+
+ Used to query and change the system hostname and related
+ settings.
+
+ hostnamectl
+
+
+
+
+
+ init
+
+ 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.
+
+ init
+
+
+
+
+
+ journalctl
+
+ Used to query the contents of the systemd Journal.
+
+ journalctl
+
+
+
+
+
+ kernel-install
+
+ Used to add and remove kernel and initramfs images to and
+ from /boot.
+
+ kernel-install
+
+
+
+
+
+ localectl
+
+ Used to query and change the system locale and keyboard layout
+ settings.
+
+ localectl
+
+
+
+
+
+ loginctl
+
+ Used to introspect and control the state of the systemd Login
+ Manager.
+
+ loginctl
+
+
+
+
+
+ machinectl
+
+ Used to introspect and control the state of the systemd Virtual
+ Machine and Container Registration Manager
+
+ machinectl
+
+
+
+
+
+ poweroff
+
+ Tells the kernel to halt the system and switch off the computer
+ (see halt).
+
+ poweroff
+
+
+
+
+
+ reboot
+
+ Tells the kernel to reboot the system (see
+ halt).
+
+ reboot
+
+
+
+
+
+ runlevel
+
+ Reports the previous and the current run-level, as noted in the
+ last run-level record in /var/run/utmp.
+
+ runlevel
+
+
+
+
+
+ shutdown
+
+ Brings the system down in a secure way, signaling all processes
+ and notifying all logged-in users.
+
+ shutdown
+
+
+
+
+
+ systemctl
+
+ Used to introspect and control the state of the systemd system and
+ service manager.
+
+ systemctl
+
+
+
+
+
+ systemd-analyze
+
+ Used to determine system boot-up performance of the current boot.
+
+
+ systemd-analyze
+
+
+
+
+
+ systemd-ask-password
+
+ Used to query a system password or passphrase from the user, using a
+ question message specified on the command line.
+
+ systemd-ask-password
+
+
+
+
+
+ systemd-cat
+
+ Used to connect STDOUT and STDERR of a process with the Journal.
+
+
+ systemd-cat
+
+
+
+
+
+ systemd-cgls
+
+ Recursively shows the contents of the selected Linux control group
+ hierarchy in a tree.
+
+ systemd-cgls
+
+
+
+
+
+ systemd-cgtop
+
+ Shows the top control groups of the local Linux control group hierarchy,
+ ordered by their CPU, memory and disk I/O load.
+
+ systemd-cgtop
+
+
+
+
+
+ systemd-delta
+
+ Used to identify and compare configuration files in
+ /etc that override default
+ counterparts in /usr.
+
+ systemd-delta
+
+
+
+
+
+ systemd-detect-virt
+
+ Detects execution in a virtualized environment.
+
+ systemd-detect-virt
+
+
+
+
+
+ systemd-escape
+
+ Used to escape strings for inclusion in systemd unit names.
+
+ systemd-escape
+
+
+
+
+
+ systemd-firstboot
+
+ Initializes the most basic system settings interactively on the
+ first boot.
+
+ systemd-firstboot
+
+
+
+
+
+ systemd-inhibit
+
+ Used to execute a program with a shutdown, sleep or idle inhibitor lock
+ taken.
+
+ systemd-inhibit
+
+
+
+
+
+ systemd-machine-id-setup
+
+ Used by system installer tools to initialize the machine ID stored in
+ /etc/machine-id at install time with a randomly
+ generated ID.
+
+ systemd-machine-id-setup
+
+
+
+
+
+ systemd-notify
+
+ Used by daemon scripts to notify the init system about status changes.
+
+
+ systemd-notify
+
+
+
+
+
+ systemd-nspawn
+
+ Used to run a command or OS in a light-weight namespace container.
+
+ systemd-nspawn
+
+
+
+
+
+ systemd-path
+
+ Used to query system and user paths.
+
+ systemd-path
+
+
+
+
+
+ systemd-run
+
+ Used to create and start a transient .service or a .scope unit and
+ run the specified command in it.
+
+ systemd-run
+
+
+
+
+
+
+
+ systemd-sysusers
+
+ Creates system users and groups, based on the file format and location
+ specified in sysusers.d.
+
+ systemd-sysusers
+
+
+
+
+
+ systemd-tmpfiles
+
+ Creates, deletes and cleans up volatile and temporary files and directories,
+ based on the configuration file format and location specified in
+ tmpfiles.d directories.
+
+ systemd-tmpfiles
+
+
+
+
+
+ systemd-tty-ask-password-agent
+
+ Used to list or process pending systemd password requests
+
+ systemd-tty-ask-password-agent
+
+
+
+
+
+ telinit
+
+ Tells init which run-level to change to.
+
+ telinit
+
+
+
+
+
+ timedatectl
+
+ Used to query and change the system clock and its settings.
+
+
+ timedatectl
+
+
+
+
+
+ udevadm
+
+ 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.
+
+ udevadm
+
+
+
+
+
+ libsystemd
+
+ systemd utility library.
+
+ libsystemd
+
+
+
+
+
+ libudev
+
+ A library to access Udev device information.
+
+ libudev
+
+
+
+
+
+
+
+
+