After updating the kernel source with portage:
- Set symlink to new version
eselect kernel listsudo eselect kernel set <n>(withnthe number of the desired kernel version
- Copy the
.configfile to the new kernel foldersudo cp /usr/src/linux-1.2.3-gentoo/.config /usr/src/linux/.config(where1.2.3is the currently running kernel version)
- Update the
.configfor new itemscd /usr/src/linuxsudo make oldconfig- Adjust new options as needed
- Build the kernel:
sudo makesudo make modules_installsudo make install
See also
- Gentoo wiki docs: https://wiki.gentoo.org/wiki/Kernel/Upgrade
Removing old kernels
- Identify the kernel version you want to remove (for example, 6.6.58-r1 —
sys-kernel/gentoo-sources-6.6.58-r1) - Depclean it
sudo emerge -a --depclean gentoo-sources:6.6.58-r1
- Clean old kernel leftovers
sudo eclean-kernel -n 4-n 4is how many of the most recent kernels you want to keep (in this case, keep the 4 newest kernels)
See also