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
I just noticed System.map is neither being installed
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
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.
(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.
(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 🤔
Better like this: https://github.com/projg2/installkernel-gentoo/commit/51da8dd3f418a113a8499367e3a2d9c6eaefd97e
It is nice now. Thanks a lot!