1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 | ]>
|
---|
7 |
|
---|
8 | <sect1 id="ch-scripts-bootscripts" role="wrap">
|
---|
9 | <?dbhtml filename="bootscripts.html"?>
|
---|
10 |
|
---|
11 | <title>Bootscripts for CLFS &bootscripts-clfs-version;</title>
|
---|
12 |
|
---|
13 | <indexterm zone="ch-scripts-bootscripts">
|
---|
14 | <primary sortas="a-Bootscripts">Bootscripts</primary>
|
---|
15 | </indexterm>
|
---|
16 |
|
---|
17 | <sect2 role="package">
|
---|
18 | <title/>
|
---|
19 |
|
---|
20 | <para>The Bootscripts package contains a set of scripts to
|
---|
21 | start/stop the CLFS system at bootup/shutdown.</para>
|
---|
22 |
|
---|
23 | </sect2>
|
---|
24 |
|
---|
25 | <sect2 role="installation">
|
---|
26 | <title>Installation of Bootscripts</title>
|
---|
27 |
|
---|
28 | <para os="s1">Update the bootscripts so they can be used in /tools:</para>
|
---|
29 |
|
---|
30 | <screen os="s2"><userinput>patch -Np1 -i ../bootscripts-cross-lfs-2.1-pre1-updates-1.patch</userinput></screen>
|
---|
31 |
|
---|
32 | <para os="a">Install the package:</para>
|
---|
33 |
|
---|
34 | <screen os="b"><userinput>make DESTDIR=/tools install-minimal</userinput></screen>
|
---|
35 |
|
---|
36 | <para os="c">The <command>setclock</command> script reads the time from the
|
---|
37 | hardware clock, also known as the BIOS or the Complementary Metal Oxide
|
---|
38 | Semiconductor (CMOS) clock. If the hardware clock is set to UTC, this
|
---|
39 | script will convert the hardware clock's time to the local time using
|
---|
40 | the <filename>/etc/localtime</filename> file (which tells the
|
---|
41 | <command>hwclock</command> program which timezone the user is in). There
|
---|
42 | is no way to detect whether or not the hardware clock is set to UTC, so
|
---|
43 | this needs to be configured manually.</para>
|
---|
44 |
|
---|
45 |
|
---|
46 |
|
---|
47 | <para os="d">If you do not know whether or not the hardware clock is set to UTC,
|
---|
48 | you can find out after you have booted the new machine by running the
|
---|
49 | <userinput>hwclock --localtime --show</userinput> command, and if
|
---|
50 | necessary editing the <filename>/etc/sysconfig/clock</filename> script.
|
---|
51 | The worst that will happen if you make a wrong guess here is that the
|
---|
52 | time displayed will be wrong.</para>
|
---|
53 |
|
---|
54 | <para os="e">Change the value of the <envar>UTC</envar> variable below
|
---|
55 | to a value of <option>0</option> (zero) if the hardware clock
|
---|
56 | is <emphasis>not</emphasis> set to UTC time.</para>
|
---|
57 |
|
---|
58 | <screen os="f"><userinput>cat > /tools/etc/sysconfig/clock << "EOF"
|
---|
59 | <literal># Begin /tools/etc/sysconfig/clock
|
---|
60 |
|
---|
61 | UTC=1
|
---|
62 |
|
---|
63 | # End /tools/etc/sysconfig/clock</literal>
|
---|
64 | EOF</userinput></screen>
|
---|
65 |
|
---|
66 | </sect2>
|
---|
67 |
|
---|
68 | <sect2 id="contents-bootscripts" role="content">
|
---|
69 | <title>Contents of Bootscripts</title>
|
---|
70 |
|
---|
71 | <segmentedlist>
|
---|
72 | <segtitle>Installed scripts</segtitle>
|
---|
73 |
|
---|
74 | <seglistitem>
|
---|
75 | <seg>checkfs, cleanfs, functions, halt, localnet, mountfs, mountkernfs,
|
---|
76 | rc, reboot, sendsignals, setclock, swap, and udev.</seg>
|
---|
77 | </seglistitem>
|
---|
78 | </segmentedlist>
|
---|
79 |
|
---|
80 | <variablelist>
|
---|
81 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
82 | <?dbfo list-presentation="list"?>
|
---|
83 | <?dbhtml list-presentation="table"?>
|
---|
84 |
|
---|
85 | <varlistentry id="checkfs-bootscripts">
|
---|
86 | <term><command>checkfs</command></term>
|
---|
87 | <listitem>
|
---|
88 | <para>Checks the integrity of the file systems before they are
|
---|
89 | mounted (with the exception of journal and network based file
|
---|
90 | systems)</para>
|
---|
91 | <indexterm zone="ch-scripts-bootscripts checkfs-bootscripts">
|
---|
92 | <primary sortas="d-checkfs">checkfs</primary>
|
---|
93 | </indexterm>
|
---|
94 | </listitem>
|
---|
95 | </varlistentry>
|
---|
96 |
|
---|
97 | <varlistentry id="cleanfs-bootscripts">
|
---|
98 | <term><command>cleanfs</command></term>
|
---|
99 | <listitem>
|
---|
100 | <para>Removes files that should not be preserved between reboots,
|
---|
101 | such as those in <filename class="directory">/var/run/</filename>
|
---|
102 | and <filename class="directory">/var/lock/</filename>; it re-creates
|
---|
103 | <filename>/var/run/utmp</filename> and removes the possibly present
|
---|
104 | <filename>/etc/nologin</filename>, <filename>/fastboot</filename>,
|
---|
105 | and <filename>/forcefsck</filename> files</para>
|
---|
106 | <indexterm zone="ch-scripts-bootscripts cleanfs-bootscripts">
|
---|
107 | <primary sortas="d-cleanfs">cleanfs</primary>
|
---|
108 | </indexterm>
|
---|
109 | </listitem>
|
---|
110 | </varlistentry>
|
---|
111 |
|
---|
112 | <varlistentry id="functions-bootscripts">
|
---|
113 | <term><command>functions</command></term>
|
---|
114 | <listitem>
|
---|
115 | <para>Contains common functions, such as error and status checking,
|
---|
116 | that are used by several bootscripts</para>
|
---|
117 | <indexterm zone="ch-scripts-bootscripts functions-bootscripts">
|
---|
118 | <primary sortas="d-functions">functions</primary>
|
---|
119 | </indexterm>
|
---|
120 | </listitem>
|
---|
121 | </varlistentry>
|
---|
122 |
|
---|
123 | <varlistentry id="halt-bootscripts">
|
---|
124 | <term><command>halt</command></term>
|
---|
125 | <listitem>
|
---|
126 | <para>Halts the system</para>
|
---|
127 | <indexterm zone="ch-scripts-bootscripts halt-bootscripts">
|
---|
128 | <primary sortas="d-halt">halt</primary>
|
---|
129 | </indexterm>
|
---|
130 | </listitem>
|
---|
131 | </varlistentry>
|
---|
132 |
|
---|
133 | <varlistentry id="localnet-bootscripts">
|
---|
134 | <term><command>localnet</command></term>
|
---|
135 | <listitem>
|
---|
136 | <para>Sets up the system's hostname and local loopback device</para>
|
---|
137 | <indexterm zone="ch-scripts-bootscripts localnet-bootscripts">
|
---|
138 | <primary sortas="d-localnet">localnet</primary>
|
---|
139 | </indexterm>
|
---|
140 | </listitem>
|
---|
141 | </varlistentry>
|
---|
142 |
|
---|
143 | <varlistentry id="mountfs-bootscripts">
|
---|
144 | <term><command>mountfs</command></term>
|
---|
145 | <listitem>
|
---|
146 | <para>Mounts all file systems, except ones that are marked
|
---|
147 | <emphasis>noauto</emphasis> or are network based</para>
|
---|
148 | <indexterm zone="ch-scripts-bootscripts mountfs-bootscripts">
|
---|
149 | <primary sortas="d-mountfs">mountfs</primary>
|
---|
150 | </indexterm>
|
---|
151 | </listitem>
|
---|
152 | </varlistentry>
|
---|
153 |
|
---|
154 | <varlistentry id="mountkernfs-bootscripts">
|
---|
155 | <term><command>mountkernfs</command></term>
|
---|
156 | <listitem>
|
---|
157 | <para>Mounts virtual kernel file systems, such as
|
---|
158 | <systemitem class="filesystem">proc</systemitem></para>
|
---|
159 | <indexterm zone="ch-scripts-bootscripts mountkernfs-bootscripts">
|
---|
160 | <primary sortas="d-mountkernfs">mountkernfs</primary>
|
---|
161 | </indexterm>
|
---|
162 | </listitem>
|
---|
163 | </varlistentry>
|
---|
164 |
|
---|
165 | <varlistentry id="rc-bootscripts">
|
---|
166 | <term><command>rc</command></term>
|
---|
167 | <listitem>
|
---|
168 | <para>The master run-level control script; it is responsible for
|
---|
169 | running all the other bootscripts one-by-one, in a sequence
|
---|
170 | determined by the name of the symbolic links being processed</para>
|
---|
171 | <indexterm zone="ch-scripts-bootscripts rc-bootscripts">
|
---|
172 | <primary sortas="d-rc">rc</primary>
|
---|
173 | </indexterm>
|
---|
174 | </listitem>
|
---|
175 | </varlistentry>
|
---|
176 |
|
---|
177 | <varlistentry id="reboot-bootscripts">
|
---|
178 | <term><command>reboot</command></term>
|
---|
179 | <listitem>
|
---|
180 | <para>Reboots the system</para>
|
---|
181 | <indexterm zone="ch-scripts-bootscripts reboot-bootscripts">
|
---|
182 | <primary sortas="d-reboot">reboot</primary>
|
---|
183 | </indexterm>
|
---|
184 | </listitem>
|
---|
185 | </varlistentry>
|
---|
186 |
|
---|
187 | <varlistentry id="sendsignals-bootscripts">
|
---|
188 | <term><command>sendsignals</command></term>
|
---|
189 | <listitem>
|
---|
190 | <para>Makes sure every process is terminated before the system reboots
|
---|
191 | or halts</para>
|
---|
192 | <indexterm zone="ch-scripts-bootscripts sendsignals-bootscripts">
|
---|
193 | <primary sortas="d-sendsignals">sendsignals</primary>
|
---|
194 | </indexterm>
|
---|
195 | </listitem>
|
---|
196 | </varlistentry>
|
---|
197 |
|
---|
198 | <varlistentry id="setclock-bootscripts">
|
---|
199 | <term><command>setclock</command></term>
|
---|
200 | <listitem>
|
---|
201 | <para>Resets the kernel clock to local time in case the hardware clock
|
---|
202 | is not set to UTC time</para>
|
---|
203 | <indexterm zone="ch-scripts-bootscripts setclock-bootscripts">
|
---|
204 | <primary sortas="d-setclock">setclock</primary>
|
---|
205 | </indexterm>
|
---|
206 | </listitem>
|
---|
207 | </varlistentry>
|
---|
208 |
|
---|
209 | <varlistentry id="swap-bootscripts">
|
---|
210 | <term><command>swap</command></term>
|
---|
211 | <listitem>
|
---|
212 | <para>Enables and disables swap files and partitions</para>
|
---|
213 | <indexterm zone="ch-scripts-bootscripts swap-bootscripts">
|
---|
214 | <primary sortas="d-swap">swap</primary>
|
---|
215 | </indexterm>
|
---|
216 | </listitem>
|
---|
217 | </varlistentry>
|
---|
218 |
|
---|
219 | <varlistentry id="eudev-bootscripts">
|
---|
220 | <term><command>udev</command></term>
|
---|
221 | <listitem>
|
---|
222 | <para>Starts and stops the Eudev daemon</para>
|
---|
223 | <indexterm zone="ch-scripts-bootscripts eudev-bootscripts">
|
---|
224 | <primary sortas="d-eudev">udev</primary>
|
---|
225 | </indexterm>
|
---|
226 | </listitem>
|
---|
227 | </varlistentry>
|
---|
228 |
|
---|
229 | </variablelist>
|
---|
230 |
|
---|
231 | </sect2>
|
---|
232 |
|
---|
233 | </sect1>
|
---|