Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot install kernel with installkernel-24 and legacy boot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
gibus92
n00b
n00b


Joined: 27 Dec 2016
Posts: 23
Location: France

PostPosted: Sat Feb 03, 2024 7:51 pm    Post subject: Cannot install kernel with installkernel-24 and legacy boot Reply with quote

Hello,

I try to install kernel 6.7.3 after an update of my local portage tree today 18:30, using installkernel-24 in a virtualized Gentoo managed in VMware player 17.5. I use a grub legacy boot with no UEFI configuration, since :

Code:

dmesg | grep "EFI v"


return an empty string.

installkernel is configured with grub and dracut Use flags :

Code:

equery u installkernel
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for sys-kernel/installkernel-24:
 U I
 + + dracut       : Generate an initrd or UKI on each kernel installation
 + + grub         : Re-generate grub.cfg on each kernel installation
 + + systemd      : Use systemd's kernel-install to install kernels
 - - systemd-boot : Use systemd-boot's native layout by default
 - - uki          : Install UKIs to ESP/EFI/Linux for EFI stub booting and/or bootloaders with support for auto-discovering UKIs
 - - ukify        : Build an UKI with systemd's ukify on each kernel installation


Here's make install command output in console :
Code:

make install
  INSTALL /boot
Loading /etc/kernel/install.conf…
layout=grub set via /etc/kernel/install.conf
Loaded /etc/kernel/install.conf.
Loading /etc/machine-info…
MACHINE_ID=9003713490d24770a0dc8a18b55284c3 set via /etc/machine-info.
Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Found container virtualization none.
/dev/sda1: Wrong PART_ENTRY_TYPE=0x83 for XBOOTLDR partition.
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: 9003713490d24770a0dc8a18b55284c3
kernel version (6.7.3-gentoo-x86_64) set via command line.
kernel image file (/usr/src/linux-6.7.3-gentoo/arch/x86/boot/bzImage) set via command line.
Using ENTRY_DIR=/boot/9003713490d24770a0dc8a18b55284c3/6.7.3-gentoo-x86_64
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/50-dracut.install
  /usr/lib/kernel/install.d/51-dracut-rescue.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=9003713490d24770a0dc8a18b55284c3
  KERNEL_INSTALL_ENTRY_TOKEN=9003713490d24770a0dc8a18b55284c3
  KERNEL_INSTALL_BOOT_ROOT=/boot
  KERNEL_INSTALL_LAYOUT=grub
  KERNEL_INSTALL_INITRD_GENERATOR=
  KERNEL_INSTALL_UKI_GENERATOR=
  KERNEL_INSTALL_STAGING_AREA=/tmp/kernel-install.staging.d6l6zv
Plugin arguments: add 6.7.3-gentoo-x86_64 /boot/9003713490d24770a0dc8a18b55284c3/6.7.3-gentoo-x86_64 /usr/src/linux-6.7.3-gentoo/arch/x86/boot/bzImage
Successfully forked off '(sd-executor)' as PID 241439.
About to execute /usr/lib/kernel/install.d/00-00machineid-directory.install add 6.7.3-gentoo-x86_64 /boot/9003713490d24770a0dc8a18b55284c3/6.7.3-gentoo-x86_64 /usr/src/linux-6.7.3-gentoo/arch/x86/boot/bzImage
Successfully forked off '(direxec)' as PID 241440.
/usr/lib/kernel/install.d/00-00machineid-directory.install succeeded.
About to execute /usr/lib/kernel/install.d/10-copy-prebuilt.install add 6.7.3-gentoo-x86_64 /boot/9003713490d24770a0dc8a18b55284c3/6.7.3-gentoo-x86_64 /usr/src/linux-6.7.3-gentoo/arch/x86/boot/bzImage
Successfully forked off '(direxec)' as PID 241441.
/usr/lib/kernel/install.d/10-copy-prebuilt.install succeeded.
About to execute /usr/lib/kernel/install.d/50-depmod.install add 6.7.3-gentoo-x86_64 /boot/9003713490d24770a0dc8a18b55284c3/6.7.3-gentoo-x86_64 /usr/src/linux-6.7.3-gentoo/arch/x86/boot/bzImage
Successfully forked off '(direxec)' as PID 241443.
+depmod -a 6.7.3-gentoo-x86_64
/usr/lib/kernel/install.d/50-depmod.install succeeded.
About to execute /usr/lib/kernel/install.d/50-dracut.install add 6.7.3-gentoo-x86_64 /boot/9003713490d24770a0dc8a18b55284c3/6.7.3-gentoo-x86_64 /usr/src/linux-6.7.3-gentoo/arch/x86/boot/bzImage
Successfully forked off '(direxec)' as PID 241444.
dracut[I]: Executing: /usr/bin/dracut -f --verbose --kernel-image /usr/src/linux-6.7.3-gentoo/arch/x86/boot/bzImage --uefi --kver 6.7.3-gentoo-x86_64 /tmp/kernel-install.staging.d6l6zv/uki.efi
dracut[F]: Can't find a uefi stub '/usr/lib/systemd/boot/efi/linuxx64.efi.stub' to create a UEFI executable
/usr/lib/kernel/install.d/50-dracut.install failed with exit status 1.
/usr/lib/kernel/install.d/50-dracut.install failed with exit status 1.
(sd-executor) failed with exit status 1.
make[1]: *** [arch/x86/Makefile:295: install] Error 1
make: *** [Makefile:234: __sub-make] Error 2


I work around the issue by manually installing the kernel in /boot and calling a dracut command to generate the initramfs, then a classical grub-mkconfig.

But I have to say that new boot kernel is corrupted, since i get this message, already reported by another user :

Code:

Loading Linux 6.7.3-gentoo-x86_64 ...
error: invalid magic number.
Loading initial ramdisk
error: you need to load the kernel first.


Previous kernel-6.7.2 boot is still usable.

Thank you for your feedback.
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 266
Location: Nijmegen

PostPosted: Sun Feb 04, 2024 10:47 am    Post subject: Reply with quote

You are overriding the configuration that installkernel set with /etc/kernel/install.conf and have not set uki_generator in there.

When it is unset dracut assumes you want to use it and will try to generate an UKI, but you don't have the systemd-stub installed required for this.

To resolve your problem remove /etc/kernel/install.conf or set uki_generator=none and initrd_genertator=dracut in this file.
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
gibus92
n00b
n00b


Joined: 27 Dec 2016
Posts: 23
Location: France

PostPosted: Sun Feb 04, 2024 4:09 pm    Post subject: Reply with quote

Ok, I fully set uki_generator and initrd_generator options in configuration file, should have read the wiki before.
I've done a make install again and kernel 6.7.3 is running now.

Thanks for your help,
Gilles
Back to top
View user's profile Send private message
AndrewAmmerlaan
Developer
Developer


Joined: 25 Jun 2014
Posts: 266
Location: Nijmegen

PostPosted: Sun Feb 04, 2024 4:40 pm    Post subject: Reply with quote

gibus92 wrote:
Ok, I fully set uki_generator and initrd_generator options in configuration file, should have read the wiki before.


Well if you had read the wiki before then you wouldn't have found this information. I added a warning about this today because of this problem you ran into. :P

And so problem by problem the wiki improves :D
_________________
OS: Gentoo 6.7.3-gentoo-dist, ~amd64, 17.1/desktop/plasma/systemd/merged-usr
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum