Kernel/Upgrade/de

This article describes the steps to upgrade to a new kernel.

Installation
A kernel upgrade get necessary, when because of updating the system new kernel sources get installed or when you yourself installs new kernel sources.

Configuration
The configuration parallels that of the manual configuration, since only the config file is reused. All steps are for the sake of completeness again here mentioned, for a more verbose explanation see the other article.

Set symlink
First set the /usr/src/linux symlink, so it points to the new kernel sources. This can be done in one of three ways:


 * 1. Installing the kernel sources with active symlink USE flag
 * This will make the /usr/src/linux point to your newly installed kernel sources. If necessary, it can still be modified later with the following two methods:


 * 2. Setting 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:
 * This outputs the available kernel sources. The asterisk indicates the chosen sources. To change the kernel sources, e.g. to the second entry, do:


 * 3. Setting the symlink manually:

Copy previous kernel configuration
You can copy the configuration from currently running kernel to the new one. You can find it in several places:


 * In the procfs filesystem, if the kernel option Kernel .config support was activated in your present kernel:


 * In the /boot folder, if you installed the config file there:


 * In the kernel folder of your present kernel:

make oldconfig
Now update the previous config file for your new kernel:

The following configuration parallels that of the text based configuration with make config. For every difference between the kernel versions you ask, if you want to activate the driver or feature. An 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, modul 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 you should remember the option, answer with no and have a look at the option afterwards in make menuconfig:

Reinstall external kernel modules
You have to rebuild external kernel modules like the proprietary graphics drivers nvidia and fglrx for each new kernel. If the kernel hasn't been built yet, you have to first prepare it for the building of the external kernel modules:

Using stable portage
You can reinstall the packages yourself or you install the tool :

After the installation you let module-rebuild search for external kernel modules and add it to its list:

module-rebuild keeps this list, so this step is only necessary after installing of new external kernel modules or removing them.

The following command reinstalls the external kernel modules then:

Using portage-2.2
You can rebuild the packages using the @module-rebuild set of portage-2.2:

Build
Since here you can following the steps in the manual configuration article.

Removing old kernels
See the kernel removing article.