From 94e3e7bdd1a7252c28eb30b03910aa7e4a2f974a Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Fri, 22 Dec 2017 20:18:46 +0000 Subject: [PATCH] Update to linux-4.14.8. Add discussion of ethernet device names (systemd). Add discussion of audo file deletion (systemd). Add discussion of separate /tmp (systemd). git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11340 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter01/changelog.xml | 22 +++++++++++ chapter07/networkd.xml | 74 +++++++++++++++++++++++++++++++----- chapter07/systemd-custom.xml | 41 ++++++++++++++++++-- packages.ent | 6 +-- 4 files changed, 128 insertions(+), 15 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 7e3fe1655..1d7081eda 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -42,6 +42,28 @@ or as appropriate for the entry or if needed the entire day's listitem. --> + + 2017-12-22 + + + [bdubbs] - Update to linux-4.14.8. Fixes + #4177. + + + [bdubbs] - Add discussion of ethernet device names. Fixes + #4180. + + + [bdubbs] - Add discussion of audo file deletion. Fixes + #4181. + + + [bdubbs] - Add discussion of separate /tmp. Fixes + #4182. + + + + 2017-12-22 diff --git a/chapter07/networkd.xml b/chapter07/networkd.xml index 54119f03e..b446986fa 100644 --- a/chapter07/networkd.xml +++ b/chapter07/networkd.xml @@ -43,11 +43,67 @@ systemd-netdev(5) and systemd-network(5) manual pages. - 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 - ip link after you have booted your system. - + + Network Device Naming + + + Udev normally assigns 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 after you have booted your system. + + + + For most systems, there is only one network interface for + each type of connection. For example, the classic interface + name for a wired connection is eth0. A wireless connection + will usually have the name wifi0 or wlan0. + + + + If you prefer to use the classic or customized network interface names, + there are three alternative ways to do that: + + + + + Mask udev's .link file for the default policy: +ln -s /dev/null /etc/systemd/network/99-default.link + + + + + + 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: + + +cat > /etc/systemd/network/10-ether0.link << "EOF" +[Match] +# Change the MAC address as appropriate for your network device +MACAddress=12:34:45:78:90:AB + +[Link] +Name=ether0 +EOF + + + See the man page systemd.link(5) for more information. + + + + + + In /boot/grub/grub.cfg, pass the option net.ifnames=0 on the + kernel command line. + + + + Static IP Configuration @@ -56,9 +112,9 @@ Static IP setup (using both systemd-networkd and systemd-resolved): -cat > /etc/systemd/network/10-eth0-static.network << "EOF" +cat > /etc/systemd/network/10-eth-static.network << "EOF" [Match] -Name=eth0 +Name=<network-device-name> [Network] Address=192.168.0.2/24 @@ -79,9 +135,9 @@ EOF The command below creates a basic configuration file for an IPv4 DHCP setup: -cat > /etc/systemd/network/10-eth0-dhcp.network << "EOF" +cat > /etc/systemd/network/10-eth-dhcp.network << "EOF" [Match] -Name=eth0 +Name=<network-device-name> [Network] DHCP=ipv4 diff --git a/chapter07/systemd-custom.xml b/chapter07/systemd-custom.xml index bd1119840..31f518ff2 100644 --- a/chapter07/systemd-custom.xml +++ b/chapter07/systemd-custom.xml @@ -53,9 +53,18 @@ EOF ln -sfv /dev/null /etc/systemd/system/tmp.mount - This is not necessary if there is a separate partition for - /tmp specified in - /etc/fstab. + Alternatively, if a a separate partition for + /tmp is desired, specify that + partition in an /etc/fstab entry. + + + + Do not create the symbolic link above if a separate partition is used + for /tmp. This will prvent the + root file system (/) from being remounted r/w and make the system + unusable when booted. + + @@ -81,6 +90,32 @@ EOF tmpfiles.d(5) manual page for file format details. + + Note that the syntax for the + /usr/lib/tmpfiles.d/*.conf files can be + confusing. For example, the default deletion of files in the /tmp directory + is located in /usr/lib/tmpfiles.d/tmp.conf with + the line: + +q /tmp 1777 root root 10d + + The type field, q, discusses creating a subvolume with quotas which + 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 + subject to time based cleanup if the age argument is specified. + + + + If the default parameters are not desired, then the file should + be copied to /etc/tmpfiles.d + and edited as desired. For example: + +mkdir -p /etc/tempfiles.d +cp /usr/lib/tmpfiles.d/tmp.conf /etc/tempfiles.d + + diff --git a/packages.ent b/packages.ent index 9ad7fc64c..3d03100d5 100644 --- a/packages.ent +++ b/packages.ent @@ -408,12 +408,12 @@ - + - + - +