Handbook:Parts/Installation/Base/ja

任意自由選択: ミラーサーバーを選択する
ソースコードを短時間でダウンロードするために、速いミラーを選択することをお薦めします. Portageはの中の GENTOO_MIRRORS 変数を参照することで、そこで指定されたミラーを使用します. Gentooのミラー一覧から、インストールマシンから物理的に最も近い一つもしくは複数のミラーを選択することができます（これらは高い頻度で最も高速になり得ます）. しかし、Gentooはという名前のよいツールを提供しています. このツールは必要なミラーを選択するためによいユーザーインターフェースを提供できます. 単純に選択可能なミラーが提示され、一つもしくは複数のミラーを選択するためにを押すだけです.

次に重要なのは、で設定される SYNC 変数です. この変数はPortageツリーを更新するときに使うrsyncサーバーを指定します（Portageツリーは、ebuildとPortageがダウンロードしなければならない情報を含んだ関連ファイルの情報を集めたものです）. SYNC サーバーをマニュアルで設定することは可能ですが、はその設定を大幅に、かつ簡単に書き換えてしまうことに注意してください.

を実行した後、を再チェックすることが望ましいです.

DNS 情報をコピーする
新しい環境に入る前に一つだけやるべきことが残っています. それはに記載されているDNS情報をコピーすることです. これは新しい環境に入った後でも、ネットワークが動作することを保証するために必要です. は、ネットワークのためのネームサーバーを含んでいます.

この情報をコピーするときは、コマンドに オプションを付与することを推奨します. これはがシンボリックリンクのときに、シンボリックリンクをコピーするのではなく、シンボリックリンクのリンク先の実ファイルをコピーします. そうでない場合、新しい環境ではシンボリックリンクは存在しないファイルを指し示すでしょう（新しい環境ではリンクのターゲットはほぼ利用できないでしょう）.

必要なファイルシステムをマウントする
もう少しで、Linuxルートは新しい場所に変わるでしょう. 新しい環境が適切に動作することを確実にするために、特定のファイルシステムを使えるようにしなければなりません.

使えるようにしなければならないファイルシステムは以下の通りです.


 * はLinuxカーネルから情報を引き出すための擬似ファイルシステムです(一見通常ファイルに見えますが、ファイルとしての実体はありません).
 * は同様、擬似ファイルシステムです. より構造化されており、一度はを置き換えることを目的としていました.
 * は通常のファイルシステムです. 一部はLinuxのデバイス管理機構(通常は)により管理されており、すべてのデバイスファイルを含んでいます.

は、にマウントされるでしょう. 他の２つはbindマウントされます. 後者は、例えばは事実となります（同じファイルシステムへの2番目のエントリです）. ここでは、ファイルシステムの新しいエントリ（インスタンスとも言えるでしょう）となります.

新しい環境に入る
Now that all partitions are initialized and the base environment installed, it is time to enter the new installation environment by chrooting into it. This means that the session will change its root (most top-level location that can be accessed) from the current installation environment (installation CD or other installation medium) to the installation system (namely the initialized partitions). Hence the name, change root or chroot.

This chrooting is done in three steps:


 * 1) The root location is changed from  (on the installation medium) to  (on the partitions) using chroot
 * 2) Some settings (those in ) are reloaded in memory using the  command
 * 3) The primary prompt is changed to help us remember that this session is inside a chroot environment.

From this point, all actions performed are immediately on the new Gentoo Linux environment. Of course it is far from finished, which is why the installation still has some sections left :-)

Installing a Portage snapshot
Next step is to install a Portage snapshot, a collection of files that inform Portage what software titles are available to install, which profiles the administrator can select, etc.

The use of is recommended. This will fetch the latest Portage snapshot (which Gentoo releases on a daily basis) from one of Gentoo's mirrors and install it onto the system.

From this point onward, Portage might mention that certain updates are recommended to be executed. This is because certain system packages installed through the stage3 file might have newer versions available, and Portage is now aware of this because a new Portage snapshot is installed. This can be safely ignored for now; the updates can be triggered after the Gentoo installation has finished.

