Upkeep¶
Command line¶
Library¶
Kernel-related utilities.
-
upkeep.utils.kernel.rebuild_kernel(num_cpus: int | None =
None) None¶ Rebuilds the kernel.
Runs the following steps:
Checks for a kernel configuration in
/usr/src/linux/.configor/proc/config.gzmake oldconfigmakemake modules_installmake installemerge --usepkg=n @module-rebuild @x11-module-rebuild
The expectation is that your configuration for installkernel will set up booting from the new kernel (updating systemd-boot, etc).
See also
-
upkeep.utils.kernel.upgrade_kernel(num_cpus: int | None =
None, *, fatal: bool | None =True) None¶ Upgrades the kernel.
The logic used here is to check the eselect kernel output for two kernel lines, where one is selected and the newest kernel is not. The newest kernel then gets picked and
upgrade_kernel()takes care of the rest.- Parameters:¶
- Raises:¶
NoKernelToUpgradeTo – If there is no newer kernel to upgrade to.
TooManyLinesFromEselect – If there are too many lines in the output from
eselect kernel list.NoValueIsUnselected – If no value is unselected in the output from
eselect kernel list.KernelConfigMissing – If a kernel configuration cannot be found.
See also