Handbook:Parts/Installation/Kernel/Dist-Kernel

Alternative: Using Distribution Kernels
Distribution Kernels are ebuild that cover the complete process of unpacking, configuring, compiling and installing the kernel. The primary advantage of this method is that the kernels are upgraded to new versions as part of @world upgrade without a need for manual action. Distribution Kernels default to a configuration supporting the majority of hardware but they can be customized via /etc/portage/savedconfig.

Installing correct installkernel
Before using the Distribution Kernels, please verify that you are using the correct installkernel package for your system. If you are using systemd-boot (formerly gummiboot), install:

If you are using a traditional /boot layout (e.g. GRUB, LILO, etc.), the gentoo variant should be installed by default. If in doubt:

Installing Distribution Kernel
To build the Distribution Kernel with Gentoo patches from source, type:

If you don't want to compile the kernel sources locally, you can use a precompiled image:

Upgrading and cleaning up
Once the kernel is installed, your package manager will automatically upgrade it to newer versions. The previous versions will be kept until the package manager is requested to clean up stale packages. Please remember to periodically run:

to save space. Alternatively, to specifically clean up old kernel versions:

Post-install/upgrade tasks
Due to technical limitations, Distribution Kernels can not automatically rebuild kernel modules installed by other packages. Therefore, after kernel upgrade you need to do it manually:

If you need any of these modules (e.g. ZFS) at early boot, you also need to rebuild initramfs afterwards: