From 34f213ac35ded6b8c824704d6e65fc775837aa39 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Tue, 26 Apr 2022 19:11:35 +0200 Subject: Use /proc/config.gz for config diffs diff_kernel relies on the existence of the /boot/config-{kernel} file which is usually installed by the install-kernel script. This file may be missing on systems with a custom install workflow or EFI systems that use the systemd install_kernel functionality. The latter installs the EFI stub kernel only, no auxiliary files of any kind. Comparisons against the /boot/config-{kernel} file therefore fail on such systems. This commit attempts to support a wider range of install workflows by extracting the config from /proc/config.gz instead. Regardless of how the kernel is installed, this particular file should exist as long as CONFIG_IKCONFIG is enabled in the running kernel. A word about "running config": The way that phrase was used previous to this commit is technically inaccurate, since the "running config" could change by installing a kernel and replacing the config file under /boot. Now we *always* refer to the configuration saved within the currently running kernel. --- kern.1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'kern.1') diff --git a/kern.1 b/kern.1 index e1826f2..eb963dc 100644 --- a/kern.1 +++ b/kern.1 @@ -105,8 +105,11 @@ to display the differences between the generated kernel configuration and .Pp If no config is given, this command compares against the configuration of the currently running kernel. -This requires the configuration file to be present under -.Pa /boot . +This requires a kernel configuration to be present under +.Pa /proc/config.gz . +See the +.Sy CONFIG_IKCONFIG +configuration option in the kernel for more information. .It Sy build Builds the selected kernel. .It Sy install -- cgit v1.2.3-2-gb3c3