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 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
19 | href="../../final-system/common/sysvinit.xml"
|
---|
20 | xpointer="xpointer(//*[@role='package'])"/>
|
---|
21 |
|
---|
22 | <sect2 role="installation">
|
---|
23 | <title>Installation of Sysvinit</title>
|
---|
24 |
|
---|
25 | <para os="aa">Make some modifications to allow you to boot into
|
---|
26 | the minimal temp-system:</para>
|
---|
27 |
|
---|
28 | <screen os="ab"><userinput>cp -v src/Makefile src/Makefile.orig
|
---|
29 | sed -e 's@root@0@g' \
|
---|
30 | -e "s@/dev/initctl@${CLFS}&@g" \
|
---|
31 | -e 's@\(mknod \)-m \([0-9]* \)\(.* \)p@\1\3p; chmod \2\3@g' \
|
---|
32 | -e "s@/usr/lib@/tools/lib@" \
|
---|
33 | src/Makefile.orig > src/Makefile</userinput></screen>
|
---|
34 |
|
---|
35 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
36 | href="../../final-system/common/sysvinit.xml"
|
---|
37 | xpointer="xpointer(//*[@os='c'])"/>
|
---|
38 |
|
---|
39 | <screen os="ac"><userinput>make -C src clobber
|
---|
40 | make -C src CC="${CC}"</userinput></screen>
|
---|
41 |
|
---|
42 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
|
---|
43 | href="../../final-system/common/sysvinit.xml"
|
---|
44 | xpointer="xpointer(//*[@os='e'])"/>
|
---|
45 |
|
---|
46 | <screen os="ad"><userinput>make -C src install INSTALL=install ROOT=${CLFS}</userinput></screen>
|
---|
47 |
|
---|
48 | </sect2>
|
---|
49 |
|
---|
50 | <sect2 id="conf-tools-sysvinit" role="configuration">
|
---|
51 | <title>Configuring Sysvinit</title>
|
---|
52 |
|
---|
53 | <indexterm zone="conf-tools-sysvinit">
|
---|
54 | <primary sortas="a-Sysvinit">Sysvinit</primary>
|
---|
55 | <secondary>boot, configuring</secondary>
|
---|
56 | </indexterm>
|
---|
57 |
|
---|
58 | <indexterm zone="conf-tools-sysvinit">
|
---|
59 | <primary sortas="e-/etc/inittab">/etc/inittab</primary>
|
---|
60 | </indexterm>
|
---|
61 |
|
---|
62 | <para>Create a new file <filename>/etc/inittab</filename> by running the
|
---|
63 | following:</para>
|
---|
64 |
|
---|
65 | <screen><userinput>cat > /etc/inittab << "EOF"
|
---|
66 | <literal># Begin /etc/inittab
|
---|
67 |
|
---|
68 | id:3:initdefault:
|
---|
69 |
|
---|
70 | si::sysinit:/etc/rc.d/init.d/rc sysinit
|
---|
71 |
|
---|
72 | l0:0:wait:/etc/rc.d/init.d/rc 0
|
---|
73 | l1:S1:wait:/etc/rc.d/init.d/rc 1
|
---|
74 | l2:2:wait:/etc/rc.d/init.d/rc 2
|
---|
75 | l3:3:wait:/etc/rc.d/init.d/rc 3
|
---|
76 | l4:4:wait:/etc/rc.d/init.d/rc 4
|
---|
77 | l5:5:wait:/etc/rc.d/init.d/rc 5
|
---|
78 | l6:6:wait:/etc/rc.d/init.d/rc 6
|
---|
79 |
|
---|
80 | ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
|
---|
81 |
|
---|
82 | su:S016:once:/sbin/sulogin
|
---|
83 | </literal>
|
---|
84 | EOF</userinput></screen>
|
---|
85 |
|
---|
86 | <para>The following command adds the standard virtual terminals to
|
---|
87 | <filename>/etc/inittab</filename>. If your system only has a serial
|
---|
88 | console skip the following command:</para>
|
---|
89 |
|
---|
90 | <screen><userinput>cat >> /etc/inittab << "EOF"
|
---|
91 | <literal>1:2345:respawn:/sbin/agetty -I '\033(K' tty1 9600
|
---|
92 | 2:2345:respawn:/sbin/agetty -I '\033(K' tty2 9600
|
---|
93 | 3:2345:respawn:/sbin/agetty -I '\033(K' tty3 9600
|
---|
94 | 4:2345:respawn:/sbin/agetty -I '\033(K' tty4 9600
|
---|
95 | 5:2345:respawn:/sbin/agetty -I '\033(K' tty5 9600
|
---|
96 | 6:2345:respawn:/sbin/agetty -I '\033(K' tty6 9600
|
---|
97 | </literal>
|
---|
98 | EOF</userinput></screen>
|
---|
99 |
|
---|
100 | <para>If your system has a serial console run the following command to add
|
---|
101 | the entry to <filename>/etc/inittab</filename>.</para>
|
---|
102 |
|
---|
103 | <screen><userinput>cat >> /etc/inittab << "EOF"
|
---|
104 | <literal>c0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100
|
---|
105 | </literal>
|
---|
106 | EOF</userinput></screen>
|
---|
107 |
|
---|
108 | <para>Finally, Add the end line to <filename>/etc/inittab</filename>.</para>
|
---|
109 |
|
---|
110 | <screen><userinput>cat >> /etc/inittab << "EOF"
|
---|
111 | <literal># End /etc/inittab</literal>
|
---|
112 | EOF</userinput></screen>
|
---|
113 |
|
---|
114 | </sect2>
|
---|
115 |
|
---|
116 | <sect2 role="content">
|
---|
117 | <title/>
|
---|
118 |
|
---|
119 | <para>Details on this package are located in <xref
|
---|
120 | linkend="contents-sysvinit" role="."/></para>
|
---|
121 |
|
---|
122 | </sect2>
|
---|
123 |
|
---|
124 | </sect1>
|
---|