Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 926689 - sys-kernel/installkernel-28: /boot/config-XXX is not installed
Summary: sys-kernel/installkernel-28: /boot/config-XXX is not installed
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Distribution Kernel Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-10 12:25 UTC by Pacho Ramos
Modified: 2024-03-17 10:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2024-03-10 12:25:16 UTC
I was trying to find a kernel config for a recent kernel and I just noticed that the .config file is not being installed into /boot since the installkernel utility was recently changed.

I have it installed with the following USE flags:
[ebuild   R   ~] sys-kernel/installkernel-28::gentoo  USE="grub systemd -dracut -refind -systemd-boot -uki -ukify" 0 KiB


And the config file is at /usr/src/linux/.config, but it seems it is no longer installed into /boot:
# make install
  INSTALL /boot
Loading /usr/lib/kernel/install.conf…
layout=grub set via /usr/lib/kernel/install.conf
INITRD_GENERATOR (none) set via /usr/lib/kernel/install.conf.
UKI_GENERATOR (none) set via /usr/lib/kernel/install.conf.
Loaded /usr/lib/kernel/install.conf.
MACHINE_ID=cacdef0d1ca791dd0c8db8a058960b1c set via /etc/machine-id.
Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Found container virtualization none.
Directory "/boot" is not the root of the file system.
Couldn't find an XBOOTLDR partition.
Failed to check file system type of "/efi": No such file or directory
File system "/boot" is not a FAT EFI System Partition (ESP) file system.
Failed to check file system type of "/boot/efi": No such file or directory
Couldn't find EFI system partition, ignoring.
KERNEL_INSTALL_BOOT_ROOT autodetection yielded no candidates, using "/boot".
Using entry token: cacdef0d1ca791dd0c8db8a058960b1c
kernel version (6.6.21-gentoo) set via command line.
kernel image file (/usr/src/linux/arch/x86/boot/bzImage) set via command line.
File lacks MZ executable header.
Using ENTRY_DIR=/boot/cacdef0d1ca791dd0c8db8a058960b1c/6.6.21-gentoo
Using plugins: 
  /usr/lib/kernel/install.d/00-00machineid-directory.install
  /usr/lib/kernel/install.d/10-copy-prebuilt.install
  /usr/lib/kernel/install.d/50-depmod.install
  /usr/lib/kernel/install.d/90-compat.install
  /usr/lib/kernel/install.d/90-loaderentry.install
  /usr/lib/kernel/install.d/90-uki-copy.install
  /usr/lib/kernel/install.d/91-grub-mkconfig.install
Plugin environment: 
  LC_COLLATE=C.UTF-8
  KERNEL_INSTALL_VERBOSE=1
  KERNEL_INSTALL_IMAGE_TYPE=unknown
  KERNEL_INSTALL_MACHINE_ID=cacdef0d1ca791dd0c8db8a058960b1c
  KERNEL_INSTALL_ENTRY_TOKEN=cacdef0d1ca791dd0c8db8a058960b1c
  KERNEL_INSTALL_BOOT_ROOT=/boot
  KERNEL_INSTALL_LAYOUT=grub
  KERNEL_INSTALL_INITRD_GENERATOR=none
  KERNEL_INSTALL_UKI_GENERATOR=none
  KERNEL_INSTALL_STAGING_AREA=/tmp/kernel-install.staging.GfmRVe
Plugin arguments: add 6.6.21-gentoo /boot/cacdef0d1ca791dd0c8db8a058960b1c/6.6.21-gentoo /usr/src/linux/arch/x86/boot/bzImage
Successfully forked off '(sd-exec-strv)' as PID 228491.
About to execute /usr/lib/kernel/install.d/00-00machineid-directory.install add 6.6.21-gentoo /boot/cacdef0d1ca791dd0c8db8a058960b1c/6.6.21-gentoo /usr/src/linux/arch/x86/boot/bzImage
Successfully forked off '(direxec)' as PID 228492.
/usr/lib/kernel/install.d/00-00machineid-directory.install succeeded.
About to execute /usr/lib/kernel/install.d/10-copy-prebuilt.install add 6.6.21-gentoo /boot/cacdef0d1ca791dd0c8db8a058960b1c/6.6.21-gentoo /usr/src/linux/arch/x86/boot/bzImage
Successfully forked off '(direxec)' as PID 228493.
/usr/lib/kernel/install.d/10-copy-prebuilt.install succeeded.
About to execute /usr/lib/kernel/install.d/50-depmod.install add 6.6.21-gentoo /boot/cacdef0d1ca791dd0c8db8a058960b1c/6.6.21-gentoo /usr/src/linux/arch/x86/boot/bzImage
Successfully forked off '(direxec)' as PID 228495.
+depmod -a 6.6.21-gentoo
/usr/lib/kernel/install.d/50-depmod.install succeeded.
About to execute /usr/lib/kernel/install.d/90-compat.install add 6.6.21-gentoo /boot/cacdef0d1ca791dd0c8db8a058960b1c/6.6.21-gentoo /usr/src/linux/arch/x86/boot/bzImage
Successfully forked off '(direxec)' as PID 228496.
/usr/lib/kernel/install.d/90-compat.install succeeded.
About to execute /usr/lib/kernel/install.d/90-loaderentry.install add 6.6.21-gentoo /boot/cacdef0d1ca791dd0c8db8a058960b1c/6.6.21-gentoo /usr/src/linux/arch/x86/boot/bzImage
Successfully forked off '(direxec)' as PID 228498.
/usr/lib/kernel/install.d/90-loaderentry.install succeeded.
About to execute /usr/lib/kernel/install.d/90-uki-copy.install add 6.6.21-gentoo /boot/cacdef0d1ca791dd0c8db8a058960b1c/6.6.21-gentoo /usr/src/linux/arch/x86/boot/bzImage
Successfully forked off '(direxec)' as PID 228499.
/usr/lib/kernel/install.d/90-uki-copy.install succeeded.
About to execute /usr/lib/kernel/install.d/91-grub-mkconfig.install add 6.6.21-gentoo /boot/cacdef0d1ca791dd0c8db8a058960b1c/6.6.21-gentoo /usr/src/linux/arch/x86/boot/bzImage
Successfully forked off '(direxec)' as PID 228500.
Backing up existing grub config as /boot/grub/grub.cfg~
Generating new GRUB config as /boot/grub/grub.cfg
Generando un fichero de configuración de grub...
Encontrado tema: /boot/grub/themes/starfield/theme.txt
Encontrada imagen de linux: /boot/vmlinuz-6.1.57-gentoo
Encontrada imagen de linux: /boot/vmlinuz-6.1.47-gentoo
Encontrada imagen de linux: /boot/vmlinuz-6.1.47-gentoo.old
Encontrada imagen de linux: /boot/vmlinuz-6.1.38-gentoo
Encontrada imagen de linux: /boot/kernel-6.6.21-gentoo
Encontrada imagen de linux: /boot/kernel-6.6.17-gentoo
Encontrada imagen de linux: /boot/kernel-6.6.13-gentoo
Adding boot menu entry for UEFI Firmware Settings ...
hecho
/usr/lib/kernel/install.d/91-grub-mkconfig.install succeeded.
(sd-exec-strv) succeeded.

Thanks a lot
Comment 1 Pacho Ramos gentoo-dev 2024-03-10 12:39:44 UTC
I just noticed System.map is neither being installed
Comment 2 Nowa Ammerlaan gentoo-dev 2024-03-10 13:31:48 UTC
Yes that is a difference between Systemd's kernel-install (USE=systemd) and Debian's installkernel (USE=-systemd), see [1]. You can still get the config via various other methods:
- /usr/src/linux/.config
- /proc/config{,.gz}

[1] https://wiki.gentoo.org/wiki/Installkernel
Comment 3 Pacho Ramos gentoo-dev 2024-03-10 13:49:57 UTC
The manpage is misleading then :/

It says:
       In  addition  to that, System.map passed on the command-line is installed using the same logic.  If the directory containing System.map contains .config file, it is also installed.  If the directory
       containing zImage contains initrd file, it is also installed.
Comment 4 Nowa Ammerlaan gentoo-dev 2024-03-10 14:48:35 UTC
(In reply to Pacho Ramos from comment #3)
> The manpage is misleading then :/
> 
> It says:
>        In  addition  to that, System.map passed on the command-line is
> installed using the same logic.  If the directory containing System.map
> contains .config file, it is also installed.  If the directory
>        containing zImage contains initrd file, it is also installed.


This is accurate (it is what Debian's installkernel does), but it does not apply to the +systemd case. The man page also says:

If systemd’s kernel-install is present on the system and the environment variable SYSTEMD_KERNEL_INSTALL is set to 1, then it is called to install the kernel. The default setting for this environment variable is controlled by the ebuild.  See the kernel-install manual for more information on how  to
configure it.

And 'man kernel-install' says:

COMPATIBILITY WITH THE KERNEL BUILD SYSTEM

installkernel [OPTIONS...] VERSION VMLINUZ [MAP] [INSTALLATION-DIR]

When invoked as installkernel, this program accepts arguments as specified by the kernel build system's make install command. The VERSION and VMLINUZ parameters specify the kernel version and the kernel binary. The other two parameters (MAP and INSTALLATION-DIR) are currently ignored.


I'm open to suggestions to improve the wording in the installkernel manual though. It undoubtedly could be better.
Comment 5 Pacho Ramos gentoo-dev 2024-03-16 12:46:08 UTC
(In reply to Andrew Ammerlaan from comment #4)
[...] 
> I'm open to suggestions to improve the wording in the installkernel manual
> though. It undoubtedly could be better.

Maybe it could explicitly state that kernel-install won't behave as installkernel regarding the finally installed files (different files are installed, and they are also named in a different way), and that the details explained in the other paragraphs only apply to the Debian version 🤔
Comment 7 Pacho Ramos gentoo-dev 2024-03-17 10:49:38 UTC
It is nice now. Thanks a lot!