Changeset c34b4fb
- Timestamp:
- 09/07/2021 08:01:10 PM (21 months ago)
- Branches:
- 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, arm, bdubbs/gcc13, multilib, s6-init, trunk, xry111/arm64, xry111/clfs-ng, xry111/glibc-2.37, xry111/kcfg-revise, xry111/lfs-next, xry111/pip3, xry111/queue-11.3, xry111/rust-wip-20221008
- Children:
- 9cea9a2
- Parents:
- df732b5
- Location:
- chapter09
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter09/bootscripts.xml
rdf732b5 rc34b4fb 25 25 26 26 <para>The LFS-Bootscripts package contains a set of scripts to start/stop 27 the LFS system at bootup/shutdown. 27 the LFS system at bootup/shutdown. 28 28 The configuration files and procedures needed to 29 29 customize the boot process are described in the following sections.</para> -
chapter09/consoled.xml
rdf732b5 rc34b4fb 26 26 url="http://www.tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>. 27 27 Examine the output of <command>localectl list-keymaps</command> for a list of 28 valid console keymaps. Look in the 28 valid console keymaps. Look in the 29 29 <filename class="directory">/usr/share/consolefonts</filename> 30 30 directory for valid screen fonts.</para> -
chapter09/introduction.xml
rdf732b5 rc34b4fb 30 30 system.</para> 31 31 32 <para>The <command>init</command> program is controlled by the 32 <para>The <command>init</command> program is controlled by the 33 33 <filename>/etc/inittab</filename> file and is organized into run levels that 34 34 can be run by the user:</para> … … 62 62 <itemizedlist> 63 63 <listitem> 64 <para>May be slower to boot. A medium speed base LFS system 65 takes 8-12 seconds where the boot time is measured from the 66 first kernel message to the login prompt. Network 67 connectivity is typically established about 2 seconds 64 <para>May be slower to boot. A medium speed base LFS system 65 takes 8-12 seconds where the boot time is measured from the 66 first kernel message to the login prompt. Network 67 connectivity is typically established about 2 seconds 68 68 after the login prompt.</para> 69 69 </listitem> -
chapter09/locale.xml
rdf732b5 rc34b4fb 81 81 before the telephone number in order to get into the country. If any of the 82 82 commands above fail with a message similar to the one shown below, this means 83 that your locale was either not installed in Chapter 8 or is not 83 that your locale was either not installed in Chapter 8 or is not 84 84 supported by the default installation of Glibc.</para> 85 85 … … 143 143 mail with such characters from Mutt or Pine results in non-RFC-conforming 144 144 messages being sent (the charset in the outgoing mail is indicated as <quote>unknown 145 8-bit</quote>). It's suggested that you use the <quote>C</quote> locale only 145 8-bit</quote>). It's suggested that you use the <quote>C</quote> locale only 146 146 if you are certain that you will never need 8-bit characters.</para> 147 147 -
chapter09/network.xml
rdf732b5 rc34b4fb 32 32 characteristics such as enp2s1. If you are not sure what your interface 33 33 name is, you can always run <command>ip link</command> or <command>ls 34 /sys/class/net</command> after you have booted your system. 34 /sys/class/net</command> after you have booted your system. 35 35 </para></note> 36 36 … … 158 158 <primary sortas="e-/etc/hosts">/etc/hosts</primary> 159 159 </indexterm> 160 160 161 161 <indexterm zone="ch-config-hosts"> 162 162 <primary sortas="d-localnet">localnet</primary> 163 163 <secondary>/etc/hosts</secondary> 164 164 </indexterm> 165 165 166 166 <indexterm zone="ch-config-hosts"> 167 167 <primary sortas="d-network">network</primary> 168 168 <secondary>/etc/hosts</secondary> 169 169 </indexterm> 170 170 171 171 <para>Decide on the IP address, fully-qualified domain name (FQDN), and 172 172 possible aliases for use in the <filename>/etc/hosts</filename> file. The 173 173 syntax is:</para> 174 174 175 175 <screen><literal>IP_address myhost.example.org aliases</literal></screen> 176 176 … … 187 187 <para>x can be any number in the range 16-31. y can be any number in the 188 188 range 0-255.</para> 189 189 190 190 <para>A valid private IP address could be 192.168.1.1. A valid FQDN for 191 191 this IP could be lfs.example.org.</para> 192 192 193 193 <para>Even if not using a network card, a valid FQDN is still required. 194 194 This is necessary for certain programs to operate correctly.</para> 195 195 196 196 <para>Create the <filename>/etc/hosts</filename> file by running:</para> 197 197 … … 210 210 211 211 <para>The <replaceable><192.168.1.1></replaceable>, 212 <replaceable><FQDN></replaceable>, and 212 <replaceable><FQDN></replaceable>, and 213 213 <replaceable><HOSTNAME></replaceable> values need to be 214 214 changed for specific uses or requirements (if assigned an IP address by a -
chapter09/networkd.xml
rdf732b5 rc34b4fb 39 39 <filename class="extension">.netdev</filename> and 40 40 <filename class="extension">.network</filename> files. For detailed 41 descriptions and example contents of these configuration files, consult 41 descriptions and example contents of these configuration files, consult 42 42 the <filename>systemd-link(5)</filename>, 43 43 <filename>systemd-netdev(5)</filename> and … … 58 58 each type of connection. For example, the classic interface 59 59 name for a wired connection is eth0. A wireless connection 60 will usually have the name wifi0 or wlan0. 60 will usually have the name wifi0 or wlan0. 61 61 </para> 62 62 … … 76 76 <para> 77 77 Create a manual naming scheme, for example by naming the 78 interfaces something like "internet0", "dmz0", or "lan0". 79 To do that, create .link files in /etc/systemd/network/ that 78 interfaces something like "internet0", "dmz0", or "lan0". 79 To do that, create .link files in /etc/systemd/network/ that 80 80 select an explicit name or a better naming scheme for your 81 81 network interfaces. For example: … … 92 92 93 93 <para> 94 See the man page systemd.link(5) for more information. 94 See the man page systemd.link(5) for more information. 95 95 </para> 96 96 </listitem> … … 98 98 <listitem> 99 99 <para> 100 In /boot/grub/grub.cfg, pass the option net.ifnames=0 on the 100 In /boot/grub/grub.cfg, pass the option net.ifnames=0 on the 101 101 kernel command line. 102 102 </para> … … 210 210 There will often be more than one entry (requirements demand secondary 211 211 servers for fallback capability). If you only need or want one DNS server, 212 remove the second <emphasis>nameserver</emphasis> line from the file. 212 remove the second <emphasis>nameserver</emphasis> line from the file. 213 213 The IP address may also be a router on the local network. Another option 214 214 is to use the Google Public DNS service using the IP addresses below as … … 253 253 <primary sortas="e-/etc/hosts">/etc/hosts</primary> 254 254 </indexterm> 255 255 256 256 <indexterm zone="ch-config-hosts"> 257 257 <primary sortas="d-localnet">localnet</primary> 258 258 <secondary>/etc/hosts</secondary> 259 259 </indexterm> 260 260 261 261 <indexterm zone="ch-config-hosts"> 262 262 <primary sortas="d-network">network</primary> -
chapter09/profile.xml
rdf732b5 rc34b4fb 104 104 before the telephone number in order to get into the country. If any of the 105 105 commands above fail with a message similar to the one shown below, this means 106 that your locale was either not installed in <xref linkend="ch-system-glibc"/> 106 that your locale was either not installed in <xref linkend="ch-system-glibc"/> 107 107 or is not supported by the default installation of Glibc.</para> 108 108 -
chapter09/symlinks.xml
rdf732b5 rc34b4fb 23 23 and the Realtek card becomes eth1. In some cases, after a reboot the cards 24 24 could get renumbered the other way around.</para> 25 25 26 26 <para>In the new naming scheme, typical network device names would then 27 27 be something like enp5s0 or wlp3s0. If this naming convention is not … … 31 31 <sect3> 32 32 <title>Disabling Persistent Naming on the Kernel Command Line</title> 33 33 34 34 <para>The traditional naming scheme using eth0, eth1, etc can be 35 restored by adding <userinput>net.ifnames=0</userinput> on the 35 restored by adding <userinput>net.ifnames=0</userinput> on the 36 36 kernel command line. This is most appropriate for those systems 37 37 that have only one ethernet device of the same type. Laptops 38 often have multiple ethernet connections that are named eth0 and 39 wlan0 and are also candidates for this method. The command line 40 is passed in the GRUB configuration file. 38 often have multiple ethernet connections that are named eth0 and 39 wlan0 and are also candidates for this method. The command line 40 is passed in the GRUB configuration file. 41 41 See <xref linkend="grub-cfg"/>.</para> 42 42 </sect3> … … 44 44 <sect3> 45 45 <title>Creating Custom Udev Rules</title> 46 46 47 47 <para>The naming scheme can be customized by creating custom udev 48 48 rules. A script has been included that generates the initial rules. … … 62 62 are not consistently assigned. In these cases, this method cannot 63 63 be used.</para></note> 64 64 65 65 <para>The file begins with a comment block followed by two lines for each 66 66 NIC. The first line for each NIC is a commented description showing its … … 70 70 interface; this information is only for reference. The second line is the 71 71 udev rule that matches this NIC and actually assigns it a name.</para> 72 72 73 73 <para>All udev rules are made up of several keys, separated by commas and 74 74 optional whitespace. This rule's keys and an explanation of each of them 75 75 are as follows:</para> 76 76 77 77 <itemizedlist> 78 78 <listitem> … … 107 107 </listitem> 108 108 </itemizedlist> 109 109 110 110 <para>The value of <literal>NAME</literal> is the important part. Make sure 111 111 you know which name has been assigned to each of your network cards before -
chapter09/systemd-custom.xml
rdf732b5 rc34b4fb 51 51 52 52 <para>By default, <filename class="directory">/tmp</filename> is created as 53 a tmpfs. If this is not desired, it can be overridden by executing the 53 a tmpfs. If this is not desired, it can be overridden by executing the 54 54 following command:</para> 55 55 … … 57 57 58 58 <para>Alternatively, if a separate partition for 59 <filename class="directory">/tmp</filename> is desired, specify that 59 <filename class="directory">/tmp</filename> is desired, specify that 60 60 partition in a <filename>/etc/fstab</filename> entry.</para> 61 61 … … 82 82 <listitem><para>systemd-tmpfiles-setup.service</para></listitem> 83 83 </itemizedlist> 84 84 85 85 <para>The system location for the configuration files is 86 <filename>/usr/lib/tmpfiles.d/*.conf</filename>. The local 86 <filename>/usr/lib/tmpfiles.d/*.conf</filename>. The local 87 87 configuration files are in 88 88 <filename class="directory">/etc/tmpfiles.d</filename>. Files in … … 95 95 <para> 96 96 Note that the syntax for the 97 <filename>/usr/lib/tmpfiles.d/*.conf</filename> files can be 97 <filename>/usr/lib/tmpfiles.d/*.conf</filename> files can be 98 98 confusing. For example, the default deletion of files in the /tmp directory 99 is located in <filename>/usr/lib/tmpfiles.d/tmp.conf</filename> with 99 is located in <filename>/usr/lib/tmpfiles.d/tmp.conf</filename> with 100 100 the line: 101 101 … … 149 149 systems, systemd uses a unified format for different types of startup 150 150 files (or units). The command <command>systemctl</command> is used to 151 enable, disable, control state, and obtain status of unit files. Here 151 enable, disable, control state, and obtain status of unit files. Here 152 152 are some examples of frequently used commands:</para> 153 153 -
chapter09/udev.xml
rdf732b5 rc34b4fb 120 120 ownership at whatever <systemitem 121 121 class="filesystem">devtmpfs</systemitem> used initially.</para> </sect3> 122 122 123 123 <sect3 id="module-loading"> 124 124 <title>Module Loading</title> … … 224 224 <para>Note that the <quote>softdep</quote> command also allows 225 225 <literal>pre:</literal> dependencies, or a mixture of both 226 <literal>pre:</literal> and <literal>post:</literal> dependencies. See 226 <literal>pre:</literal> and <literal>post:</literal> dependencies. See 227 227 the <filename>modprobe.d(5)</filename> manual page for more information 228 228 on <quote>softdep</quote> syntax and capabilities.</para> 229 229 230 <para revision="sysv">If the module in question is not a wrapper and is 231 useful by itself, configure the <command>modules</command> bootscript to 230 <para revision="sysv">If the module in question is not a wrapper and is 231 useful by itself, configure the <command>modules</command> bootscript to 232 232 load this module on system boot. To do this, add the module name to the 233 233 <filename>/etc/sysconfig/modules</filename> file on a separate line. -
chapter09/usage.xml
rdf732b5 rc34b4fb 25 25 particular Linux distribution, they should work the same in LFS too. LFS has its 26 26 own way of doing things, but it respects generally accepted standards.</para> 27 27 28 28 <para>SysVinit (which will be referred to as <quote>init</quote> from now on) 29 29 works using a run-levels scheme. There are seven (numbered 0 to 6) run-levels … … 234 234 /sys/class/rtc.</para> 235 235 236 <para>For information on kernel module loading and udev, see 236 <para>For information on kernel module loading and udev, see 237 237 <xref linkend="module-loading"/>.</para> 238 238 </sect2> … … 536 536 <sect2 id="ch-config-createfiles"> 537 537 <title>Creating Files at Boot</title> 538 538 539 539 <indexterm zone="ch-config-createfiles"> 540 540 <primary sortas="d-createfiles">File creation at boot</primary> 541 541 <secondary>configuring</secondary> 542 542 </indexterm> 543 543 544 544 <para>At times, it is desirable to create files at boot time. For instance, 545 545 the <filename class="directory">/tmp/.ICE-unix</filename> directory 546 546 is often needed. This can be done by creating an entry in the 547 547 <filename>/etc/sysconfig/createfiles</filename> configuration script. 548 The format of this file is embedded in the comments of the default 548 The format of this file is embedded in the comments of the default 549 549 configuration file.</para> 550 550 </sect2> … … 552 552 <sect2 id="ch-config-sysklogd"> 553 553 <title>Configuring the sysklogd Script</title> 554 554 555 555 <indexterm zone="ch-config-sysklogd"> 556 556 <primary sortas="d-sysklogd">sysklogd</primary> 557 557 <secondary>configuring</secondary> 558 558 </indexterm> 559 559 560 560 <para>The <filename>sysklogd</filename> script invokes the 561 561 <command>syslogd</command> program as a part of System V initialization. The … … 575 575 <sect2 id="ch-config-site"> 576 576 <title>The rc.site File</title> 577 577 578 578 <indexterm zone="ch-config-site"> 579 579 <primary sortas="a-rc.site">rc.site</primary> 580 580 </indexterm> 581 581 582 582 <para>The optional <filename>/etc/sysconfig/rc.site</filename> file contains 583 583 settings that are automatically set for each SystemV boot script. It can … … 588 588 <filename>rc.site</filename>, the values in the script specific files have 589 589 precedence. </para> 590 590 591 591 <para><filename>rc.site</filename> also contains parameters that can 592 592 customize other aspects of the boot process. Setting the IPROMPT variable 593 593 will enable selective running of bootscripts. Other options are described 594 594 in the file comments. The default version of the file is as follows:</para> 595 595 596 596 <!-- Use role to fix a pdf generation problem --> 597 597 <screen role="auto">&site;</screen> 598 598 599 599 <sect3> 600 600 <title>Customizing the Boot and Shutdown Scripts</title> 601 601 602 602 <para>The LFS boot scripts boot and shut down a system in a fairly 603 603 efficient manner, but there are a few tweaks that you can make in the … … 605 605 to your preferences. To do this, adjust the settings in 606 606 the <filename>/etc/sysconfig/rc.site</filename> file above.</para> 607 607 608 608 <itemizedlist> 609 609 610 610 <listitem><para>During the boot script <filename>udev</filename>, there is 611 611 a call to <command>udev settle</command> that requires some time to … … 614 614 card, the boot process will probably not need to wait for this command. To 615 615 skip it, set the variable OMIT_UDEV_SETTLE=y.</para></listitem> 616 616 617 617 <listitem><para>The boot script <filename>udev_retry</filename> also runs 618 618 <command>udev settle</command> by default. This command is only needed by … … 623 623 needed. Skip the command by setting the variable OMIT_UDEV_RETRY_SETTLE=y. 624 624 </para></listitem> 625 625 626 626 <listitem><para>By default, the file system checks are silent. This can 627 627 appear to be a delay during the bootup process. To turn on the 628 628 <command>fsck</command> output, set the variable VERBOSE_FSCK=y. 629 629 </para></listitem> 630 630 631 631 <listitem><para>When rebooting, you may want to skip the filesystem check, 632 632 <command>fsck</command>, completely. To do this, either create the file … … 637 637 the <parameter>-F</parameter> parameter instead of <parameter>-f</parameter>. 638 638 </para> 639 639 640 640 <para>Setting the variable FASTBOOT=y will disable <command>fsck</command> 641 641 during the boot process until it is removed. This is not recommended 642 642 on a permanent basis.</para></listitem> 643 643 644 644 <listitem><para>Normally, all files in the <filename 645 645 class='directory'>/tmp</filename> directory are deleted at boot time. … … 647 647 noticeable delay in the boot process. To skip removing these files set the 648 648 variable SKIPTMPCLEAN=y.</para></listitem> 649 649 650 650 <listitem><para>During shutdown, the <command>init</command> program sends 651 651 a TERM signal to each program it has started (e.g. agetty), waits for a set … … 659 659 script can be skipped by setting the parameter 660 660 KILLDELAY=0.</para></listitem> 661 661 662 662 </itemizedlist> 663 663 664 664 </sect3> 665 665 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.