From fcc027677da55c41dcaea045f5b9ff8b088e6495 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sun, 7 Jun 2020 20:16:00 +0000 Subject: Initial commit of alternative cross LFS git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11897 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter09/etcshells.xml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 chapter09/etcshells.xml (limited to 'chapter09/etcshells.xml') diff --git a/chapter09/etcshells.xml b/chapter09/etcshells.xml new file mode 100644 index 000000000..30961c80c --- /dev/null +++ b/chapter09/etcshells.xml @@ -0,0 +1,49 @@ + + + %general-entities; +]> + + + + + + Creating the /etc/shells File + + + /etc/shells + + + The shells 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 (/). + + For example, this file is consulted by chsh + 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. + + It is a requirement for applications such as + GDM which does not populate the + face browser if it can't find /etc/shells, or + FTP daemons which traditionally disallow access to users + with shells not included in this file. + +cat > /etc/shells << "EOF" +# Begin /etc/shells + +/bin/sh +/bin/bash + +# End /etc/shells +EOF + + -- cgit v1.2.3-54-g00ecf From a3d0817020eee2b1ea6ebfe10f3a0ea9e26829be Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Fri, 12 Jun 2020 20:42:32 +0000 Subject: Text updated for cross2 chapter 9 git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11928 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter09/etcshells.xml | 2 +- chapter09/inputrc.xml | 6 +- chapter09/introduction.xml | 142 ++------------------------------------------- chapter09/network.xml | 16 +---- chapter09/profile.xml | 10 ++-- chapter09/symlinks.xml | 46 +++++++-------- chapter09/udev.xml | 24 ++++---- chapter09/usage.xml | 68 ++++------------------ 8 files changed, 62 insertions(+), 252 deletions(-) (limited to 'chapter09/etcshells.xml') diff --git a/chapter09/etcshells.xml b/chapter09/etcshells.xml index 30961c80c..a0d5f21a8 100644 --- a/chapter09/etcshells.xml +++ b/chapter09/etcshells.xml @@ -23,7 +23,7 @@ The shells 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 + present, consisting of the shell's path relative to the root of the directory structure (/). For example, this file is consulted by chsh diff --git a/chapter09/inputrc.xml b/chapter09/inputrc.xml index 00d36877f..de5401d2c 100644 --- a/chapter09/inputrc.xml +++ b/chapter09/inputrc.xml @@ -15,14 +15,14 @@ The inputrc file is the configuration file for - the Readline library, which provides editing capabilities while the user is + the readline library, which provides editing capabilities while the user is entering a line from the terminal. It works by translating keyboard inputs - into specific actions. Readline is used by Bash and most other shells as + into specific actions. Readline is used by bash and most other shells as well as many other applications. Most people do not need user-specific functionality so the command below creates a global /etc/inputrc used by everyone who - logs in. If you later decide you need to override the defaults on a per-user + logs in. If you later decide you need to override the defaults on a per user basis, you can create a .inputrc file in the user's home directory with the modified mappings. diff --git a/chapter09/introduction.xml b/chapter09/introduction.xml index cbc197a7b..875003f14 100644 --- a/chapter09/introduction.xml +++ b/chapter09/introduction.xml @@ -18,12 +18,6 @@ process must be organized to ensure the tasks are performed in the correct order but, at the same time, be executed as fast as possible. - - System V @@ -39,15 +33,13 @@ /etc/inittab file and is organized into run levels that can be run by the user: - -0 — halt +0 — halt 1 — Single user mode 2 — Multiuser, without networking 3 — Full multiuser mode 4 — User definable 5 — Full multiuser mode with display manager -6 — reboot - +6 — reboot The usual default run level is 3 or 5. @@ -69,7 +61,7 @@ - Slower to boot. A medium speed base LFS system + May be slower to boot. A medium speed base LFS system takes 8-12 seconds where the boot time is measured from the first kernel message to the login prompt. Network connectivity is typically established about 2 seconds @@ -94,132 +86,6 @@ - - + diff --git a/chapter09/network.xml b/chapter09/network.xml index b527258ee..45cd1d438 100644 --- a/chapter09/network.xml +++ b/chapter09/network.xml @@ -13,17 +13,7 @@ network configuring - + Creating Network Interface Configuration Files @@ -37,7 +27,7 @@ address(es), subnet masks, and so forth. It is necessary that the stem of the filename be ifconfig. - If the procedure in the previous section was not used, Udev + If the procedure in the previous section was not used, udev will 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 ip link or ls @@ -64,7 +54,7 @@ EOF If the ONBOOT variable is set to yes the System V network script will bring up the Network Interface Card (NIC) during - booting of the system. If set to anything but yes the NIC + the system boot process. If set to anything but yes the NIC will be ignored by the network script and not be automatically brought up. The interface can be manually started or stopped with the ifup and ifdown commands. diff --git a/chapter09/profile.xml b/chapter09/profile.xml index 226dd9fac..ec39d3a30 100644 --- a/chapter09/profile.xml +++ b/chapter09/profile.xml @@ -103,8 +103,8 @@ LC_ALL=<locale name> locale int_prefix 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. + that your locale was either not installed in + or is not supported by the default installation of Glibc. locale: Cannot set LC_* to default locale: No such file or directory @@ -114,7 +114,7 @@ LC_ALL=<locale name> locale int_prefix Glibc. - Some packages beyond LFS may also lack support for your chosen locale. One + 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 @@ -145,7 +145,7 @@ export LANG=<ll>_<CC>.<charmap><@modifiers> # End /etc/profile EOF - The C (default) and en_US (the recommended + The C (default) and en_US.utf8 (the recommended one for United States English users) locales are different. C 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 ls command diff --git a/chapter09/symlinks.xml b/chapter09/symlinks.xml index 951e6976d..3b46a67b0 100644 --- a/chapter09/symlinks.xml +++ b/chapter09/symlinks.xml @@ -21,7 +21,7 @@ discovered. For example, on a computer having two network cards made by Intel and Realtek, the network card manufactured by Intel may become eth0 and the Realtek card becomes eth1. In some cases, after a reboot the cards - get renumbered the other way around. + could get renumbered the other way around. In the new naming scheme, typical network device names would then be something like enp5s0 or wlp3s0. If this naming convention is not @@ -44,7 +44,7 @@ Creating Custom Udev Rules - The naming scheme can be customized by creating custom Udev + The naming scheme can be customized by creating custom udev rules. A script has been included that generates the initial rules. Generate these rules by running: @@ -68,24 +68,24 @@ along with its driver in parentheses, if the driver can be found. Neither the hardware ID nor the driver is used to determine which name to give an interface; this information is only for reference. The second line is the - Udev rule that matches this NIC and actually assigns it a name. + udev rule that matches this NIC and actually assigns it a name. - All Udev rules are made up of several keys, separated by commas and + All udev rules are made up of several keys, separated by commas and optional whitespace. This rule's keys and an explanation of each of them are as follows: - SUBSYSTEM=="net" - This tells Udev to ignore + SUBSYSTEM=="net" - This tells udev to ignore devices that are not network cards. - ACTION=="add" - This tells Udev to ignore this + ACTION=="add" - This tells udev to ignore this rule for a uevent that isn't an add ("remove" and "change" uevents also happen, but don't need to rename network interfaces). - DRIVERS=="?*" - This exists so that Udev will + DRIVERS=="?*" - This exists so that udev will ignore VLAN or bridge sub-interfaces (because these sub-interfaces do not have drivers). These sub-interfaces are skipped because the name that would be assigned would collide with their parent devices. @@ -96,14 +96,14 @@ ATTR{type}=="1" - This ensures the rule only - matches the primary interface in the case of certain wireless drivers, + matches the primary interface in the case of certain wireless drivers which create multiple virtual interfaces. The secondary interfaces are skipped for the same reason that VLAN and bridge sub-interfaces are skipped: there would be a name collision otherwise. NAME - The value of this key is the name that - Udev will assign to this interface. + udev will assign to this interface. @@ -133,8 +133,8 @@ default for USB and FireWire devices), where the rules it creates depend on the physical path to the CD or DVD device. Second, it can operate in by-id mode (default for IDE and SCSI devices), where the - rules it creates depend on identification strings stored in the CD or DVD - device itself. The path is determined by Udev's path_id + rules it creates depend on identification strings stored on the CD or DVD + device itself. The path is determined by udev's path_id script, and the identification strings are read from the hardware by its ata_id or scsi_id programs, depending on which type of device you have. @@ -159,11 +159,11 @@ External devices (for example, a USB-connected CD drive) should not use by-path persistence, because each time the device is plugged into a new external port, its physical path will change. All - externally-connected devices will have this problem if you write Udev rules + externally-connected devices will have this problem if you write udev rules to recognize them by their physical path; the problem is not limited to CD and DVD drives. - If you wish to see the values that the Udev scripts will use, then + If you wish to see the values that the udev scripts will use, then for the appropriate CD-ROM device, find the corresponding directory under /sys (e.g., this can be /sys/block/hdd) and @@ -182,18 +182,18 @@ as follows (where mode is one of by-id or by-path): -sed -i -e 's/"write_cd_rules"/"write_cd_rules mode"/' \ - /etc/udev/rules.d/83-cdrom-symlinks.rules +sed -e 's/"write_cd_rules"/"write_cd_rules mode"/' \ + -i /etc/udev/rules.d/83-cdrom-symlinks.rules Note that it is not necessary to create the rules files or symlinks - at this time, because you have bind-mounted the host's - /dev directory into the LFS system, + at this time because you have bind-mounted the host's + /dev directory into the LFS system and we assume the symlinks exist on the host. The rules and symlinks will be created the first time you boot your LFS system. However, if you have multiple CD-ROM devices, then the symlinks generated at that time may point to different devices than they point to on - your host, because devices are not discovered in a predictable order. The + your host because devices are not discovered in a predictable order. The assignments created when you first boot the LFS system will be stable, so this is only an issue if you need the symlinks on both systems to point to the same device. If you need that, then inspect (and possibly edit) the @@ -212,9 +212,9 @@ E.g., if you have a USB web camera and a TV tuner, sometimes /dev/video0 refers to the camera and /dev/video1 refers to the tuner, and sometimes - after a reboot the order changes to the opposite one. + after a reboot the order changes. For all classes of hardware except sound cards and network cards, this is - fixable by creating Udev rules for custom persistent symlinks. + fixable by creating udev rules for custom persistent symlinks. The case of network cards is covered separately in , and sound card configuration can be found in BLFS. @@ -237,10 +237,8 @@ cat > /etc/udev/rules.d/83-duplicate_devs.rules << "EOF" # 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" +KERNEL=="video*", ATTRS{idProduct}=="1910", ATTRS{idVendor}=="0d81", SYMLINK+="webcam" +KERNEL=="video*", ATTRS{device}=="0x036f", ATTRS{vendor}=="0x109e", SYMLINK+="tvtuner" EOF diff --git a/chapter09/udev.xml b/chapter09/udev.xml index 6060849be..508795a03 100644 --- a/chapter09/udev.xml +++ b/chapter09/udev.xml @@ -15,7 +15,7 @@ usage - In , we installed the Udev + In , we installed the udev package when eudev systemd was built. Before we go into the details regarding how this works, a brief history of previous methods of @@ -30,7 +30,7 @@ major and minor device numbers for every possible device that might exist in the world. - Using the Udev method, only those devices which are detected by the + 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 devtmpfs file system (a virtual file system @@ -135,7 +135,7 @@ /sys/bus/pci/devices/0000:00:0d.0/modalias file might contain the string pci:v00001319d00000801sv00001319sd00001319bc04sc01i00. - The default rules provided with Udev will cause udevd + The default rules provided with udev will cause udevd to call out to /sbin/modprobe with the contents of the MODALIAS uevent environment variable (which should be the same as the contents of the modalias file in sysfs), @@ -149,7 +149,7 @@ be prevented. The kernel itself is also able to load modules for network - protocols, filesystems and NLS support on demand. + protocols, filesystems, and NLS support on demand. @@ -177,12 +177,12 @@ Udev will only load a module if it has a bus-specific alias and the bus driver properly exports the necessary aliases to sysfs. In other cases, one should - arrange module loading by other means. With Linux-&linux-version;, Udev is + 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. To determine if the device driver you require has the necessary - support for Udev, run modinfo with the module name as + support for udev, run modinfo with the module name as the argument. Now try locating the device directory under /sys/bus and check whether there is a modalias file there. @@ -190,7 +190,7 @@ If the modalias file exists in sysfs, 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 + driver. Load the driver without the help from udev and expect the issue to be fixed later. If there is no modalias file in the relevant @@ -206,7 +206,7 @@ - A kernel module is not loaded automatically, and Udev is not + <title>A kernel module is not loaded automatically, and udev is not intended to load it If the wrapper module only enhances the @@ -214,7 +214,7 @@ snd-pcm-oss enhances the functionality of snd-pcm by making the sound cards available to OSS applications), configure modprobe to load the wrapper - after Udev loads the wrapped module. To do this, add a + after udev loads the wrapped module. To do this, add a softdep line to the corresponding /etc/modprobe.d/<filename>.conf file. For example: @@ -279,7 +279,7 @@ 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. + that udev doesn't create a misnamed device. Udev has no information needed to create a device node if a kernel driver does not export its data to @@ -297,12 +297,12 @@ Device naming order changes randomly after rebooting - This is due to the fact that Udev, by design, handles uevents and + 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 fixed. 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. + serial number or the output of various *_id utilities installed by udev. See and for examples. diff --git a/chapter09/usage.xml b/chapter09/usage.xml index 4a4cf6c36..d59b38b29 100644 --- a/chapter09/usage.xml +++ b/chapter09/usage.xml @@ -235,50 +235,6 @@ EOF For information on kernel module loading and udev, see . - @@ -293,11 +249,11 @@ EOF (CMOS) clock. If the hardware clock is set to UTC, this script will convert the hardware clock's time to the local time using the /etc/localtime file (which tells the - hwclock program which timezone the user is in). There is no + hwclock program which timezone to use). There is no way to detect whether or not the hardware clock is set to UTC, so this needs to be configured manually. - The setclock is run via + The setclock program is run via udev when the kernel detects the hardware capability upon boot. It can also be run manually with the stop parameter to store the system time to the CMOS clock. @@ -315,7 +271,7 @@ EOF Change the value of the UTC variable below to a value of 0 (zero) if the hardware clock - is not set to UTC time. + is NOT set to UTC time. Create a new file /etc/sysconfig/clock by running the following: @@ -336,7 +292,7 @@ EOF at . It explains issues such as time zones, UTC, and the TZ environment variable. - The CLOCKPARAMS and UTC paramaters may be alternatively set + The CLOCKPARAMS and UTC paramaters may also be set in the /etc/sysconfig/rc.site file. @@ -352,7 +308,7 @@ EOF This section discusses how to configure the console - bootscript that sets up the keyboard map, console font and console kernel log + bootscript that sets up the keyboard map, console font, and console kernel log level. If non-ASCII characters (e.g., the copyright sign, the British pound sign and Euro symbol) will not be used and the keyboard is a U.S. one, much of this section can be skipped. Without the configuration file, (or @@ -505,7 +461,7 @@ EOF Due to the use of a 512-glyph LatArCyrHeb-16 font in the previous example, bright colors are no longer available on the Linux console unless - a framebuffer is used. If one wants to have bright colors without + a framebuffer is used. If one wants to have bright colors without a framebuffer and can live without characters not belonging to his language, it is still possible to use a language-specific 256-glyph font, as illustrated below: @@ -548,7 +504,7 @@ EOF are not multibyte. This deficiency doesn't affect keymaps for European languages, because there accents are added to unaccented ASCII characters, or two ASCII characters are composed together. However, in - UTF-8 mode it is a problem, e.g., for the Greek language, where one + UTF-8 mode it is a problem; e.g., for the Greek language, where one sometimes needs to put an accent on the letter alpha. The solution is either to avoid the use of UTF-8, or to install the X window system that doesn't have this limitation in its input @@ -556,11 +512,11 @@ EOF - For Chinese, Japanese, Korean and some other languages, the Linux + For Chinese, Japanese, Korean, and some other languages, the Linux console cannot be configured to display the needed characters. Users who need such languages should install the X Window System, fonts that cover the necessary character ranges, and the proper input method (e.g., - SCIM, it supports a wide variety of languages). + SCIM, supports a wide variety of languages). @@ -571,7 +527,7 @@ EOF The /etc/sysconfig/console file only controls the Linux text console localization. It has nothing to do with setting the proper keyboard layout and terminal fonts in the X Window System, with - ssh sessions or with a serial console. In such situations, limitations + ssh sessions, or with a serial console. In such situations, limitations mentioned in the last two list items above do not apply. @@ -585,9 +541,9 @@ EOF configuring - At times, it is desired to create files at boot time. For instance, + At times, it is desirable to create files at boot time. For instance, the /tmp/.ICE-unix directory - may be desired. This can be done by creating an entry in the + is often needed. This can be done by creating an entry in the /etc/sysconfig/createfiles configuration script. The format of this file is embedded in the comments of the default configuration file. -- cgit v1.2.3-54-g00ecf From 9e7475a6c30cbc40d2cf69118ea65d682189b091 Mon Sep 17 00:00:00 2001 From: "Douglas R. Reno" Date: Fri, 12 Jun 2020 21:04:48 +0000 Subject: Updates to chapter09 for systemd git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11929 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter08/dbus.xml | 10 +-- chapter08/systemd.xml | 157 ++++++++++++++++++------------------------- chapter09/clock.xml | 6 +- chapter09/consoled.xml | 14 ++-- chapter09/etcshells.xml | 4 +- chapter09/introductiond.xml | 7 +- chapter09/locale.xml | 26 +++---- chapter09/networkd.xml | 40 +++++------ chapter09/systemd-custom.xml | 33 ++++----- chapter09/udev.xml | 10 +-- 10 files changed, 140 insertions(+), 167 deletions(-) (limited to 'chapter09/etcshells.xml') diff --git a/chapter08/dbus.xml b/chapter08/dbus.xml index 0b06ad3e0..211399207 100644 --- a/chapter08/dbus.xml +++ b/chapter08/dbus.xml @@ -63,7 +63,7 @@ --with-console-auth-dir=/run/console - This specifies the location of the ConsoleKit auth + This specifies the location of the ConsoleKit authorization directory. @@ -91,7 +91,7 @@ mv -v /usr/lib/libdbus-1.so.* /lib ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so - Create a symlink, so that D-Bus and systemd can use the same + Create a symlink so that D-Bus and systemd can use the same machine-id file: ln -sfv /etc/machine-id /var/lib/dbus @@ -130,7 +130,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so dbus-cleanup-sockets - Used to clean up leftover sockets in a directory + is used to remove leftover sockets in a directory dbus-cleanup-sockets @@ -140,7 +140,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so dbus-daemon - The D-Bus message bus daemon + Is the D-Bus message bus daemon dbus-daemon @@ -193,7 +193,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so dbus-test-tool - A tool to help packages test + Is a tool to help packages test D-Bus dbus-test-tool diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml index 319f107a1..4049d726d 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -44,8 +44,7 @@ patch -Np1 -i ../systemd-&systemd-version;-gcc_10-fixes-1.patch - - Create a symlink to work around missing xsltproc: + Create a symlink to work around the xsltproc command not being installed: ln -sf /bin/true /usr/bin/xsltproc @@ -96,22 +95,10 @@ meson --prefix=/usr \ The meaning of the meson options: - - -D*-path=* - These switches provide location of binaries needed by + These switches provide the location of binaries needed by systemd at runtime that have not yet been installed. @@ -154,7 +141,7 @@ meson --prefix=/usr \ -Droot* These switches ensure that core programs and - shared libraries are installed in the subdirectories + shared libraries are installed in subdirectories of the root partition. @@ -200,11 +187,7 @@ meson --prefix=/usr \ Compile the package: LANG=en_US.UTF-8 ninja - Install the package: LANG=en_US.UTF-8 ninja install @@ -232,16 +215,8 @@ meson --prefix=/usr \ Prevent systemd from resetting the maximum PID value which causes some problems with packages and units in BLFS: - rm -f /usr/lib/sysctl.d/50-pid-max.conf - @@ -290,7 +265,7 @@ meson --prefix=/usr \ bootctl - Used to query the firmware and boot manager settings + Is used to query the firmware and boot manager settings bootctl @@ -300,7 +275,7 @@ meson --prefix=/usr \ busctl - Used to introspect and monitor the D-Bus bus + Is used to introspect and monitor the D-Bus bus busctl @@ -310,7 +285,7 @@ meson --prefix=/usr \ coredumpctl - Used to retrieve coredumps from the systemd journal + Is used to retrieve coredumps from the systemd journal coredumpctl @@ -334,7 +309,7 @@ meson --prefix=/usr \ hostnamectl - Used to query and change the system hostname and related + Is used to query and change the system hostname and related settings hostnamectl @@ -345,9 +320,10 @@ meson --prefix=/usr \ init - The first process to be started when the kernel has initialized + Is the first process to be started when the kernel has initialized the hardware which takes over the boot process and starts all - processes according to its configuration files + processes according to its configuration files. In this case, it starts + systemd. init @@ -357,7 +333,7 @@ meson --prefix=/usr \ journalctl - Used to query the contents of the systemd journal + Is used to query the contents of the systemd journal journalctl @@ -367,8 +343,8 @@ meson --prefix=/usr \ kernel-install - Used to add and remove kernel and initramfs images to and - from /boot + Is used to add and remove kernel and initramfs images to and + from /boot. In LFS, this is done manually. kernel-install @@ -378,7 +354,7 @@ meson --prefix=/usr \ localectl - Used to query and change the system locale and keyboard layout + Is used to query and change the system locale and keyboard layout settings localectl @@ -389,7 +365,7 @@ meson --prefix=/usr \ loginctl - Used to introspect and control the state of the systemd Login + Is used to introspect and control the state of the systemd Login Manager loginctl @@ -400,7 +376,7 @@ meson --prefix=/usr \ machinectl - Used to introspect and control the state of the systemd Virtual + Is used to introspect and control the state of the systemd Virtual Machine and Container Registration Manager machinectl @@ -411,8 +387,8 @@ meson --prefix=/usr \ networkctl - Used to introspect the state of the network links as seen by - systemd-networkd + Is used to introspect and configure the state of the network + links configured by systemd-networkd networkctl @@ -422,7 +398,7 @@ meson --prefix=/usr \ portablectl - Used to attach or detach portable services from the local + Is used to attach or detach portable services from the local system portablectl @@ -433,7 +409,7 @@ meson --prefix=/usr \ poweroff - Tells the kernel to halt the system and switch off the computer + Instructs the kernel to halt the system and switch off the computer (see halt) poweroff @@ -444,7 +420,7 @@ meson --prefix=/usr \ reboot - Tells the kernel to reboot the system (see + Instructs the kernel to reboot the system (see halt) reboot @@ -455,7 +431,7 @@ meson --prefix=/usr \ resolvconf - Register DNS server and domain configuration with + Registers DNS server and domain configuration with systemd-resolved resolvconf @@ -466,8 +442,8 @@ meson --prefix=/usr \ resolvectl - Send control commands to the network name resolution - manager, or resolve domain names, IPv4 and IPv6 addresses, + Sends control commands to the network name resolution + manager, or resolves domain names, IPv4 and IPv6 addresses, DNS records, and services. resolvectl @@ -478,7 +454,7 @@ meson --prefix=/usr \ runlevel - Reports the previous and the current run-level, as noted in the + Outputs the previous and the current run-level, as noted in the last run-level record in /var/run/utmp runlevel @@ -489,8 +465,8 @@ meson --prefix=/usr \ shutdown - Brings the system down in a secure way, signaling all processes - and notifying all logged-in users + Brings the system down in a safe and secure manner, signaling + all processes and notifying all logged-in users shutdown @@ -500,7 +476,7 @@ meson --prefix=/usr \ systemctl - Used to introspect and control the state of the systemd system + Is used to introspect and control the state of the systemd system and service manager systemctl @@ -511,8 +487,8 @@ meson --prefix=/usr \ systemd-analyze - Used to determine system boot-up performance of the current - boot + Is used to determine system startup performance of the current + boot, as well as identify troublesome systemd units systemd-analyze @@ -522,7 +498,7 @@ meson --prefix=/usr \ systemd-ask-password - Used to query a system password or passphrase from the user, + Is used to query a system password or passphrase from the user, using a question message specified on the command line systemd-ask-password @@ -533,7 +509,8 @@ meson --prefix=/usr \ systemd-cat - Used to connect STDOUT and STDERR of a process with the Journal + Is used to connect the STDOUT and STDERR outputs of a process + with the systemd journal. systemd-cat @@ -566,7 +543,7 @@ meson --prefix=/usr \ systemd-delta - Used to identify and compare configuration files in + Is used to identify and compare configuration files in /etc that override default counterparts in /usr @@ -578,7 +555,8 @@ meson --prefix=/usr \ systemd-detect-virt - Detects execution in a virtualized environment + Detects whether the system is being run in a virtual + environment, and adjusts udev accordingly. systemd-detect-virt @@ -588,7 +566,7 @@ meson --prefix=/usr \ systemd-escape - Used to escape strings for inclusion in systemd unit + Is used to escape strings for inclusion in systemd unit names systemd-escape @@ -599,7 +577,7 @@ meson --prefix=/usr \ systemd-hwdb - Used to manage hardware database (hwdb) + Is used to manage the hardware database (hwdb) systemd-hwdb @@ -609,7 +587,7 @@ meson --prefix=/usr \ systemd-id128 - Generate and print id128 strings + Generates and prints id128 strings systemd-id128 @@ -619,8 +597,9 @@ meson --prefix=/usr \ systemd-inhibit - Used to execute a program with a shutdown, sleep or idle - inhibitor lock taken + Is used to execute a program with a shutdown, sleep or idle + inhibitor lock taken, preventing an action such as a system shutdown + until the process is completed. systemd-inhibit @@ -630,7 +609,7 @@ meson --prefix=/usr \ systemd-machine-id-setup - Used by system installer tools to initialize the machine ID + Is used by system installer tools to initialize the machine ID stored in /etc/machine-id at install time with a randomly generated ID @@ -642,7 +621,7 @@ meson --prefix=/usr \ systemd-mount - A tool to temporarily mount or auto-mount a drive. + Is used to temporarily mount or automount disks. systemd-mount @@ -652,7 +631,7 @@ meson --prefix=/usr \ systemd-notify - Used by daemon scripts to notify the init system about status + Is used by daemon scripts to notify the init system about status changes systemd-notify @@ -663,7 +642,7 @@ meson --prefix=/usr \ systemd-nspawn - Used to run a command or OS in a light-weight namespace + Is used to run a command or OS in a light-weight namespace container systemd-nspawn @@ -674,7 +653,7 @@ meson --prefix=/usr \ systemd-path - Used to query system and user paths + Is used to query system and user paths systemd-path @@ -684,7 +663,7 @@ meson --prefix=/usr \ systemd-repart - Used go grow and add partitions to a partition table when + Is used to grow and add partitions to a partition table when systemd is used in an OS image (e.g. a container). systemd-repart @@ -695,7 +674,7 @@ meson --prefix=/usr \ systemd-resolve - Used to resolve domain names, IPV4 and IPv6 addresses, DNS + Is used to resolve domain names, IPV4 and IPv6 addresses, DNS resource records, and services systemd-resolve @@ -706,29 +685,20 @@ meson --prefix=/usr \ systemd-run - Used to create and start a transient .service or a .scope unit - and run the specified command in it + Is used to create and start a transient .service or a .scope + unit and run the specified command in it. This is useful for + validating systemd units. systemd-run - - systemd-socket-activate - A tool to listen on socket devices and launch a process upon - connection. + Is used to listen on socket devices and launch a process upon + a successful connection to the socket. systemd-socket-activate @@ -751,7 +721,7 @@ meson --prefix=/usr \ systemd-umount - Unmount mount points + Unmounts mount points systemd-umount @@ -761,7 +731,8 @@ meson --prefix=/usr \ systemd-tty-ask-password-agent - Used to list or process pending systemd password requests + Is used to list and/or process pending systemd password + requests systemd-tty-ask-password-agent @@ -782,7 +753,7 @@ meson --prefix=/usr \ timedatectl - Used to query and change the system clock and its settings + Is used to query and change the system clock and its settings timedatectl @@ -793,10 +764,10 @@ meson --prefix=/usr \ 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 + Is a generic udev administration tool which controls the udevd + daemon, provides info from the Udev hardware database, monitors + uevents, waits for uevents to finish, tests udev configuration, and + triggers uevents for a given device udevadm @@ -806,7 +777,7 @@ meson --prefix=/usr \ libsystemd - The main systemd utility library + Is the main systemd utility library libsystemd @@ -816,7 +787,7 @@ meson --prefix=/usr \ libudev - A library to access Udev device information + Is a library to access Udev device information libudev diff --git a/chapter09/clock.xml b/chapter09/clock.xml index 872ba677c..585017e35 100644 --- a/chapter09/clock.xml +++ b/chapter09/clock.xml @@ -16,7 +16,7 @@ This section discusses how to configure the systemd-timedated system service, which configures - system clock and timezone. + the system clock and timezone. If you cannot remember whether or not the hardware clock is set to UTC, find out by running the hwclock --localtime --show @@ -30,7 +30,7 @@ time. systemd-timedated reads /etc/adjtime, - and depending on the contents of the file, it sets the clock to either UTC or + and depending on the contents of the file, sets the clock to either UTC or local time. Create the /etc/adjtime file with the following contents @@ -59,7 +59,7 @@ EOF timedatectl set-time YYYY-MM-DD HH:MM:SS - Hardware clock will also be updated accordingly. + The hardware clock will also be updated accordingly. To change your current time zone, issue: diff --git a/chapter09/consoled.xml b/chapter09/consoled.xml index bf1fdc8e0..76d304d44 100644 --- a/chapter09/consoled.xml +++ b/chapter09/consoled.xml @@ -24,8 +24,8 @@ information. Decide which keymap and screen font will be used. Various language-specific HOWTOs can also help with this, see . - Examine localectl list-keymaps output for a list of - valid console keymaps. Look in + Examine the output of localectl list-keymaps for a list of + valid console keymaps. Look in the /usr/share/consolefonts directory for valid screen fonts. @@ -106,34 +106,34 @@ EOF list-x11-keymap-models - Show known X11 keyboard mapping models. + Shows known X11 keyboard mapping models. list-x11-keymap-layouts - Show known X11 keyboard mapping layouts. + Shows known X11 keyboard mapping layouts. list-x11-keymap-variants - Show known X11 keyboard mapping variants. + Shows known X11 keyboard mapping variants. list-x11-keymap-options - Show known X11 keyboard mapping options. + Shows known X11 keyboard mapping options. Using any of the parameters listed above requires the - XKeyboard Config package from BLFS. + XKeyboard-Config package from BLFS. diff --git a/chapter09/etcshells.xml b/chapter09/etcshells.xml index a0d5f21a8..b9d299c93 100644 --- a/chapter09/etcshells.xml +++ b/chapter09/etcshells.xml @@ -28,8 +28,8 @@ For example, this file is consulted by chsh 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. + own account. If the command name is not listed, the user will be denied the + ability to change shells. It is a requirement for applications such as GDM which does not populate the diff --git a/chapter09/introductiond.xml b/chapter09/introductiond.xml index fa2403edb..f0be70cec 100644 --- a/chapter09/introductiond.xml +++ b/chapter09/introductiond.xml @@ -38,7 +38,7 @@ - Third, configuring the system clock and keyboard layout. + Third, configuring the system clock and keyboard layout is shown. @@ -49,9 +49,8 @@ - Fourth, a brief introduction to the scripts and configuration - files used when the user logs into the system. + files used when the user logs into the system is presented. @@ -62,7 +61,7 @@ - And finally, configuring the systemd behavior. + And finally, configuring the behavior of systemd is discussed. diff --git a/chapter09/locale.xml b/chapter09/locale.xml index 5f473ac72..23442a513 100644 --- a/chapter09/locale.xml +++ b/chapter09/locale.xml @@ -14,16 +14,16 @@ /etc/locale.conf - The /etc/locale.conf below sets some + The /etc/locale.conf file below sets some environment variables necessary for native language support. Setting them properly results in: - The output of programs translated into the native language + The output of programs being translated into your native language - Correct classification of characters into letters, digits and other + The correct classification of characters into letters, digits and other classes. This is necessary for bash to properly accept non-ASCII characters in command lines in non-English locales @@ -31,15 +31,15 @@ The correct alphabetical sorting order for the country - Appropriate default paper size + The appropriate default paper size - Correct formatting of monetary, time, and date values + The correct formatting of monetary, time, and date values Replace <ll> below with the two-letter code - for the desired language (e.g., en) and + for your desired language (e.g., en) and <CC> with the two-letter code for the appropriate country (e.g., GB). <charmap> should be replaced with the canonical charmap for your chosen locale. Optional @@ -54,7 +54,7 @@ is also referred to as iso8859-1 and iso88591. Some applications cannot handle the various synonyms correctly (e.g., require that UTF-8 is written as UTF-8, not - utf8), so it is safest in most + utf8), so it is the safest in most cases to choose the canonical name for a particular locale. To determine the canonical name, run the following command, where <locale name> is the output given by locale -a for @@ -80,8 +80,8 @@ LC_ALL=<locale name> locale int_prefix 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. + that your locale was either not installed in Chapter 6 or is not + supported by the default installation of Glibc. locale: Cannot set LC_* to default locale: No such file or directory @@ -90,7 +90,7 @@ LC_ALL=<locale name> locale int_prefix Further instructions assume that there are no such error messages from Glibc. - + 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 @@ -142,11 +142,13 @@ EOF 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 unknown - 8-bit). So you can use the C locale only if you are sure that - you will never need 8-bit characters. + 8-bit). It's suggested that you use the C locale only + if you are certain that you will never need 8-bit characters. + diff --git a/chapter09/networkd.xml b/chapter09/networkd.xml index 688c315aa..1acc215b9 100644 --- a/chapter09/networkd.xml +++ b/chapter09/networkd.xml @@ -48,7 +48,7 @@ Udev normally assigns network card interface names based - on system physical characteristics such as enp2s1. If you are + on physical system characteristics such as enp2s1. If you are not sure what your interface name is, you can always run ip link after you have booted your system. @@ -76,10 +76,9 @@ Create a manual naming scheme, for example by naming the interfaces something like "internet0", "dmz0", or "lan0". - For that, create .link - files in /etc/systemd/network/, that choose an explicit name or a - better naming scheme for one, some, or all of your interfaces. - For example: + To do that, create .link files in /etc/systemd/network/ that + select an explicit name or a better naming scheme for your + network interfaces. For example: cat > /etc/systemd/network/10-ether0.link << "EOF" @@ -170,9 +169,9 @@ EOF 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 /etc/resolv.conf (ex: resolvconf), the - systemd-resolved service should not be + local resolver (ex: bind, dnsmasq, unbound, etc.), or any other software + that generates an /etc/resolv.conf (ex: resolvconf), + the systemd-resolved service should not be used. When using systemd-resolved for DNS @@ -206,11 +205,13 @@ EOF Replace <IP address of the nameserver> - 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 nameserver line from the file. The IP address - may also be a router on the local network. + with the IP address of the DNS server most appropriate for your 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 nameserver line from the file. + The IP address may also be a router on the local network. Another option + is to use the Google Public DNS service using the IP addresses below as + nameservers. The Google Public IPv4 DNS addresses are 8.8.8.8 and 8.8.4.4 @@ -262,7 +263,7 @@ EOF Decide on a fully-qualified domain name (FQDN), and possible aliases - for use in the /etc/hosts file. If using static + for use in the /etc/hosts file. If using static IP addresses, you'll also need to decide on an IP address. The syntax for a hosts file entry is: @@ -285,11 +286,9 @@ EOF this IP could be lfs.example.org. Even if not using a network card, a valid FQDN is still required. - This is necessary for certain programs to operate correctly. + This is necessary for certain programs, such as MTAs, to operate properly. - If using DHCP, DHCPv6, IPv6 Autoconfiguration, or if a network card - is not going to be configured, create the /etc/hosts - file by running the following command: + Create the /etc/hosts file using the following command: cat > /etc/hosts << "EOF" # Begin /etc/hosts @@ -307,13 +306,14 @@ EOF the IPv6 loopback interface. 127.0.1.1 is a loopback entry reserved specifically for the FQDN. + diff --git a/chapter09/systemd-custom.xml b/chapter09/systemd-custom.xml index 787fd4572..809c1a273 100644 --- a/chapter09/systemd-custom.xml +++ b/chapter09/systemd-custom.xml @@ -49,13 +49,14 @@ EOF Disabling tmpfs for /tmp By default, /tmp is created as - a tmpfs. If this is not desired, it can be overridden by the following: + a tmpfs. If this is not desired, it can be overridden by executing the + following command: ln -sfv /dev/null /etc/systemd/system/tmp.mount Alternatively, if a a separate partition for /tmp is desired, specify that - partition in an /etc/fstab entry. + partition in a /etc/fstab entry. @@ -87,7 +88,7 @@ EOF /etc/tmpfiles.d override files with the same name in /usr/lib/tmpfiles.d. See - tmpfiles.d(5) manual page for file format + tmpfiles.d(5) manual page for file format details. @@ -103,7 +104,7 @@ EOF is really only applicable to btrfs filesystems. It references type v which in turn references type d (directory). This then creates the specified directory if is is not present and adjusts the permissions - and ownership as specified. Contents of the directory will be + and ownership as specified. Contents of the directory will be subject to time based cleanup if the age argument is specified. @@ -121,7 +122,7 @@ cp /usr/lib/tmpfiles.d/tmp.conf /etc/tmpfiles.d Overriding Default Services Behavior - The parameter of a unit can be overriden by creating a directory + The parameters of a unit can be overriden by creating a directory and a configuration file in /etc/systemd/system. For example: @@ -180,7 +181,7 @@ EOF Logging on a system booted with systemd is handled with systemd-journald (by default), rather than a typical unix syslog daemon. - You can also add a normal syslog daemon and have both work side by + You can also add a normal syslog daemon and have both operate side by side if desired. The systemd-journald program stores journal entries in a binary format rather than a plain text log file. To assist with parsing the file, the command journalctl is provided. @@ -202,7 +203,7 @@ EOF chronological order. - journalctl -f: povides functionality similar + journalctl -f: provides functionality similar to tail -f (follow). @@ -215,23 +216,23 @@ EOF Core dumps are useful to debug crashed programs, especially when a daemon process crashes. On systemd booted systems the core dumping is handled by systemd-coredump. It will - log the core dump into the journal and store the core dump itself in + log the core dump in the journal and store the core dump itself in /var/lib/systemd/coredump. - To retrieve and process core dumps, coredumpctl + To retrieve and process core dumps, the coredumpctl tool is provided. Here are some examples of frequently used commands: coredumpctl -r: lists all core dumps in - reversed chronological order. + reverse chronological order. - coredumpctl -1 info: show the information - of the last core dump. + coredumpctl -1 info: shows the information + from the last core dump. - coredumpctl -1 debug: load the last core + coredumpctl -1 debug: loads the last core dump into GDB. @@ -249,7 +250,7 @@ cat > /etc/systemd/coredump.conf.d/maxuse.conf << EOF MaxUse=5G EOF - See systemd-coredump(8), + See the systemd-coredump(8), coredumpctl(1), and coredump.conf.d(5) manual pages for more information. @@ -284,7 +285,7 @@ EOF advantage of explicitly allowing and disallowing processes to run after the user session has ended, but breaks backwards compatibility with tools like nohup and utilities that use - deamon(). + daemon(). @@ -298,7 +299,7 @@ EOF - Disable at build-time: You can enable + Disable at build-time: You can disable lingering by default while building systemd by adding the switch -Ddefault-kill-user-processes=false to the meson command for systemd. This completely diff --git a/chapter09/udev.xml b/chapter09/udev.xml index 508795a03..a3a7c0cf9 100644 --- a/chapter09/udev.xml +++ b/chapter09/udev.xml @@ -223,13 +223,13 @@ Note that the softdep command also allows pre: dependencies, or a mixture of both - pre: and post:. See the - modprobe.d(5) manual page for more information + pre: and post: dependencies. See + the modprobe.d(5) manual page for more information on softdep syntax and capabilities. - If the module in question is not a wrapper and is useful by itself, - configure the modules bootscript to load this - module on system boot. To do this, add the module name to the + If the module in question is not a wrapper and is + useful by itself, configure the modules bootscript to + load this module on system boot. To do this, add the module name to the /etc/sysconfig/modules file on a separate line. This works for wrapper modules too, but is suboptimal in that case. -- cgit v1.2.3-54-g00ecf