genkernel
Genkernel⚑
Usage⚑
Generate a new kernel⚑
- Set the desired kernel as default with
eselect
. - Run
genkernel all
.
With the kernel alias⚑
alias kernel='genkernel --kernel-config=/root/kernel_config all && mkkernelsig && emerge -Av @module-rebuild'
Note: Steps 4 and 5 should have be done the last time, if that isn't the case, do them first.
- Download the new gentoo-sources by enabling them in package.license.
- Select the new sources with
eselect kernel
. - Compile the new kernel and select new configurations with
kernel
.
After rebooting and checking that everything works as expected:
- Save the kernel configuration with
cp /usr/src/linux/.config ~/kernel-config-
uname -r``. - Copy this configurations as the default:
cp ~/kernel-config-
uname -r~/kernel_config
This will create a new clean kernel from the default configuration.
Preserve old configuration⚑
Manually this will be done with make oldconfig
.
If we save a kernel configuration, we can use it with newer versions (it will be automatically merged with the new kernel settings). To do so, we need to specify the old configuration to genkernel.
genkernel --kernel-config=/root/kernel_config all