Handbook:Parts/Installation/Media/zh-cn

硬件需求
在开始之前，我们先列出能在主机成功安装Gentoo所需要的硬件需求.

最小化安装CD
Gentoo最小化安装CD是一张包含有完整Gentoo环境的可引导CD. 它允许用户从CD引导进入Linux. 在引导过程中将检测硬件并加载适当的驱动. 这张CD由Gentoo开发人员维护，能让任何有Internet连接的人来安装Gentoo.

最小化安装CD叫做.

偶尔用到的Gentoo LiveDVD
有时候需要用一张由Gentoo Ten项目特制的DVD来安装Gentoo. 接下来的介绍是针对最小化安装CD的，因此可能会有一点不同. 不管怎么样，LiveDVD（或任何其他可引导的Linux环境）支持通过在终端调用 或者 或者一个root提示符.

stage又是什么？
stage3的tar包是一个包含有最小Gentoo环境的存档，可用来按照本手册介绍继续安装Gentoo. 以前G的entoo手册描述了使用三个stage的tar包来进行安装. 现在Gentoo仍然提供stage1和stage2的tar包，但是官方安装方法只使用stage3的tar包. 如果你对使用stage1或stage2的tar包安装Gentoo感兴趣，请在Gentoo FAQ上阅读如何使用stage1或stage2的tar包来安装Gentoo?

stage3的tar包不在安装CD中提供，但可以在任意一个Gentoo官方镜像站的路径中下载.

下载媒介
Gentoo Linux使用最小化安装CD做为默认安装媒介，它是一个带有用来安装Gentoo Linux工具的可引导的非常小的Gentoo Linux环境. CD镜像可以从任意一个镜像站下载.

在这些镜像站上，最小化安装CD可以通过以下方式找到：
 * 1) 到目录
 * 2) 选择正确的架构，比如
 * 3) 选择目录
 * 4) 选择目录

在这个位置，安装CD文件带有扩展名. 比如下面的清单：

In the above example, the file is the minimal installation CD itself. But as can be seen, other related files exist as well:
 * A file which is a text file listing all files available on the installation CD. This file can be useful to verify if particular firmware or drivers are available on the installation CD before downloading it.
 * A file which contains the hash of the ISO file itself, in various hashing formats/algorithms. This file can be used to verify if the downloaded ISO file is corrupt or not.
 * A file which not only contains the hash of the ISO file (like the  file), but also a cryptographic signature of that file. This can be used to both verify if the downloaded ISO file is corrupt or not, as well as verify that the download is indeed provided by the Gentoo Release Engineering team and has not been tampered with.

Ignore the other files available at this location for now - those will come back when the installation has proceeded further. Download the file and, if verification of the download is wanted, download the   file for the ISO file as well. The file does not need to be downloaded as the installation instructions will not refer to this file anymore, and the  file should contain the same information as the  file, except that the latter also contains a signature on top of it.

校验下载的文件
Through the and  files, the validity of the ISO file can be confirmed using the right set of tools. 这个验证通常是要在两个步骤:
 * 首先,加密签名验证来确保提供的安装文件是Gentoo官方版本
 * 1) 如果加密签名验证,校验和验证都没有问题，接下来确保下载的文件本身没有损坏

在Microsoft Windows验证
On a Microsoft Windows system, chances are low that the right set of tools to verify checksums and cryptographic signatures are in place.

To first verify the cryptographic signature, tools such as GPG4Win can be used. After installation, the public keys of the Gentoo Release Engineering team need to be imported. The list of keys is available on the signatures page. Once imported, the user can then verify the signature of the file.

The checksum itself can be verified using the Hashcalc application, although many others exist as well. Most of the time, these tools will show the user the calculated checksum, and the user is requested to verify this checksum with the value that is inside the file.

Linux based verification
On a Linux system, the most common method for verifying the cryptographic signature is to use the software. With this package installed, the following commands can be used to verify the cryptographic signature of the file.

First, download the right set of keys as made available on the signatures page:

Next verify the cryptographic signature of the file:

To be absolutely certain that everything is valid, verify the fingerprint shown with the fingerprint on the Gentoo signatures page.

With the cryptographic signature validated, next verify the checksum to make sure the downloaded ISO file is not corrupted. The file contains multiple hashing algorithms, so one of the methods to validate the right one is to first look at the checksum registered in the  file. For instance, to get the SHA512 checksum:

In the above output, two SHA512 checksums are shown - one for the file and one for its accompanying  file. Only the first checksum is of interest, as it needs to be compared with the calculated SHA512 checksum which can be generated as follows:

As both checksums match, the file is not corrupted and the installation can continue.

Burning
Of course, with just an ISO file downloaded, the Gentoo Linux installation cannot be started. The ISO file needs to be burned on a CD to boot from, and in such a way that its content is burned on the CD, not just the file itself. Below a few common methods are described - a more elaborate set of instructions can be found in Our FAQ on burning an ISO file.

Burning with Microsoft Windows
On Microsoft Windows, a number of tools exist that support burning ISOs on CDs.


 * With EasyCD Creator, select File, Record CD from CD image. Then change the Files of type to ISO image file. Then locate the ISO file and click Open. After clicking on Start recording the ISO image will be burned correctly onto the CD-R.
 * With Nero Burning ROM, cancel the wizard which automatically pops up and select Burn Image from the File menu. Select the image to burn and click Open. Now hit the Burn button and watch the brand new CD being burnt.

Burning with Linux
On Linux, the ISO file can be burned on a CD using the  command, part of the  package.

For instance, to burn the ISO file on the CD in the device (this is the first CD device on the system - substitute with the right device file if necessary):

Users that prefer a graphical user interface can use K3B, part of the package. In K3B, go to Tools and use Burn CD Image. Then follow the instructions provided by K3B.

Extra hardware configuration
When the Installation CD boots, it tries to detect all the hardware devices and loads the appropriate kernel modules to support the hardware. In the vast majority of cases, it does a very good job. However, in some cases it may not auto-load the kernel modules needed by the system. If the PCI auto-detection missed some of the system's hardware, the appropriate kernel modules have to be loaded manually.

In the next example the 8139too module (which supports certain kinds of network interfaces) is loaded:

Optional: User accounts
If other people need access to the installation environment, or there is need to run commands as a non-root user on the installation CD (such as to chat using  without root privileges for security reasons), then an additional user account needs to be created and the root password set to a strong password.

To change the root password, use the passwd utility:

To create a user account, first enter their credentials, followed by the account's password. The  and   commands are used for these tasks.

In the next example, a user called john is created:

To switch from the (current) root user to the newly created user account, use the  command:

Optional: Viewing documentation while installing
To view the Gentoo handbook during the installation, first create a user account as described above. Then press +  to go to a new terminal.

During the installation, the  command can be used to browse the Gentoo handbook - of course only from the moment that the Internet connection is working.

To go back to the original terminal, press +.

Optional: Starting the SSH daemon
To allow other users to access the system during the installation (perhaps to support during an installation, or even do it remotely), a user account needs to be created (as was documented earlier on) and the SSH daemon needs to be started.

To fire up the SSH daemon, execute the following command:

To be able to use sshd, the network needs to function properly. Continue with the chapter on Configuring the network.