mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-18 13:07:50 +00:00
Remove spaces at end o lines - chapterO9
This commit is contained in:
parent
df732b51c0
commit
c34b4fb1c6
@ -24,7 +24,7 @@
|
||||
<title/>
|
||||
|
||||
<para>The LFS-Bootscripts package contains a set of scripts to start/stop
|
||||
the LFS system at bootup/shutdown.
|
||||
the LFS system at bootup/shutdown.
|
||||
The configuration files and procedures needed to
|
||||
customize the boot process are described in the following sections.</para>
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
language-specific HOWTOs can also help with this, see <ulink
|
||||
url="http://www.tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>.
|
||||
Examine the output of <command>localectl list-keymaps</command> for a list of
|
||||
valid console keymaps. Look in the
|
||||
valid console keymaps. Look in the
|
||||
<filename class="directory">/usr/share/consolefonts</filename>
|
||||
directory for valid screen fonts.</para>
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
additional scripts that perform the tasks required to initialize the
|
||||
system.</para>
|
||||
|
||||
<para>The <command>init</command> program is controlled by the
|
||||
<para>The <command>init</command> program is controlled by the
|
||||
<filename>/etc/inittab</filename> file and is organized into run levels that
|
||||
can be run by the user:</para>
|
||||
|
||||
@ -61,10 +61,10 @@
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>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
|
||||
<para>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
|
||||
after the login prompt.</para>
|
||||
</listitem>
|
||||
|
||||
|
@ -80,7 +80,7 @@ LC_ALL=<locale name> locale int_prefix</userinput></screen>
|
||||
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 8 or is not
|
||||
that your locale was either not installed in Chapter 8 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>
|
||||
@ -142,7 +142,7 @@ EOF</userinput></screen>
|
||||
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>). It's suggested that you use the <quote>C</quote> locale only
|
||||
8-bit</quote>). It's suggested that you use the <quote>C</quote> locale only
|
||||
if you are certain that you will never need 8-bit characters.</para>
|
||||
|
||||
<!--
|
||||
|
@ -31,7 +31,7 @@
|
||||
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 <command>ip link</command> or <command>ls
|
||||
/sys/class/net</command> after you have booted your system.
|
||||
/sys/class/net</command> after you have booted your system.
|
||||
</para></note>
|
||||
|
||||
<para>The following command creates a sample file for the
|
||||
@ -157,21 +157,21 @@ EOF</userinput></screen>
|
||||
<indexterm zone="ch-config-hosts">
|
||||
<primary sortas="e-/etc/hosts">/etc/hosts</primary>
|
||||
</indexterm>
|
||||
|
||||
|
||||
<indexterm zone="ch-config-hosts">
|
||||
<primary sortas="d-localnet">localnet</primary>
|
||||
<secondary>/etc/hosts</secondary>
|
||||
</indexterm>
|
||||
|
||||
|
||||
<indexterm zone="ch-config-hosts">
|
||||
<primary sortas="d-network">network</primary>
|
||||
<secondary>/etc/hosts</secondary>
|
||||
</indexterm>
|
||||
|
||||
|
||||
<para>Decide on the IP address, fully-qualified domain name (FQDN), and
|
||||
possible aliases for use in the <filename>/etc/hosts</filename> file. The
|
||||
syntax 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
|
||||
@ -186,13 +186,13 @@ EOF</userinput></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>Create the <filename>/etc/hosts</filename> file by running:</para>
|
||||
|
||||
<screen><userinput>cat > /etc/hosts << "EOF"
|
||||
@ -209,7 +209,7 @@ ff02::2 ip6-allrouters
|
||||
EOF</userinput></screen>
|
||||
|
||||
<para>The <replaceable><192.168.1.1></replaceable>,
|
||||
<replaceable><FQDN></replaceable>, and
|
||||
<replaceable><FQDN></replaceable>, and
|
||||
<replaceable><HOSTNAME></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
|
||||
|
@ -38,7 +38,7 @@
|
||||
<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
|
||||
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>
|
||||
@ -57,7 +57,7 @@
|
||||
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.
|
||||
will usually have the name wifi0 or wlan0.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@ -75,8 +75,8 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Create a manual naming scheme, for example by naming the
|
||||
interfaces something like "internet0", "dmz0", or "lan0".
|
||||
To do that, create .link files in /etc/systemd/network/ that
|
||||
interfaces something like "internet0", "dmz0", or "lan0".
|
||||
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:
|
||||
</para>
|
||||
@ -91,13 +91,13 @@ Name=ether0</literal>
|
||||
EOF</userinput></screen>
|
||||
|
||||
<para>
|
||||
See the man page systemd.link(5) for more information.
|
||||
See the man page systemd.link(5) for more information.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
In /boot/grub/grub.cfg, pass the option net.ifnames=0 on the
|
||||
In /boot/grub/grub.cfg, pass the option net.ifnames=0 on the
|
||||
kernel command line.
|
||||
</para>
|
||||
</listitem>
|
||||
@ -209,7 +209,7 @@ EOF</userinput></screen>
|
||||
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 <emphasis>nameserver</emphasis> line from the file.
|
||||
remove the second <emphasis>nameserver</emphasis> 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.</para>
|
||||
@ -252,12 +252,12 @@ EOF</userinput></screen>
|
||||
<indexterm zone="ch-config-hosts">
|
||||
<primary sortas="e-/etc/hosts">/etc/hosts</primary>
|
||||
</indexterm>
|
||||
|
||||
|
||||
<indexterm zone="ch-config-hosts">
|
||||
<primary sortas="d-localnet">localnet</primary>
|
||||
<secondary>/etc/hosts</secondary>
|
||||
</indexterm>
|
||||
|
||||
|
||||
<indexterm zone="ch-config-hosts">
|
||||
<primary sortas="d-network">network</primary>
|
||||
<secondary>/etc/hosts</secondary>
|
||||
|
@ -103,7 +103,7 @@ LC_ALL=<locale name> locale int_prefix</userinput></screen>
|
||||
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 <xref linkend="ch-system-glibc"/>
|
||||
that your locale was either not installed in <xref linkend="ch-system-glibc"/>
|
||||
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>
|
||||
|
@ -22,7 +22,7 @@
|
||||
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
|
||||
could get renumbered the other way around.</para>
|
||||
|
||||
|
||||
<para>In the new naming scheme, typical network device names would then
|
||||
be something like enp5s0 or wlp3s0. If this naming convention is not
|
||||
desired, the traditional naming scheme or a custom scheme can be
|
||||
@ -30,20 +30,20 @@
|
||||
|
||||
<sect3>
|
||||
<title>Disabling Persistent Naming on the Kernel Command Line</title>
|
||||
|
||||
|
||||
<para>The traditional naming scheme using eth0, eth1, etc can be
|
||||
restored by adding <userinput>net.ifnames=0</userinput> on the
|
||||
restored by adding <userinput>net.ifnames=0</userinput> on the
|
||||
kernel command line. This is most appropriate for those systems
|
||||
that have only one ethernet device of the same type. Laptops
|
||||
often have multiple ethernet connections that are named eth0 and
|
||||
wlan0 and are also candidates for this method. The command line
|
||||
is passed in the GRUB configuration file.
|
||||
often have multiple ethernet connections that are named eth0 and
|
||||
wlan0 and are also candidates for this method. The command line
|
||||
is passed in the GRUB configuration file.
|
||||
See <xref linkend="grub-cfg"/>.</para>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>Creating Custom Udev Rules</title>
|
||||
|
||||
|
||||
<para>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:</para>
|
||||
@ -61,7 +61,7 @@
|
||||
the network rules file may not have been generated because addresses
|
||||
are not consistently assigned. In these cases, this method cannot
|
||||
be used.</para></note>
|
||||
|
||||
|
||||
<para>The file begins with a comment block followed by two lines for each
|
||||
NIC. The first line for each NIC is a commented description showing its
|
||||
hardware IDs (e.g. its PCI vendor and device IDs, if it's a PCI card),
|
||||
@ -69,11 +69,11 @@
|
||||
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.</para>
|
||||
|
||||
|
||||
<para>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:</para>
|
||||
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><literal>SUBSYSTEM=="net"</literal> - This tells udev to ignore
|
||||
@ -106,7 +106,7 @@
|
||||
udev will assign to this interface.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
|
||||
<para>The value of <literal>NAME</literal> is the important part. Make sure
|
||||
you know which name has been assigned to each of your network cards before
|
||||
proceeding, and be sure to use that <literal>NAME</literal> value when
|
||||
|
@ -50,13 +50,13 @@ EOF</userinput></screen>
|
||||
<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 executing the
|
||||
a tmpfs. If this is not desired, it can be overridden by executing the
|
||||
following command:</para>
|
||||
|
||||
<screen role="nodump"><userinput>ln -sfv /dev/null /etc/systemd/system/tmp.mount</userinput></screen>
|
||||
|
||||
<para>Alternatively, if a separate partition for
|
||||
<filename class="directory">/tmp</filename> is desired, specify that
|
||||
<filename class="directory">/tmp</filename> is desired, specify that
|
||||
partition in a <filename>/etc/fstab</filename> entry.</para>
|
||||
|
||||
<warning>
|
||||
@ -81,9 +81,9 @@ EOF</userinput></screen>
|
||||
<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
|
||||
<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
|
||||
@ -94,9 +94,9 @@ EOF</userinput></screen>
|
||||
|
||||
<para>
|
||||
Note that the syntax for the
|
||||
<filename>/usr/lib/tmpfiles.d/*.conf</filename> files can be
|
||||
<filename>/usr/lib/tmpfiles.d/*.conf</filename> files can be
|
||||
confusing. For example, the default deletion of files in the /tmp directory
|
||||
is located in <filename>/usr/lib/tmpfiles.d/tmp.conf</filename> with
|
||||
is located in <filename>/usr/lib/tmpfiles.d/tmp.conf</filename> with
|
||||
the line:
|
||||
|
||||
<screen role="nodump">q /tmp 1777 root root 10d</screen>
|
||||
@ -148,7 +148,7 @@ EOF</userinput></screen>
|
||||
<para>Rather than plain shell scripts used in SysVinit or BSD style init
|
||||
systems, systemd uses a unified format for different types of startup
|
||||
files (or units). The command <command>systemctl</command> is used to
|
||||
enable, disable, control state, and obtain status of unit files. Here
|
||||
enable, disable, control state, and obtain status of unit files. Here
|
||||
are some examples of frequently used commands:</para>
|
||||
|
||||
<itemizedlist>
|
||||
|
@ -119,7 +119,7 @@
|
||||
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 id="module-loading">
|
||||
<title>Module Loading</title>
|
||||
|
||||
@ -223,12 +223,12 @@
|
||||
|
||||
<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> dependencies. See
|
||||
<literal>pre:</literal> and <literal>post:</literal> dependencies. See
|
||||
the <filename>modprobe.d(5)</filename> manual page for more information
|
||||
on <quote>softdep</quote> syntax and capabilities.</para>
|
||||
|
||||
<para revision="sysv">If the module in question is not a wrapper and is
|
||||
useful by itself, configure the <command>modules</command> bootscript to
|
||||
<para revision="sysv">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>
|
||||
|
@ -24,7 +24,7 @@
|
||||
system to another, so it cannot be assumed that because things worked in one
|
||||
particular Linux distribution, they should work the same in LFS too. LFS has its
|
||||
own way of doing things, but it respects generally accepted standards.</para>
|
||||
|
||||
|
||||
<para>SysVinit (which will be referred to as <quote>init</quote> from now on)
|
||||
works using a run-levels scheme. There are seven (numbered 0 to 6) run-levels
|
||||
(actually, there are more run-levels, but they are for special cases and are
|
||||
@ -233,7 +233,7 @@ EOF</userinput></screen>
|
||||
<device> is an absolute path in /dev or /sys such as /dev/sr0 or
|
||||
/sys/class/rtc.</para>
|
||||
|
||||
<para>For information on kernel module loading and udev, see
|
||||
<para>For information on kernel module loading and udev, see
|
||||
<xref linkend="module-loading"/>.</para>
|
||||
</sect2>
|
||||
|
||||
@ -535,28 +535,28 @@ EOF</userinput></screen>
|
||||
|
||||
<sect2 id="ch-config-createfiles">
|
||||
<title>Creating Files at Boot</title>
|
||||
|
||||
|
||||
<indexterm zone="ch-config-createfiles">
|
||||
<primary sortas="d-createfiles">File creation at boot</primary>
|
||||
<secondary>configuring</secondary>
|
||||
</indexterm>
|
||||
|
||||
|
||||
<para>At times, it is desirable to create files at boot time. For instance,
|
||||
the <filename class="directory">/tmp/.ICE-unix</filename> directory
|
||||
is often needed. This can be done by creating an entry in the
|
||||
<filename>/etc/sysconfig/createfiles</filename> configuration script.
|
||||
The format of this file is embedded in the comments of the default
|
||||
The format of this file is embedded in the comments of the default
|
||||
configuration file.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="ch-config-sysklogd">
|
||||
<title>Configuring the sysklogd Script</title>
|
||||
|
||||
|
||||
<indexterm zone="ch-config-sysklogd">
|
||||
<primary sortas="d-sysklogd">sysklogd</primary>
|
||||
<secondary>configuring</secondary>
|
||||
</indexterm>
|
||||
|
||||
|
||||
<para>The <filename>sysklogd</filename> script invokes the
|
||||
<command>syslogd</command> program as a part of System V initialization. The
|
||||
<parameter>-m 0</parameter> option turns off the periodic timestamp mark that
|
||||
@ -574,11 +574,11 @@ EOF</userinput></screen>
|
||||
|
||||
<sect2 id="ch-config-site">
|
||||
<title>The rc.site File</title>
|
||||
|
||||
|
||||
<indexterm zone="ch-config-site">
|
||||
<primary sortas="a-rc.site">rc.site</primary>
|
||||
</indexterm>
|
||||
|
||||
|
||||
<para>The optional <filename>/etc/sysconfig/rc.site</filename> file contains
|
||||
settings that are automatically set for each SystemV boot script. It can
|
||||
alternatively set the values specified in the <filename>hostname</filename>,
|
||||
@ -587,33 +587,33 @@ EOF</userinput></screen>
|
||||
associated variables are present in both these separate files and
|
||||
<filename>rc.site</filename>, the values in the script specific files have
|
||||
precedence. </para>
|
||||
|
||||
|
||||
<para><filename>rc.site</filename> also contains parameters that can
|
||||
customize other aspects of the boot process. Setting the IPROMPT variable
|
||||
will enable selective running of bootscripts. Other options are described
|
||||
in the file comments. The default version of the file is as follows:</para>
|
||||
|
||||
|
||||
<!-- Use role to fix a pdf generation problem -->
|
||||
<screen role="auto">&site;</screen>
|
||||
|
||||
|
||||
<sect3>
|
||||
<title>Customizing the Boot and Shutdown Scripts</title>
|
||||
|
||||
|
||||
<para>The LFS boot scripts boot and shut down a system in a fairly
|
||||
efficient manner, but there are a few tweaks that you can make in the
|
||||
rc.site file to improve speed even more and to adjust messages according
|
||||
to your preferences. To do this, adjust the settings in
|
||||
the <filename>/etc/sysconfig/rc.site</filename> file above.</para>
|
||||
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
|
||||
<listitem><para>During the boot script <filename>udev</filename>, there is
|
||||
a call to <command>udev settle</command> that requires some time to
|
||||
complete. This time may or may not be required depending on devices present
|
||||
in the system. If you only have simple partitions and a single ethernet
|
||||
card, the boot process will probably not need to wait for this command. To
|
||||
skip it, set the variable OMIT_UDEV_SETTLE=y.</para></listitem>
|
||||
|
||||
|
||||
<listitem><para>The boot script <filename>udev_retry</filename> also runs
|
||||
<command>udev settle</command> by default. This command is only needed by
|
||||
default if the <filename class='directory'>/var</filename> directory is
|
||||
@ -622,12 +622,12 @@ EOF</userinput></screen>
|
||||
also need to wait for udev to complete, but in many installations it is not
|
||||
needed. Skip the command by setting the variable OMIT_UDEV_RETRY_SETTLE=y.
|
||||
</para></listitem>
|
||||
|
||||
|
||||
<listitem><para>By default, the file system checks are silent. This can
|
||||
appear to be a delay during the bootup process. To turn on the
|
||||
<command>fsck</command> output, set the variable VERBOSE_FSCK=y.
|
||||
</para></listitem>
|
||||
|
||||
|
||||
<listitem><para>When rebooting, you may want to skip the filesystem check,
|
||||
<command>fsck</command>, completely. To do this, either create the file
|
||||
<filename>/fastboot</filename> or reboot the system with the command
|
||||
@ -636,17 +636,17 @@ EOF</userinput></screen>
|
||||
<filename>/forcefsck</filename> or running <command>shutdown</command> with
|
||||
the <parameter>-F</parameter> parameter instead of <parameter>-f</parameter>.
|
||||
</para>
|
||||
|
||||
|
||||
<para>Setting the variable FASTBOOT=y will disable <command>fsck</command>
|
||||
during the boot process until it is removed. This is not recommended
|
||||
on a permanent basis.</para></listitem>
|
||||
|
||||
|
||||
<listitem><para>Normally, all files in the <filename
|
||||
class='directory'>/tmp</filename> directory are deleted at boot time.
|
||||
Depending on the number of files or directories present, this can cause a
|
||||
noticeable delay in the boot process. To skip removing these files set the
|
||||
variable SKIPTMPCLEAN=y.</para></listitem>
|
||||
|
||||
|
||||
<listitem><para>During shutdown, the <command>init</command> program sends
|
||||
a TERM signal to each program it has started (e.g. agetty), waits for a set
|
||||
time (default 3 seconds), and sends each process a KILL signal and waits
|
||||
@ -658,9 +658,9 @@ EOF</userinput></screen>
|
||||
-t0 -r now</command>). The delay for the <command>sendsignals</command>
|
||||
script can be skipped by setting the parameter
|
||||
KILLDELAY=0.</para></listitem>
|
||||
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
|
||||
</sect3>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
Loading…
Reference in New Issue
Block a user