Kernel

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Kernel and the translation is 8% complete.
Outdated translations are marked like this.

리눅스 커널은 운영체제의 핵심이며 하드웨어에 접근할 프로그램의 인터페이스를 제공합니다. 커널에는 대부분의 수많은 장치 드라이버가 있습니다.

젠투가 리눅스 또는 FreeBSD와 같은 자유 운영체제 이고 FreeBSD는 자체 커널을 보유하고 있지만, 본질적인 이유로 이 글은 리눅스 커널을 다룹니다.

See also
See also the handbook on installing and setting up a kernel.

Gentoo provides a choice of methods to get a kernel up and running, from a standard binary kernel as would be supplied by most distributions, to custom configured and compiled kernels.

요령
When starting out, the gentoo-kernel-bin provides a quick and easy way to get a kernel up and running, while still providing a light, high performance kernel - just like any modern distribution would. Once a system is installed and functioning correctly, a different kernel may be selected if needed. The sys-kernel/gentoo-kernel-bin can be kept around in case of issues booting a custom kernel.

gentoo-sources

When manually compiling kernel sources, or using Genkernel to automate some of the process, Gentoo recommends the sys-kernel/gentoo-sources package for most users. Its stable versions follow the long term stable (LTS) kernels from upstream kernel.org.

Distribution kernels

The distribution kernel project provides packages to install and manage kernels through Portage. These kernels are complied (if needed) and installed with just an emerge command, like any other package, which can lessen the administrative burden. Kernel updates are performed when updating the system (i.e. emerge -avuDN @world), and the only manual step is to have the bootloader use the new kernel.

These kernels come with a default configuration that should "just work" for most systems. For users not interested in configuring their own kernel from scratch, these kernels can get things up and running quicker.

See also
For more information on gentoo-kernel see the distribution kernel project.
gentoo-kernel

The sys-kernel/gentoo-kernel package provides a kernel that will be compiled and be installed when the package is emerged. This comes with a default configuration that should work out of the box on most systems, but allows customization, if desired.

gentoo-kernel-bin

The sys-kernel/gentoo-kernel-bin is a binary package containing a precompiled kernel, allowing faster installation. This package is a precompiled version of the gentoo-kernel package, with the default configuration.

중요
Since the gentoo-kernel* packages automate the configuration and compilation process - independently from the usual, manual way of compiling and installing kernels - the rest of this article concerns installation using the sys-kernel/gentoo-sources package. See the distribution kernel project for further information on distribution-kernels

설치

This section covers installation when using sys-kernel/gentoo-sources.

USE 플래그

커널을 만들려면 커널 소스 코드를 먼저 설치해야 합니다. 데스크톱 시스템에 추천하는 커널 소스는 sys-kernel/gentoo-sources입니다. 젠투 개발자가 관리하며 보안 취약점, 기능적 문제를 수정하기 위해 패치하고, 사용 빈도수가 낮은 시스템 아키텍처의 호환성을 개선합니다.

USE flags for sys-kernel/gentoo-sources Full sources including the Gentoo patchset for the 6.5 kernel tree

build !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for creating build images and the first half of bootstrapping [make stage1]
experimental Apply experimental patches; for more information, see "https://wiki.gentoo.org/wiki/Project:Kernel/Experimental".
symlink Force kernel ebuilds to automatically update the /usr/src/linux symlink

Emerge

이제 sys-kernel/gentoo-sources를 설치하십시오:

root #emerge --ask sys-kernel/gentoo-sources

대안 커널

Although all stable kernel Gentoo provides is sys-kernel/gentoo-sources, there are many other kernel packages in the Portage tree. See the Kernel sources overview article, which gives details on most of them.

For which to pick, see also the blog article What Stable Kernel Should I Use? by Greg Kroah-Hartman, a major kernel developer.

모든 대안 검색

emerge로 검색하면 간단한 설명이 있는 커널 전체 목록을 살펴볼 수 있습니다:

root #emerge --search sources

설정

Configuration

자동 설정
genkernel 은 커널과 initramfs를 빌드하는 과정을 자동화 하는 도구입니다. 사용자에게 커널 빌드 과정을 간편하게 도와주는것이 genkernel의 존재 목적입니다.
직접 설정
직접 설정을 통해 약간의 노력으로 사용자 정의 맞춤 커널 설정을 만들 수 있게 해줍니다.
젠투 커널 설정 안내서
젠투 커널 설정 안내서입니다.
커널 보안
커널 보안 처리 방법을 담았습니다.
Managing kernel modules
Kernel modules are object files that contain code to extend the kernel.
Kernel Optimizations
Describes various optimizations for the kernel, like performance.

Upgrade

업그레이드
기존 설정을 통해 새 커널을 업그레이드 하는 절차입니다.

Removal

제거
오래된 커널을 완전하게 제거하는 절차입니다.

Troubleshooting

In-kernel configuration support

See the IKCONFIG support sub-article.

Kernel command-line parameters

When booting from a bootloader, the Linux kernel can accept command-line parameters to change its behavior. This can aid in troubleshooting the kernel at boot time, to blacklist a certain module that should not loading, etc.

Specifically, the following command-line parameters may be helpful when booting Gentoo:

  • earlyprintk=
  • module_blacklist=
  • nomodule
  • loglevel=
  • rootdelay=

추가 참조

외부 자료

  • planet.kernel.org/ - 리눅스 커널 관련 블로그
  • kernelhub.org/ - 커널 통계에 관련된 사이트
  • kernelnewbies.org/ - "경험이 풍부한 개발자들의 커널 개선 작업 열망을 담아 커널 지식을 공유하고자 만든 사이트입니다."

References