The translation is temporarily closed for contributions due to maintenance, please come back later.

Translation

(itstool) path: sect1/para
English
The key to understanding this process is that it is a series of stages of increasing complexity. These stages are <filename>boot1</filename>, <filename>boot2</filename>, and <filename>loader</filename> (see <citerefentry><refentrytitle>boot</refentrytitle><manvolnum>8</manvolnum></citerefentry> for more detail). The boot system executes each stage in sequence. The last stage, <filename>loader</filename>, is responsible for loading the FreeBSD kernel. Each stage is examined in the following sections.
Context English Chinese (Simplified) (zh_CN) State
Kernel 内核
Bootstrapping and Kernel Initialization 引导过程与内核初始化
<personname> <firstname>Sergey</firstname> <surname>Lyubka</surname> </personname> <contrib>Contributed by </contrib> <personname> <firstname>Sergey</firstname> <surname>Lyubka</surname> </personname> <contrib>Contributed by </contrib>
<personname> <firstname>Sergio Andrés</firstname> <surname> Gómez del Real</surname> </personname> <contrib>Updated and enhanced by </contrib> <personname> <firstname>Sergio Andrés</firstname> <surname> Gómez del Real</surname> </personname> <contrib>Updated and enhanced by </contrib>
Synopsis 简介
<primary>BIOS</primary> <primary>BIOS</primary>
<primary>firmware</primary> <primary>固件</primary>
<primary>POST</primary> <primary>POST</primary>
<primary>IA-32</primary> <primary>IA-32</primary>
<primary>booting</primary> <primary> 启动 </primary>
<primary>system initialization</primary> <primary>系统初始化</primary>
This chapter is an overview of the boot and system initialization processes, starting from the <acronym>BIOS</acronym> (firmware) <acronym>POST</acronym>, to the first user process creation. Since the initial steps of system startup are very architecture dependent, the IA-32 architecture is used as an example. 这一章是对引导过程和系统初始化过程的总览。这些过程始于<acronym>BIOS</acronym>(固件)<acronym>POST</acronym>,直到第一个用户进程建立。由于系统启动的最初步骤是与硬件结构相关的、是紧配合的, 这里用IA-32(Intel Architecture 32bit)结构作为例子。
The FreeBSD boot process can be surprisingly complex. After control is passed from the <acronym>BIOS</acronym>, a considerable amount of low-level configuration must be done before the kernel can be loaded and executed. This setup must be done in a simple and flexible manner, allowing the user a great deal of customization possibilities. FreeBSD 启动过程非常复杂。从<acronym>BIOS</acronym>传递控制后,必须先执行大量低级配置,然后才能加载和执行内核。此设置必须以简单和灵活的方式完成,允许用户自定义。
Overview 总览
The boot process is an extremely machine-dependent activity. Not only must code be written for every computer architecture, but there may also be multiple types of booting on the same architecture. For example, a directory listing of <filename>/usr/src/sys/boot</filename> reveals a great amount of architecture-dependent code. There is a directory for each of the various supported architectures. In the x86-specific <filename>i386</filename> directory, there are subdirectories for different boot standards like <filename>mbr</filename> (Master Boot Record), <filename>gpt</filename> (<acronym>GUID</acronym> Partition Table), and <filename>efi</filename> (Extensible Firmware Interface). Each boot standard has its own conventions and data structures. The example that follows shows booting an x86 computer from an <acronym>MBR</acronym> hard drive with the FreeBSD <filename>boot0</filename> multi-boot loader stored in the very first sector. That boot code starts the FreeBSD three-stage boot process. 启动过程与计算机架构息息相关。不仅必须为每个计算机体系结构编写代码,而且在同一体系结构上也可能有多个不同类型的引导。例如,<filename>/usr/src/sys/boot</filename>的目录列表显示了大量依赖于体系结构的代码。每个受支持的体系结构都有一个目录。在特定于 x86 的 <filename>i386</filename> 目录中,有不同引导标准的子目录,如<filename>mbr</filename>(主引导记录)、<filename>gpt</filename>(<acronym>GUID</acronym>分区表)和<filename>efi</filename>(可扩展固件接口)。每个引导标准都有自己的约定和数据结构。以下示例显示,使用存储在第一扇区的 FreeBSD <filename>boot0</filename> 多引导加载程序,从<acronym>MBR</acronym> 硬盘驱动器启动 x86 计算机。该引导代码启动 FreeBSD 三阶段引导过程。
The key to understanding this process is that it is a series of stages of increasing complexity. These stages are <filename>boot1</filename>, <filename>boot2</filename>, and <filename>loader</filename> (see <citerefentry><refentrytitle>boot</refentrytitle><manvolnum>8</manvolnum></citerefentry> for more detail). The boot system executes each stage in sequence. The last stage, <filename>loader</filename>, is responsible for loading the FreeBSD kernel. Each stage is examined in the following sections. 理解此过程的关键在于这些阶段的复杂度逐级增加。这些阶段是<filename>boot1</filename>,<filename>boot2</filename> 和 <filename>loader</filename>(更多详情请参阅 <citerefentry><refentrytitle>boot</refentrytitle><manvolnum>8</manvolnum></citerefentry>)。这些阶段在系统启动时按顺序执行。最后一步,<filename>loader</filename>,负责加载 FreeBSD 内核。以下章节将介绍各个阶段。
Here is an example of the output generated by the different boot stages. Actual output may differ from machine to machine: 下面是由不同引导阶段生成的输出的示例。实际输出可能因机器而异:
FreeBSD Component FreeBSD 组件
Output (may vary) 输出(可能有所不同)
<literal>boot0</literal> <literal>boot0</literal>
F1 FreeBSD
F2 BSD
F5 Disk 2
F1 FreeBSD
F2 BSD
F5 Disk 2
This prompt will appear if the user presses a key just after selecting an OS to boot at the <literal>boot0</literal> stage. This prompt will appear if the user presses a key just after selecting an OS to boot at the <literal>boot0</literal> stage.
<literal>boot2</literal> <_:footnote-1/> <literal>boot2</literal> <_:footnote-1/>
&gt;&gt;FreeBSD/i386 BOOT
Default: 1:ad(1,a)/boot/loader
boot:
&gt;&gt;FreeBSD/i386 BOOT
Default: 1:ad(1,a)/boot/loader
boot:
<filename>loader</filename> <filename>loader</filename>
BTX loader 1.00 BTX version is 1.02
Consoles: internal video/keyboard
BIOS drive C: is disk0
BIOS 639kB/2096064kB available memory

