Kernel/Configuration/ja

この記事では、Linux カーネル の設定とセットアップを手作業で行う方法]]について説明しています. 「安全でデフォルトの」設定を行う方法は、genkernel の記事を参照してください.

シンボリックリンクの作成
のシンボリックリンクは常に、現在使用中のカーネルのソースへ張られるべきです. このシンボリックリンクを張るのは、以下の3つの方法のいずれかで可能です.

1.  USE フラグを有効にして、カーネルソースをインストールする. この方法では、新たにインストールするカーネルソースを指す  が作成されます. もしも必要ならば、以下の2つの方法で後ほど変更することもできます:

2. でシンボリックリンクを設定する:

eselect は、利用可能なカーネルソースのリストを出力します. アスタリスクは、選択中のソースを示します. カーネルソースを、例えば2つ目の項目に変更するには:

3. 手作業でシンボリックリンクを設定する:

コンフィグレーションツール
カーネルは、自身のコンフィグレーションのためにいくつかのツールを提供しています.

他にも雑多なデフォルトの設定を作成するスクリプトがいくつかあります. これらを使うことでより込み入った設定を更に時短に行うことができます. makeのすべてのターゲットの一覧を見るには、次のコマンドを実行してください：

コンフィグレーション
This article describes the configuration using the tool, but the procedure is similar for the other menus.

操作方法
In the shown menu the blue bar indicates the position of the cursor. With the and  arrow keys change the position of the cursor. The and   arrow keys traverse the menu bar in the bottom and define what happens when the  key is pressed. For the menu bar below, Select switches to a sub menu for the menu entries ending with ---> while Exit exits a sub menu. As an alternative the key can be pressed twice to exit the application.

Pressing an associated letter key - will move the position of the cursor lines that have characters in bold. The, , keys are excluded from navigation in this way; they are sanctified for other purposes. If a line begins with a Y, M, or N, the next character will be bold and capable of being jumped to. For example, relative to the cursor's current position, if the next line reads "Network Device Support --->" pressing the key will move the cursor to that line.

The following symbols can appear in front of the lines in the menus:

Furthermore some menu entries have a tag at the end:

ほとんどのオプションには解説がついていて、 キーを押すかメニューバーの Help を選ぶことで見ることができます.

ドライバの選択
See the hardware detection article and the articles in the Hardware category.

モジュールの検索

を使って, の文字を押すとカーネルモジュールを検索事ができます.

As shown below, the search result will show numbers in front of the matches. Pressing in the example below would  jump straight to the option Bluetooth device drivers in the menu structure.

Enabling Gentoo Linux common settings
There is a kernel configuration option called CONFIG_GENTOO_LINUX only present in and other Kernel Project maintained kernels. It does nothing on its own, but sets various required configuration options for typical installations.

This setting automatically selects  and   support, which are needed for handling  on Gentoo Linux, but might be expanded in the future to enable other mandatory settings for a Gentoo Linux system. For more information, read the help information available through the kernel configuration system as described earlier in this guide.

ビルド
After configuration has been accomplished successfully, compile the kernel:

For processors with multiple cores, make all the cores do the work. Add the option. For example, a dual core processor contains two logical cores plus one (2 + 1):

A quad core system contains four logical cores plus one (4 + 1):

セットアップ
If drivers are activated as modules, they must be installed:

The modules will be copied to a sub directory of.

To install the actual kernel:

This command executes, which is part of the package. ''The new kernel is installed into. If a symbolic link already exists, it is refreshed by making a link from  to the new kernel, and the previously installed kernel is available as . (installkernel'' man page). The same for and  files. These symlinks are handy, because they always point to the newest kernel without changing the file path (e.g. they can be used in the bootloader configuration).

ブートローダ
Change the system's bootloader configuration to pick up at boot the new kernel.

Finally restart the system with the new kernel.

Comparing current kernel configuration with default configuration
Use the following procedure to get an overview of the kernel configuration settings that deviate from the default. Keep in mind that the modification of one configuration setting may alter additional configuration settings.

The search function in can be used to look up the symbols and their interpretations. When you're done, clean up: