After updating the kernel source with portage:

  1. Set symlink to new version
    1. eselect kernel list
    2. sudo eselect kernel set <n> (with n the number of the desired kernel version
  2. Copy the .config file to the new kernel folder
    1. sudo cp /usr/src/linux-1.2.3-gentoo/.config /usr/src/linux/.config (where 1.2.3 is the currently running kernel version)
  3. Update the .config for new items
    1. cd /usr/src/linux
    2. sudo make oldconfig
    3. Adjust new options as needed
  4. Build the kernel:
    1. sudo make
    2. sudo make modules_install
    3. sudo make install

See also

Removing old kernels

  1. Identify the kernel version you want to remove (for example, 6.6.58-r1 — sys-kernel/gentoo-sources-6.6.58-r1)
  2. Depclean it
    1. sudo emerge -a --depclean gentoo-sources:6.6.58-r1
  3. Clean old kernel leftovers
    1. sudo eclean-kernel -n 4
    2. -n 4 is how many of the most recent kernels you want to keep (in this case, keep the 4 newest kernels)

See also