Kernel

The kernel is Article description::the core of the operating system. Containing most of the device drives, the kernel offers interfaces for programs to access system hardware such as memory, graphic cards, and block devices.

This article refers exclusively to the Linux kernel and will focus on methods available to obtain, configure, and compile the Linux kernel on Gentoo systems.

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

gentoo-kernel
A newer method of obtaining a kernel is the package, which by default configures the kernel using a Gentoo provided kernel configuration file, then compiles the  kernel sources through Portage. One advantage to this approach is that the kernel binaries will be updated to newer releases with @world updates. This can lessen administrative attention from system administrators.

For more information on gentoo-kernel see the Distribution kernel project.

gentoo-kernel-bin
Thanks to the Distribution kernel project, another easy way to bootstrap a system is to use binary kernels via package. This package merely a precompiled version of the gentoo-kernel package mentioned the section prior.

USE flags
To obtain a kernel, it is necessary to install the kernel source code. The Gentoo recommended kernel sources for a desktop system are, of course,. These are maintained by the Gentoo developers, and patched when necessary to fix security vulnerabilities, functional problems, as well as to improve compatibility with rare system architectures.

Emerge
Now install :

Alternative kernels
Although all stable kernel Gentoo provides is, 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.

Searching all kernel packages
A full list of kernel sources with short descriptions can be found by searching with :

Configuration

 * Automatic configuration: is a tool used to automate the build process of the kernel and initramfs. The goal of genkernel is to help users through the kernel building process.


 * Manual configuration: Manual configuration enables the user, with some effort, to create a custom-fit kernel configuration.


 * Gentoo kernel configuration guide: Gentoo's kernel configuration guide.


 * Kernel security: Instructions for hardening the kernel.


 * Kernel Seeds: Like the option above, Kernels Seeds help the user, with some effort, create a custom-fit kernel configuration using an existing as a base.

Upgrade

 * Upgrade: Steps to upgrade to a new kernel using an existing configuration.

Removal

 * Removal: Steps to completely remove old kernels.

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.

Kernel.org has a nicely formatted list of available kernel command-line parameters to review.

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



External resources

 * planet.kernel.org - Blogs related to the Linux kernel.
 * kernelnewbies.org - A "community of aspiring Linux kernel developers who work to improve their Kernels and more experienced developers willing to share their knowledge".
 * kernel.org/doc/ - Official comprehensible documentation for the Linux kernel.
 * What Stable Kernel Should I Use?, written by Greg Kroah-Hartman.
 * Building the kernel as root can be harmful
 * The Linux Kernel Module Programming Guide