1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<sect1 id="ch-config-introduction" revision="sysv">
<?dbhtml filename="introduction.html"?>
<title>Introduction</title>
<para>Booting a Linux system involves several tasks. The process must
mount both virtual and real file systems, initialize devices, activate swap,
check file systems for integrity, mount any swap partitions or files, set
the system clock, bring up networking, start any daemons required by the
system, and accomplish any other custom tasks needed by the user. This
process must be organized to ensure the tasks are performed in the correct
order but, at the same time, be executed as fast as possible.</para>
<sect2 id='sysv-desc'>
<title>System V</title>
<para>System V is the classic boot process that has been used in Unix and
Unix-like systems such as Linux since about 1983. It consists of a small
program, <command>init</command>, that sets up basic programs such as
<command>login</command> (via getty) and runs a script. This script,
usually named <command>rc</command>, controls the execution of a set of
additional scripts that perform the tasks required to initialize the
system.</para>
<para>The <command>init</command> program is controlled by the
<filename>/etc/inittab</filename> file and is organized into run levels that
can be run by the user. In LFS, they are used as follows:</para>
<literallayout>0 — halt
1 — Single user mode
2 — User definable
3 — Full multiuser mode
4 — User definable
5 — Full multiuser mode with display manager
6 — reboot</literallayout>
<para>The usual default run level is 3 or 5.</para>
<bridgehead renderas="sect3">Advantages</bridgehead>
<itemizedlist>
<listitem>
<para>Established, well understood system.</para>
</listitem>
<listitem>
<para>Easy to customize.</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Disadvantages</bridgehead>
<itemizedlist>
<listitem>
<para>May be slower to boot. A medium speed base LFS system
takes 8-12 seconds where the boot time is measured from the
first kernel message to the login prompt. Network
connectivity is typically established about 2 seconds
after the login prompt.</para>
</listitem>
<listitem>
<para>Serial processing of boot tasks. This is related to the previous
point. A delay in any process such as a file system check, will
delay the entire boot process.</para>
</listitem>
<listitem>
<para>Does not directly support advanced features like
control groups (cgroups), and per-user fair share scheduling.</para>
</listitem>
<listitem>
<para>Adding scripts requires manual, static sequencing decisions.</para>
</listitem>
</itemizedlist>
</sect2>
</sect1>
|