source: BOOK/boot/common/sysvinit.xml@ ba2a6ce0

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since ba2a6ce0 was dbc8e54, checked in by Chris Staub <chris@…>, 10 years ago

Started moving stuff in boot section to /tools, starting with inittab and its references to agetty

  • Property mode set to 100644
File size: 9.0 KB
RevLine 
[3f8be484]1<?xml version="1.0" encoding="ISO-8859-1"?>
[aa18ac0]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[3f8be484]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-boot-sysvinit" role="wrap">
9 <?dbhtml filename="sysvinit.html"?>
10
11 <title>Sysvinit-&sysvinit-version;</title>
12
13 <indexterm zone="ch-boot-sysvinit">
14 <primary sortas="a-Sysvinit">Sysvinit</primary>
15 <secondary>boot</secondary>
16 </indexterm>
17
[d5f948c]18 <sect2 role="package">
19 <title/>
20
21 <para>The Sysvinit package contains programs for controlling the startup,
22 running, and shutdown of the system.</para>
23
24 </sect2>
[3f8be484]25
26 <sect2 role="installation">
27 <title>Installation of Sysvinit</title>
28
[3b0c31e]29 <para os="aa">The following modifications help locate files specific to this
[6243b1f]30 particular build:</para>
[3f8be484]31
[3b0c31e]32<screen os="ab"><userinput>cp -v src/Makefile{,.orig}
33sed -e 's,/usr/lib,/tools/lib,g' \
34 src/Makefile.orig > src/Makefile</userinput></screen>
[3f8be484]35
[dbc8e54]36 <para os="bc">Change the location of inittab:</para>
37
38<screen os="bd"><userinput>cp -v src/paths.h{,.orig}
39sed 's@/etc/inittab@/tools&amp;@' src/paths.h.orig &gt; src/paths.h</userinput></screen>
40
[d5f948c]41 <para os ="c">Compile the package:</para>
[3f8be484]42
43<screen os="ac"><userinput>make -C src clobber
44make -C src CC="${CC}"</userinput></screen>
45
[d5f948c]46 <para os="e">Install the package:</para>
[3f8be484]47
[3b0c31e]48<screen os="ad"><userinput>make -C src ROOT=${CLFS} install</userinput></screen>
[3f8be484]49
50 </sect2>
51
52 <sect2 id="conf-tools-sysvinit" role="configuration">
53 <title>Configuring Sysvinit</title>
54
55 <indexterm zone="conf-tools-sysvinit">
56 <primary sortas="a-Sysvinit">Sysvinit</primary>
57 <secondary>boot, configuring</secondary>
58 </indexterm>
59
60 <indexterm zone="conf-tools-sysvinit">
[91ad4a4]61 <primary sortas="e-/etc/inittab">/etc/inittab</primary>
[3f8be484]62 </indexterm>
63
[dbc8e54]64 <para>Create a new file <filename>/tools/etc/inittab</filename> by running the
[1da2a84]65 following:</para>
[3f8be484]66
[dbc8e54]67<screen><userinput>cat &gt; /tools/etc/inittab &lt;&lt; "EOF"
68<literal># Begin /tools/etc/inittab
[3f8be484]69
70id:3:initdefault:
71
72si::sysinit:/etc/rc.d/init.d/rc sysinit
73
74l0:0:wait:/etc/rc.d/init.d/rc 0
75l1:S1:wait:/etc/rc.d/init.d/rc 1
76l2:2:wait:/etc/rc.d/init.d/rc 2
77l3:3:wait:/etc/rc.d/init.d/rc 3
78l4:4:wait:/etc/rc.d/init.d/rc 4
79l5:5:wait:/etc/rc.d/init.d/rc 5
80l6:6:wait:/etc/rc.d/init.d/rc 6
81
82ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
83
[dbc8e54]84su:S016:once:/tools/sbin/sulogin
[1da2a84]85</literal>
86EOF</userinput></screen>
87
88 <para>The following command adds the standard virtual terminals to
[dbc8e54]89 <filename>/tools/etc/inittab</filename>. If your system only has a serial
[1da2a84]90 console skip the following command:</para>
[3f8be484]91
[dbc8e54]92<screen><userinput>cat &gt;&gt; /tools/etc/inittab &lt;&lt; "EOF"
93<literal>1:2345:respawn:/tools/sbin/agetty --noclear -I '\033(K' tty1 9600
942:2345:respawn:/tools/sbin/agetty --noclear -I '\033(K' tty2 9600
953:2345:respawn:/tools/sbin/agetty --noclear -I '\033(K' tty3 9600
964:2345:respawn:/tools/sbin/agetty --noclear -I '\033(K' tty4 9600
975:2345:respawn:/tools/sbin/agetty --noclear -I '\033(K' tty5 9600
986:2345:respawn:/tools/sbin/agetty --noclear -I '\033(K' tty6 9600
[1da2a84]99</literal>
100EOF</userinput></screen>
101
[d1ff581]102 <para>If your system has a serial console, run the following command to add
[dbc8e54]103 the entry to <filename>/tools/etc/inittab</filename>.</para>
[1da2a84]104
[dbc8e54]105<screen><userinput>cat &gt;&gt; /tools/etc/inittab &lt;&lt; "EOF"
106<literal>c0:12345:respawn:/tools/sbin/agetty --noclear 115200 ttyS0 vt100
[1da2a84]107</literal>
108EOF</userinput></screen>
109
[dbc8e54]110 <para>Finally, add the end line to <filename>/tools/etc/inittab</filename>.</para>
[3f8be484]111
[dbc8e54]112<screen><userinput>cat &gt;&gt; /tools/etc/inittab &lt;&lt; "EOF"
113<literal># End /tools/etc/inittab</literal>
[3f8be484]114EOF</userinput></screen>
115
[d5f948c]116 <para>The <parameter>-I '\033(K'</parameter> option tells
117 <command>agetty</command> to send this escape sequence to the terminal
118 before doing anything else. This escape sequence switches the console
119 character set to a user-defined one, which can be modified by running
120 the <command>setfont</command> program. The <command>console</command>
121 initscript from the CLFS-Bootscripts package calls the
122 <command>setfont</command> program during system startup. Sending this
123 escape sequence is necessary for people who use non-ISO 8859-1 screen
124 fonts, but it does not affect native English speakers.</para>
125
126 </sect2>
127
128 <sect2 id="contents-sysvinit" role="content">
129 <title>Contents of Sysvinit</title>
130
131 <segmentedlist>
132 <segtitle>Installed programs</segtitle>
133
134 <seglistitem>
[2700ccd]135 <seg>bootlogd, fstab-decode, halt, init, killall5,
136 poweroff (link to halt), reboot (link to halt), runlevel,
[d5f948c]137 shutdown, and telinit (link to init)</seg>
138 </seglistitem>
139 </segmentedlist>
140
141 <variablelist>
142 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
143 <?dbfo list-presentation="list"?>
144 <?dbhtml list-presentation="table"?>
145
146 <varlistentry id="bootlogd">
147 <term><command>bootlogd</command></term>
148 <listitem>
149 <para>Logs boot messages to a log file</para>
150 <indexterm zone="ch-boot-sysvinit bootlogd">
151 <primary sortas="b-bootlogd">bootlogd</primary>
152 </indexterm>
153 </listitem>
154 </varlistentry>
155
156 <varlistentry id="fstab-decode">
157 <term><command>fstab-decode</command></term>
158 <listitem>
159 <para>Runs a command with fstab-encoded arguments</para>
160 <indexterm zone="ch-boot-sysvinit fstab-decode">
161 <primary sortas="b-fstab-decode">fstab-decode</primary>
162 </indexterm>
163 </listitem>
164 </varlistentry>
165
166 <varlistentry id="halt">
167 <term><command>halt</command></term>
168 <listitem>
169 <para>Normally invokes <command>shutdown</command> with the
170 <parameter>-h</parameter> option, except when already in run-level 0,
171 then it tells the kernel to halt the system; it notes in the
172 file <filename>/var/log/wtmp</filename> that the system is being
173 brought down</para>
174 <indexterm zone="ch-boot-sysvinit halt">
175 <primary sortas="b-halt">halt</primary>
176 </indexterm>
177 </listitem>
178 </varlistentry>
179
180 <varlistentry id="init">
181 <term><command>init</command></term>
182 <listitem>
183 <para>The first process to be started when the kernel has initialized
184 the hardware which takes over the boot process and starts all the
185 proceses it is instructed to</para>
186 <indexterm zone="ch-boot-sysvinit init">
187 <primary sortas="b-init">init</primary>
188 </indexterm>
189 </listitem>
190 </varlistentry>
191
192 <varlistentry id="killall5">
193 <term><command>killall5</command></term>
194 <listitem>
195 <para>Sends a signal to all processes, except the processes in its own
196 session so it will not kill the shell running the script that called
197 it</para>
198 <indexterm zone="ch-boot-sysvinit killall5">
199 <primary sortas="b-killall5">killall5</primary>
200 </indexterm>
201 </listitem>
202 </varlistentry>
203
204 <varlistentry id="poweroff">
205 <term><command>poweroff</command></term>
206 <listitem>
207 <para>Tells the kernel to halt the system and switch off the computer
208 (see <command>halt</command>)</para>
209 <indexterm zone="ch-boot-sysvinit poweroff">
210 <primary sortas="b-poweroff">poweroff</primary>
211 </indexterm>
212 </listitem>
213 </varlistentry>
214
215 <varlistentry id="reboot">
216 <term><command>reboot</command></term>
217 <listitem>
218 <para>Tells the kernel to reboot the system (see
219 <command>halt</command>)</para>
220 <indexterm zone="ch-boot-sysvinit reboot">
221 <primary sortas="b-reboot">reboot</primary>
222 </indexterm>
223 </listitem>
224 </varlistentry>
225
226 <varlistentry id="runlevel">
227 <term><command>runlevel</command></term>
228 <listitem>
229 <para>Reports the previous and the current run-level, as noted in
230 the last run-level record in <filename>/var/run/utmp</filename></para>
231 <indexterm zone="ch-boot-sysvinit runlevel">
232 <primary sortas="b-runlevel">runlevel</primary>
233 </indexterm>
234 </listitem>
235 </varlistentry>
236
237 <varlistentry id="shutdown">
238 <term><command>shutdown</command></term>
239 <listitem>
240 <para>Brings the system down in a secure way, signaling all processes
241 and notifying all logged-in users</para>
242 <indexterm zone="ch-boot-sysvinit shutdown">
243 <primary sortas="b-shutdown">shutdown</primary>
244 </indexterm>
245 </listitem>
246 </varlistentry>
247
248 <varlistentry id="telinit">
249 <term><command>telinit</command></term>
250 <listitem>
251 <para>Tells <command>init</command> which run-level to change to</para>
252 <indexterm zone="ch-boot-sysvinit telinit">
253 <primary sortas="b-telinit">telinit</primary>
254 </indexterm>
255 </listitem>
256 </varlistentry>
257
258 </variablelist>
259
[3f8be484]260 </sect2>
261
262</sect1>
Note: See TracBrowser for help on using the repository browser.