Rewrite bootscripts and Chaper 7
[linux_from_scratch.git] / chapter07 / bootscripts.xml
blob151706572940f1e3ec63ea6e1676065d9481054b
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 ]>
8 <sect1 id="ch-scripts-bootscripts" role="wrap">
9   <?dbhtml filename="bootscripts.html"?>
11   <sect1info condition="script">
12     <productname>lfs-bootscripts</productname>
13     <productnumber>&lfs-bootscripts-version;</productnumber>
14     <address>&lfs-bootscripts-url;</address>
15   </sect1info>
17   <title>LFS-Bootscripts-&lfs-bootscripts-version;</title>
19   <indexterm zone="ch-scripts-bootscripts">
20     <primary sortas="a-Bootscripts">Bootscripts</primary>
21   </indexterm>
23   <sect2 role="package">
24     <title/>
26     <para>The LFS-Bootscripts package contains a set of scripts to start/stop the
27     LFS system at bootup/shutdown.</para>
29     <segmentedlist>
30       <segtitle>&buildtime;</segtitle>
31       <segtitle>&diskspace;</segtitle>
33       <seglistitem>
34         <seg>&lfs-bootscripts-ch7-sbu;</seg>
35         <seg>&lfs-bootscripts-ch7-du;</seg>
36       </seglistitem>
37     </segmentedlist>
39   </sect2>
41   <sect2 role="installation">
42     <title>Installation of LFS-Bootscripts</title>
44     <para>Install the package:</para>
46 <screen><userinput remap="install">make install</userinput></screen>
48   </sect2>
50   <sect2 id="contents-bootscripts" role="content">
51     <title>Contents of LFS-Bootscripts</title>
52     <segmentedlist>
53       <segtitle>Installed scripts</segtitle>
54       <segtitle>Installed directories</segtitle>
56       <seglistitem>
57         <seg>checkfs, cleanfs, console, consolelog, functions, halt, ifdown,
58         ifup, localnet, modules, mountfs, mountkernfs, network, rc, reboot,
59         sendsignals, setclock, static, swap, sysctl, sysklogd, template,
60         udev, and udev_retry</seg>
61         <seg>/etc/rc.d, /etc/sysconfig, /lib/boot</seg>
62       </seglistitem>
63     </segmentedlist>
65     <variablelist>
66       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
67       <?dbfo list-presentation="list"?>
68       <?dbhtml list-presentation="table"?>
70       <varlistentry id="checkfs-bootscripts">
71         <term><command>checkfs</command></term>
72         <listitem>
73           <para>Checks the integrity of the file systems before they are mounted
74           (with the exception of journal and network based file systems)</para>
75           <indexterm zone="ch-scripts-bootscripts checkfs-bootscripts">
76             <primary sortas="d-checkfs">checkfs</primary>
77           </indexterm>
78         </listitem>
79       </varlistentry>
81       <varlistentry id="cleanfs-bootscripts">
82         <term><command>cleanfs</command></term>
83         <listitem>
84           <para>Removes files that should not be preserved between reboots, such
85           as those in <filename class="directory">/var/run/</filename> and
86           <filename class="directory">/var/lock/</filename>; it re-creates
87           <filename>/var/run/utmp</filename> and removes the possibly present
88           <filename>/etc/nologin</filename>, <filename>/fastboot</filename>, and
89           <filename>/forcefsck</filename> files</para>
90           <indexterm zone="ch-scripts-bootscripts cleanfs-bootscripts">
91             <primary sortas="d-cleanfs">cleanfs</primary>
92           </indexterm>
93         </listitem>
94       </varlistentry>
96       <varlistentry id="console-bootscripts">
97         <term><command>console</command></term>
98         <listitem>
99           <para>Loads the correct keymap table for the desired keyboard layout;
100           it also sets the screen font</para>
101           <indexterm zone="ch-scripts-bootscripts console-bootscripts">
102             <primary sortas="d-console">console</primary>
103           </indexterm>
104         </listitem>
105       </varlistentry>
107       <varlistentry id="consolelog-bootscripts">
108         <term><command>consolelog</command></term>
109         <listitem>
110           <para>Sets the kernel log level to control messages reaching the
111           console.</para>
112           <indexterm zone="ch-scripts-bootscripts consolelog-bootscripts">
113             <primary sortas="d-consolelog">consolelog</primary>
114           </indexterm>
115         </listitem>
116       </varlistentry>
118       <varlistentry id="functions-bootscripts">
119         <term><command>functions</command></term>
120         <listitem>
121           <para>Contains common functions, such as error and status checking,
122           that are used by several bootscripts</para>
123           <indexterm zone="ch-scripts-bootscripts functions-bootscripts">
124             <primary sortas="d-functions">functions</primary>
125           </indexterm>
126         </listitem>
127       </varlistentry>
129       <varlistentry id="halt-bootscripts">
130         <term><command>halt</command></term>
131         <listitem>
132           <para>Halts the system</para>
133           <indexterm zone="ch-scripts-bootscripts halt-bootscripts">
134             <primary sortas="d-halt">halt</primary>
135           </indexterm>
136         </listitem>
137       </varlistentry>
139       <varlistentry id="ifdown-bootscripts">
140         <term><command>ifdown</command></term>
141         <listitem>
142           <para>Stops a network device</para>
143           <indexterm zone="ch-scripts-bootscripts ifdown-bootscripts">
144             <primary sortas="d-ifdown">ifdown</primary>
145           </indexterm>
146         </listitem>
147       </varlistentry>
149       <varlistentry id="ifup-bootscripts">
150         <term><command>ifup</command></term>
151         <listitem>
152           <para>Initializes a network device</para>
153           <indexterm zone="ch-scripts-bootscripts ifup-bootscripts">
154             <primary sortas="d-ifup">ifup</primary>
155           </indexterm>
156         </listitem>
157       </varlistentry>
159       <varlistentry id="localnet-bootscripts">
160         <term><command>localnet</command></term>
161         <listitem>
162           <para>Sets up the system's hostname and local loopback device</para>
163           <indexterm zone="ch-scripts-bootscripts localnet-bootscripts">
164             <primary sortas="d-localnet">localnet</primary>
165           </indexterm>
166         </listitem>
167       </varlistentry>
169       <varlistentry id="modules-bootscripts">
170         <term><command>modules</command></term>
171         <listitem>
172           <para>Loads kernel modules listed in
173           <filename>/etc/sysconfig/modules</filename>, using arguments
174           that are also given there</para>
175           <indexterm zone="ch-scripts-bootscripts modules-bootscripts">
176             <primary sortas="d-modules">modules</primary>
177           </indexterm>
178         </listitem>
179       </varlistentry>
181       <varlistentry id="mountfs-bootscripts">
182         <term><command>mountfs</command></term>
183         <listitem>
184           <para>Mounts all file systems, except ones that are marked
185           <emphasis>noauto</emphasis> or are network based</para>
186           <indexterm zone="ch-scripts-bootscripts mountfs-bootscripts">
187             <primary sortas="d-mountfs">mountfs</primary>
188           </indexterm>
189         </listitem>
190       </varlistentry>
192       <varlistentry id="mountkernfs-bootscripts">
193         <term><command>mountkernfs</command></term>
194         <listitem>
195           <para>Mounts virtual kernel file systems, such as <systemitem
196           class="filesystem">proc</systemitem></para>
197           <indexterm zone="ch-scripts-bootscripts mountkernfs-bootscripts">
198             <primary sortas="d-mountkernfs">mountkernfs</primary>
199           </indexterm>
200         </listitem>
201       </varlistentry>
203       <varlistentry id="network-bootscripts">
204         <term><command>network</command></term>
205         <listitem>
206           <para>Sets up network interfaces, such as network cards, and sets up
207           the default gateway (where applicable)</para>
208           <indexterm zone="ch-scripts-bootscripts network-bootscripts">
209             <primary sortas="d-network">network</primary>
210           </indexterm>
211         </listitem>
212       </varlistentry>
214       <varlistentry id="rc-bootscripts">
215         <term><command>rc</command></term>
216         <listitem>
217           <para>The master run-level control script; it is responsible for
218           running all the other bootscripts one-by-one, in a sequence determined
219           by the name of the symbolic links being processed</para>
220           <indexterm zone="ch-scripts-bootscripts rc-bootscripts">
221             <primary sortas="d-rc">rc</primary>
222           </indexterm>
223         </listitem>
224       </varlistentry>
226       <varlistentry id="reboot-bootscripts">
227         <term><command>reboot</command></term>
228         <listitem>
229           <para>Reboots the system</para>
230           <indexterm zone="ch-scripts-bootscripts reboot-bootscripts">
231             <primary sortas="d-reboot">reboot</primary>
232           </indexterm>
233         </listitem>
234       </varlistentry>
236       <varlistentry id="sendsignals-bootscripts">
237         <term><command>sendsignals</command></term>
238         <listitem>
239           <para>Makes sure every process is terminated before the system reboots
240           or halts</para>
241           <indexterm zone="ch-scripts-bootscripts sendsignals-bootscripts">
242             <primary sortas="d-sendsignals">sendsignals</primary>
243           </indexterm>
244         </listitem>
245       </varlistentry>
247       <varlistentry id="setclock-bootscripts">
248         <term><command>setclock</command></term>
249         <listitem>
250           <para>Resets the kernel clock to local time in case the hardware clock
251           is not set to UTC time</para>
252           <indexterm zone="ch-scripts-bootscripts setclock-bootscripts">
253             <primary sortas="d-setclock">setclock</primary>
254           </indexterm>
255         </listitem>
256       </varlistentry>
258       <varlistentry id="static-bootscripts">
259         <term><command>static</command></term>
260         <listitem>
261           <para>Provides the functionality needed to assign a static Internet
262           Protocol (IP) address to a network interface</para>
263           <indexterm zone="ch-scripts-bootscripts static-bootscripts">
264             <primary sortas="d-static">static</primary>
265           </indexterm>
266         </listitem>
267       </varlistentry>
269       <varlistentry id="swap-bootscripts">
270         <term><command>swap</command></term>
271         <listitem>
272           <para>Enables and disables swap files and partitions</para>
273           <indexterm zone="ch-scripts-bootscripts swap-bootscripts">
274             <primary sortas="d-swap">swap</primary>
275           </indexterm>
276         </listitem>
277       </varlistentry>
279       <varlistentry id="sysctl-bootscripts">
280         <term><command>sysctl</command></term>
281         <listitem>
282           <para>Loads system configuration values from
283           <filename>/etc/sysctl.conf</filename>, if that file exists,
284           into the running kernel</para>
285           <indexterm zone="ch-scripts-bootscripts sysctl-bootscripts">
286             <primary sortas="d-sysctl">sysctl</primary>
287           </indexterm>
288         </listitem>
289       </varlistentry>
291       <varlistentry id="sysklogd-bootscripts">
292         <term><command>sysklogd</command></term>
293         <listitem>
294           <para>Starts and stops the system and kernel log daemons</para>
295           <indexterm zone="ch-scripts-bootscripts sysklogd-bootscripts">
296             <primary sortas="d-sysklogd">sysklogd</primary>
297           </indexterm>
298         </listitem>
299       </varlistentry>
301       <varlistentry id="template-bootscripts">
302         <term><command>template</command></term>
303         <listitem>
304           <para>A template to create custom bootscripts for other
305           daemons</para>
306           <indexterm zone="ch-scripts-bootscripts template-bootscripts">
307             <primary sortas="d-template">template</primary>
308           </indexterm>
309         </listitem>
310       </varlistentry>
312       <varlistentry id="udev-bootscripts">
313         <term><command>udev</command></term>
314         <listitem>
315           <para>Prepares the <filename class="directory">/dev</filename>
316           directory and starts Udev</para>
317           <indexterm zone="ch-scripts-bootscripts udev-bootscripts">
318             <primary sortas="d-udev">udev</primary>
319           </indexterm>
320         </listitem>
321       </varlistentry>
323       <varlistentry id="udev-retry-bootscripts">
324         <term><command>udev_retry</command></term>
325         <listitem>
326           <para>Retries failed udev uevents, and copies generated rules
327           files from to
328           <filename class="directory">/etc/udev/rules.d</filename> if required</para>
329           <indexterm zone="ch-scripts-bootscripts udev-retry-bootscripts">
330             <primary sortas="d-udev-retry">udev_retry</primary>
331           </indexterm>
332         </listitem>
333       </varlistentry>
335     </variablelist>
337   </sect2>
339 </sect1>