FreeBSD/x86 bootstrap loader, Revision 1.1
Console internal video/keyboard
(root@snap.freebsd.org, Thu Jan 16 22:18:05 UTC 2014)
Loading /boot/defaults/loader.conf
/boot/kernel/kernel text=0xed9008 data=0x117d28+0x176650 syms=[0x8+0x137988+0x8+0x1515f8]
BTX loader 1.00 BTX version is 1.02
Consoles: internal video/keyboard
BIOS drive C: is disk0
BIOS 639kB/2096064kB available memory

FreeBSD/x86 bootstrap loader, Revision 1.1
Console internal video/keyboard
(root@snap.freebsd.org, Thu Jan 16 22:18:05 UTC 2014)
Loading /boot/defaults/loader.conf
/boot/kernel/kernel text=0xed9008 data=0x117d28+0x176650 syms=[0x8+0x137988+0x8+0x1515f8]
kernel kernel
Copyright (c) 1992-2013 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014
root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Copyright (c) 1992-2013 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014
root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
The <acronym>BIOS</acronym> The <acronym>BIOS</acronym>
When the computer powers on, the processor's registers are set to some predefined values. One of the registers is the <emphasis>instruction pointer</emphasis> register, and its value after a power on is well defined: it is a 32-bit value of <literal>0xfffffff0</literal>. The instruction pointer register (also known as the Program Counter) points to code to be executed by the processor. Another important register is the <literal>cr0</literal> 32-bit control register, and its value just after a reboot is <literal>0</literal>. One of <literal>cr0</literal>'s bits, the PE (Protection Enabled) bit, indicates whether the processor is running in 32-bit protected mode or 16-bit real mode. Since this bit is cleared at boot time, the processor boots in 16-bit real mode. Real mode means, among other things, that linear and physical addresses are identical. The reason for the processor not to start immediately in 32-bit protected mode is backwards compatibility. In particular, the boot process relies on the services provided by the <acronym>BIOS</acronym>, and the <acronym>BIOS</acronym> itself works in legacy, 16-bit code. 当PC加电后,处理器的寄存器被设为某些特定值。在这些寄存器中, <emphasis>指令指针</emphasis>寄存器被设为32位值0xfffffff0。 指令指针寄存器指向处理器将要执行的指令代码。<literal>cr1</literal>, 一个32位控制寄存器,在刚启动时值被设为0。cr1的PE(Protected Enabled, 保护模式使能)位用来指示处理器是处于保护模式还是实地址模式。 由于启动时该位被清位,处理器在实地址模式中引导。在实地址模式中, 线性地址与物理地址是等同的。
The value of <literal>0xfffffff0</literal> is slightly less than 4 GB, so unless the machine has 4 GB of physical memory, it cannot point to a valid memory address. The computer's hardware translates this address so that it points to a <acronym>BIOS</acronym> memory block. 值 <literal>0xfffffff0</literal> 略小于4G,因此计算机没有 4G 字节物理内存,这就不会是一个有效的内存地址。计算机硬件将这个地址转指向 <acronym>BIOS</acronym> 存储块。

Loading…

The key to understanding this process is that it is a series of stages of increasing complexity. These stages are <filename>boot1</filename>, <filename>boot2</filename>, and <filename>loader</filename> (see <citerefentry><refentrytitle>boot</refentrytitle><manvolnum>8</manvolnum></citerefentry> for more detail). The boot system executes each stage in sequence. The last stage, <filename>loader</filename>, is responsible for loading the FreeBSD kernel. Each stage is examined in the following sections.
理解此过程的关键在于这些阶段的复杂度逐级增加。这些阶段是<filename>boot1</filename>,<filename>boot2</filename> 和 <filename>loader</filename>(更多详情请参阅 <citerefentry><refentrytitle>boot</refentrytitle><manvolnum>8</manvolnum></citerefentry>)。这些阶段在系统启动时按顺序执行。最后一步,<filename>loader</filename>,负责加载 FreeBSD 内核。以下章节将介绍各个阶段。
7 months ago
Browse all component changes

Glossary

English Chinese (Simplified) (zh_CN)
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect1/para
Source string location
book.translate.xml:335
String age
a year ago
Source string age
a year ago
Translation file
books/zh_CN/arch-handbook.po, string 33