Kernel/Upgrade/ko

이 글은 새 커널(kernel)로 업그레이드 하는 과정을 설명합니다.

설치
커널 업그레이드는 시스템 업데이트 후 커널 소스를 설치하거나 새 커널 소스를 직접 설치했을 경우 필요합니다.

Installing new kernel sources doesn't provide the user with a new kernel. It is necessary to make and install a new kernel from the new sources and then reboot the system to actually run the new kernel.

Making a new kernel from the new sources is basically the same process as making a kernel when installing the system. The difference is that one can use the configuration of the old kernel to create a configuration for the new kernel. Using the old configuration saves the user from going through all the kernel options (like make menuconfig) again.

The configuration of the kernel is saved in a file named in the directory that holds the kernel sources. A new kernel may have options or features the old kernel does not have, or it might not have a feature or option anymore which the old kernel still has. The kernel configuration specifies whether the features and options of a kernel are to be enabled or not, perhaps built into the kernel, or perhaps built as modules which can be loaded into the running kernel on demand. Hence the configuration file of the new kernel may have new entries the configuration file of the old kernel doesn't have, and it might not have entries anymore which are present in the configuration file of the old kernel.

To deal with such changes of the configuration file, the configuration file of the old kernel needs to be converted to a configuration that can be used with the new kernel. This article shows how to make a new kernel from new kernel sources with converting the configuration file of the old kernel.

Make a backup of the current kernel configuration
It is wise to make a backup of the kernel configuration so that the previous configurations are not lost. After all, many users devote considerable time to figure out the best configuration for the system, and losing that information is definitely not wanted.

It is easy to make a backup of the current kernel configuration:

Provided that the symlink to the kernel sources has been set correctly, this copies the configuration of the currently used kernel to the home directory of root, renaming the configuration to followed by the version of the current running Linux kernel.

Set symlink to new kernel sources
심볼릭 링크는 언제든 현재 사용하는 커널 소스를 가리킵니다. 다음 세가지 방법 중 하나로 끝낼 수 있습니다:


 * 1) Installing the kernel sources with
 * 2) Setting the link with eselect
 * 3) Manually updating the symbolic link

Installing the kernel sources with the symlink USE flag
This will make the point to the newly installed kernel sources.

If necessary, it can still be modified later with one of the other two methods.

Setting the link with eselect
To set the symlink with eselect:

This outputs the available kernel sources. The asterisk indicates the chosen sources.

To change the kernel sources, e.g. to the second entry, do:

Manually updating the symbolic link
To set the symbolic link manually:

Copy previous kernel configuration
The configuration of the old kernel needs to be copied to the new one. It can be found in several places:


 * procfs 파일 시스템에서 현재 커널로부터 Enable access to .config through /proc/config.gz 옵션을 활성화 했다면:


 * 디렉터리에 설정 파일을 설치했다면:


 * 현재 동작중인 커널의 디렉터리에서:

Configure the new kernel
To use the configuration of the old kernel with the new kernel, it needs to be converted. The conversion can be done by running either make oldconfig or make silentoldconfig.

make oldconfig gives many choices, make silentoldconfig does not. Use either, not both.

make oldconfig
The following configuration is like the text based configuration with make config. For new configuration options, it gives a choice. For example:

The string (NEW) at the end of the line marks this option as new. Left to the string in square brackets are the possible answers: Yes, no, module or ? to show the help. The recommend answer is capitalized (here Y). The help explains the option or driver.

Unfortunately make oldconfig doesn't show - next to the help - a lot more information for each option, like the context, so that it is sometimes difficult to give the right answer. In this case the best way to go is to remember the option name and revise it afterwards through one of the graphical kernel configuration tools.

make silentoldconfig
If interactivity is not wanted (no questions should be asked), then use make silentoldconfig</tt>:

빌드
이 단계에서 다음 단계는 직접 설정하기 글에 있습니다.

외부 커널 모듈 다시 설치
이진 커널 모듈 같은 어떤 외부 커널 모듈은 각각의 새 커널에 대해 다시 빌드해야 할 대가 있습니다. 아직 커널을 빌드하지 않았다면 외부 커널 모듈을 빌드하기 위해 준비하는것이 급선무일 것입니다:

@module-rebuild 셋을 사용하여 꾸러미를 다시 빌드할 수 있습니다:

Solving build problems
현재 커널을 다시 하는 동안 빌드에 문제가 있음을 경험했을 경우 커널 소스를 정리하는데 도움이 필요합니다. 동작중에 파일을 제거하므로 먼저 백업했는지 확인하십시오. 백업에  또는   접미사를 사용하면  에서 지우므로 사용하지 마십시오.

오래된 커널 제거
커널 제거 글을 보십시오.

외부 자원

 * 일부 새 기능 설명이 있는 커널 변경 기록