|
@@ -1,4 +1,4 @@
|
|
|
-<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<!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">
|
|
@@ -8,15 +8,21 @@
|
|
|
<sect1 id="ch-scripts-introduction" revision="sysv">
|
|
|
<?dbhtml filename="introduction.html"?>
|
|
|
|
|
|
- <title>Introduction</title>
|
|
|
+ <title>概述</title>
|
|
|
|
|
|
- <para>Booting a Linux system involves several tasks. The process must
|
|
|
+ <!--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>
|
|
|
+ order but, at the same time, be executed as fast as possible.</para-->
|
|
|
+ <para>引导 Linux 系统需要完成若干任务。
|
|
|
+ 引导过程必须挂载虚拟和真实文件系统、初始化设备、启用交换、
|
|
|
+ 检查文件系统完整性、挂载所有交换分区或文件、设定系统时钟、
|
|
|
+ 启用网络、启动系统需要的守护进程,并完成用户自定义的其他工作。
|
|
|
+ 引导过程必须被组织好,以保证这些任务以正确顺序进行,
|
|
|
+ 并以尽量快的速度完成。</para>
|
|
|
|
|
|
<!-- <para>In the packages that were installed in Chapter 6, there were two
|
|
|
different boot systems installed. LFS provides the ability to easily
|
|
@@ -27,7 +33,7 @@
|
|
|
<sect2 id='sysv-desc'>
|
|
|
<title>System V</title>
|
|
|
|
|
|
- <para>System V is the classic boot process that has been used in Unix and
|
|
|
+ <!--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,
|
|
@@ -37,58 +43,72 @@
|
|
|
|
|
|
<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:</para>
|
|
|
+ can be run by the user:</para-->
|
|
|
+ <para>System V 是自 1983 年以来就在 Unix 和 Linux 等类 Unix
|
|
|
+ 系统中被广泛应用的经典引导过程。它包含一个小程序
|
|
|
+ <command>init</command>,该程序设定 <command>login</command>
|
|
|
+ (通过 getty)并运行一个脚本。该脚本一般被命名为
|
|
|
+ <command>rc</command>,控制一组附加脚本的运行,
|
|
|
+ 这些附加脚本完成初始化系统需要的各项工作。</para>
|
|
|
+ <para><command>init</command> 程序受到 <filename>/etc/inittab</filename>
|
|
|
+ 文件的控制,被组织为用户可以选择的系统运行级别:</para>
|
|
|
|
|
|
<literallayout>
|
|
|
-0 — halt
|
|
|
-1 — Single user mode
|
|
|
-2 — Multiuser, without networking
|
|
|
-3 — Full multiuser mode
|
|
|
-4 — User definable
|
|
|
-5 — Full multiuser mode with display manager
|
|
|
-6 — reboot
|
|
|
+0 — 停止运行
|
|
|
+1 — 单用户模式
|
|
|
+2 — 多用户模式,没有网络
|
|
|
+3 — 完整的多用户模式
|
|
|
+4 — 用户自定义模式
|
|
|
+5 — 拥有显示管理器的完整多用户模式
|
|
|
+6 — 重启系统
|
|
|
</literallayout>
|
|
|
|
|
|
- <para>The usual default run level is 3 or 5.</para>
|
|
|
+ <para>通常的默认运行级别是 3 或 5。</para>
|
|
|
|
|
|
- <bridgehead renderas="sect3">Advantages</bridgehead>
|
|
|
+ <bridgehead renderas="sect3">优点</bridgehead>
|
|
|
|
|
|
<itemizedlist>
|
|
|
<listitem>
|
|
|
- <para>Established, well understood system.</para>
|
|
|
+ <para>完备的,已经被详细理解的系统。</para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Easy to customize.</para>
|
|
|
+ <para>容易定制。</para>
|
|
|
</listitem>
|
|
|
|
|
|
</itemizedlist>
|
|
|
|
|
|
|
|
|
- <bridgehead renderas="sect3">Disadvantages</bridgehead>
|
|
|
+ <bridgehead renderas="sect3">缺点</bridgehead>
|
|
|
|
|
|
<itemizedlist>
|
|
|
<listitem>
|
|
|
- <para>Slower to boot. A medium speed base LFS system
|
|
|
+ <!--para>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>
|
|
|
+ after the login prompt.</para-->
|
|
|
+ <para>引导速度较慢。一个中等速度的基本 LFS
|
|
|
+ 系统从第一个内核消息开始,到出现登录提示符为止,
|
|
|
+ 需要 8-12 秒的引导时间,之后还需要约 2 秒启动网络连接。
|
|
|
+ </para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Serial processing of boot tasks. This is related to the previous
|
|
|
+ <!--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>
|
|
|
+ delay the entire boot process.</para-->
|
|
|
+ <para>串行执行引导任务,这与前一项缺点相关。
|
|
|
+ 引导过程中的延迟(如文件系统检查)会延迟整个引导过程。</para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Does not directly support advanced features like
|
|
|
- control groups (cgroups), and per-user fair share scheduling.</para>
|
|
|
+ <para>不支持控制组(cgroups)、每用户公平共享调度等高级特性。
|
|
|
+ </para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
- <para>Adding scripts requires manual, static sequencing decisions.</para>
|
|
|
+ <para>添加脚本时,需要手动决定它在引导过程中的次序。</para>
|
|
|
</listitem>
|
|
|
|
|
|
</itemizedlist>
|