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

clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since a8fffb2 was 2700ccd, checked in by William Harrington <kb0iic@…>, 11 years ago

Remove offending pidof command entry conflicting with procps-ng pidof install.

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