Optional: Updating the Portage tree
It is possible to update the Portage tree to the latest version. The previous command will have installed a very recent Portage snapshot (usually recent up to 24h) so this step is definitely optional.

Suppose there is a need for the last package updates (up to 1 hour), then use. This command will use the rsync protocol to update the Portage tree (which was fetched earlier on through ) to the latest state.

On slow terminals, like some framebuffers or serial consoles, it is recommended to use the  option to speed up the process:

ニュース項目を読む
When a Portage tree is synchronized to the system, it might warn the user with a message similar to the following:

Portage news items were created to provide a communication medium to push critical messages to users via the rsync tree. To manage them, use. The application is a Gentoo application that allows for a common management interface towards system changes and operations. In this case, is asked to use its   module.

For the  module, three operations are most used:


 * With  an overview of the available news items is displayed.
 * With  the news items can be read.
 * With  news items can be removed once they have been read and will not be reread anymore.

More information about the newsreader is available through its manual page:

適切なプロファイルを選ぶ
A profile is a building block for any Gentoo system. Not only does it specify default values for USE, CFLAGS , and other important variables, it also locks the system to a certain range of package versions. This is all maintained by the Gentoo developers.

You can see what profile the system is currently using with, now using the  module:

As can be seen, there are also desktop subprofiles available for some architectures.

After viewing the available profiles for the architecture, users can select a different profile to use:

USE 変数を設定する
USE is one of the most powerful variables Gentoo provides to its users. Several programs can be compiled with or without optional support for certain items. For instance, some programs can be compiled with gtk-support, or with qt-support. Others can be compiled with or without SSL support. Some programs can even be compiled with framebuffer support (svgalib) instead of X11 support (X-server).

Most distributions compile their packages with support for as much as possible, increasing the size of the programs and startup time, not to mention an enormous amount of dependencies. With Gentoo users can define what options a package should be compiled with. This is where USE comes into play.

In the USE variable users define keywords which are mapped onto compile-options. For instance,  will compile ssl-support in the programs that support it. will remove X-server support (note the minus sign in front). will compile programs with GNOME (and GTK) support, and not with KDE (and Qt) support, making the system fully tweaked for GNOME (if the architecture supports it).

The default USE settings are placed in the files of the Gentoo profile used by the system. Gentoo uses a (complex) inheritance system for its profiles, which we will not dive into at this stage. The easiest way to check the currently active USE settings is to run and select the line that starts with USE:

A full description on the available USE flags can be found on the system in.

Inside the command, scrolling can be done using the  and  keys, and exited by pressing.

As an example we show a USE setting for a KDE-based system with DVD, ALSA and CD Recording support:

When USE is defined in it is added (or removed if the USE flag starts with the  sign) from that default list. Users who want to ignore any default USE settings and manage it completely themselves should start the USE definition in with  :

タイムゾーン
Select the timezone for the system. Look for the available timezones in, then write it in the file.

Suppose the timezone of choice is Europe/Brussels:

Please avoid the timezones as their names do not indicate the expected zones. For instance, is in fact.

Next, reconfigure the package, which will update the  file for us, based on the  entry. The file is used by the system C library to know the timezone the system is in.

ロケールの設定
Most users will want to use only one or two locales on their system.

Locales specify not only the language that the system should use to interact with the system, but also what the rules are for sorting strings, displaying dates and times, etc.

The locales that a system should support should be mentioned in.

The following locales are an example to get both English (United States) and German (Germany) with the accompanying character formats (like UTF-8).

The next step is to run. It will generate all the locales specified in the file.

To verify that the selected locales are now available, run.

Once done, it is now time to set the system-wide locale settings. Again we use for this, now with the   module.

With, the available targets are displayed:

With the correct locale can be set:

Manually, this can still be accomplished through the file:

Make sure a locale is set, as the system would otherwise display warnings and errors during kernel builds and other software deployments later in the installation.

ここで、環境をリロードします:

We made a full Localization guide to help the user guide through this process. Another interesting article is the UTF-8 guide for very specific information to enable UTF-8 on the system.