View previous topic :: View next topic |
Author |
Message |
Majed17 Guru


Joined: 31 Aug 2011 Posts: 333 Location: Minsk, Belarus
|
Posted: Tue Mar 26, 2024 7:31 am Post subject: grub does not recognise 6.6.21 kernel |
|
|
i have in portage:
use=systemd and systemd-boot
after i read the kernel upgrade i added the rets of the flags and now it looks like this:
Code: | USE="ukify uki refind grub efistub dracut mariadb systemd-boot graph symlink systemd classicui web apache2 php snmp -xattr -threads -bindist intl pcntl elibc_glibc any-of cryptsetup pdo mmx sse sse2 symlink ncat udev cgi fpm ldap dlz snmp gmp zlib ssl rrdcgi rrdtool sendmail sockets perl gd jpeg png gif dba svg session cli tcpd truetype systemd sysv-utils jit"
|
but now when updating world i get:
Code: | sudo emerge --ask --changed-use --deep --update @world
These are the packages that would be merged, in order:
Calculating dependencies /
!!! Problem resolving dependencies for sys-kernel/installkernel from @selected
... done!
Dependency resolution took 1.40 s (backtrack: 0/20).
!!! The ebuild selected to satisfy "sys-kernel/installkernel" has unmet requirements.
- sys-kernel/installkernel-28::gentoo USE="dracut grub refind systemd systemd-boot uki ukify" ABI_X86="(64)"
The following REQUIRED_USE flag constraints are unsatisfied:
at-most-one-of ( grub refind systemd-boot )
The above constraints are a subset of the following complete expression:
systemd-boot? ( systemd ) ukify? ( uki ) at-most-one-of ( grub refind systemd-boot )
(dependency required by "@selected" [set])
(dependency required by "@world" [argument]) |
wheni do make install
i have a linux file installed in /boot/5378593cd156cceaefaf2dde60b86bdb/6.6.21-gentoo
Code: | sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.6.13-gentoo
Found initrd image: /boot/initramfs-6.6.13-gentoo.img
Adding boot menu entry for UEFI Firmware Settings ...
done
|
what to do? _________________ Seek and you shall find, Knock and it shall be opened, cry and you shall find comfort. |
|
Back to top |
|
 |
freifunk_connewitz Apprentice

Joined: 08 Feb 2006 Posts: 240
|
Posted: Tue Mar 26, 2024 9:53 am Post subject: |
|
|
Maybe it has to do with the recent installkernel change? Have you read the news item?
Quote: | 2024-01-18-installkernel-merge
Title Merging of installkernel-gentoo and installkernel-systemd
Author Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Posted 2024-01-18
Revision 7
/sbin/installkernel is a script called by the kernels 'make install' as well
as by the distribution kernels post install phase. It was previously provided
by sys-kernel/installkernel-gentoo or sys-kernel/installkernel-systemd. The
functionalities of these two packages have now been merged into
sys-kernel/installkernel.
sys-kernel/installkernel now provides the systemd USE flag to switch between
the traditional installkernel (formerly sys-kernel/installkernel-gentoo) and
systemd's kernel-install (formerly sys-kernel/installkernel-systemd(-boot)).
Additionally, the new sys-kernel/installkernel with the systemd flag enabled
now provides a default install.conf configuration file which ensures that it
will work out-of-the-box with no configuration (other then USE flag
configuration) required for most setups.
Details on configuration and customization can be found on the installkernel
wiki page [1]. Below we provide the most important migration notes.
User Action Required (GRUB users)
====================
Previously sys-kernel/installkernel-gentoo provided kernel installation
automation for users of GRUB via USE=grub. The new sys-kernel/installkernel
provides the same functionality, which now works with both the traditional
installkernel and systemd's kernel-install.
Users of GRUB should therefore:
- check that the "grub" USE flag is enabled
to ensure that systemd's kernel-install uses the correct layout that
grub-mkconfig understands.
Users of GRUB may wish to explicitly choose either the traditional
installkernel or systemd's kernel-install, in which case they may do so
via USE=-/+systemd.
sys-kernel/installkernel is renamed from sys-kernel/installkernel-gentoo,
therefore no user action is required to upgrade to the new package.
User Action Required (systemd-boot users)
====================
Previously sys-kernel/installkernel-systemd provided kernel installation
automation for users of systemd-boot. sys-kernel/installkernel provides
the same functionality but only via systemd's kernel-install.
Users of systemd-boot should therefore:
- ensure that the "systemd" and "systemd-boot" USE flags are enabled
when upgrading to >=sys-kernel/installkernel-14.
Users who are using the distribution kernels (i.e. gentoo-kernel(-bin)) should
enable the "dracut" USE flag on installkernel as well to pull in and enable
the dracut initramfs generator. This is enforced by portage.
Note that the automagic behaviour of the dracut kernel-install plugin is
removed in sys-kernel/installkernel. Users who rely on the dracut plugin
automatically generating an initramfs when installing the kernel must
enable the "dracut" USE flag to retain this behaviour.
The upgrade path is enforced by sys-kernel/installkernel-systemd-4, which is
just a wrapper pulling in >=sys-kernel/installkernel-14 with the "systemd" flag
enabled. sys-kernel/installkernel-systemd may be removed after installing
>=sys-kernel/installkernel-14.
emerge --noreplace sys-kernel/installkernel
emerge --depclean sys-kernel/installkernel-systemd
User Action Required (rEFInd users)
====================
Previously sys-kernel/installkernel-gentoo provided kernel installation
automation for users of rEFInd. The new sys-kernel/installkernel provides the
same functionality, which now works with both the traditional installkernel and
systemd's kernel-install.
Users of rEFInd should:
- ensure that the "systemd-boot" and "grub" USE flags are NOT enabled when
upgrading to >=sys-kernel/installkernel-20.
Additionally, users of rEFInd may want to
- enable the "refind" USE flag to
install an icon file alongside the installed kernel image which rEFInd will
pick up at runtime.
Users of rEFInd may wish to explicitly choose either the traditional
installkernel or systemd's kernel-install, in which case they may do so
via USE=-/+systemd.
sys-kernel/installkernel is renamed from sys-kernel/installkernel-gentoo,
therefore no further user action is required to upgrade to the new package.
User Action Required (users of other bootloaders and custom scripts)
====================
Users who have previously relied on custom installkernel or kernel-install
plugins should either ensure that the same kernel installation method will be
used after upgrading to >=sys-kernel/installkernel-14 (via USE=+/-systemd) or
migrate these custom plugins (details are on the wiki [1]).
Users of bootloaders other than GRUB, systemd-boot or refind may want to retain
the traditional /boot layout. They may do so by:
- ensuring that the "systemd-boot", "grub" and "refind" USE flags are disabled.
Optional: Unified Kernel Images (all users)
====================
Users who wish to use Unified Kernel Images[2] (e.g. for EFI stub booting) may
do so by
- enabling the "ukify" and "uki" USE flags.
Which will automatically install a bootable EFI executable to the EFI system
partition.
The UEFI firmware, as well as, Systemd-boot, GRUB and rEFInd are capable of
loading Unified Kernel Images. For more details see the wiki page on Unified
Kernel Images[2]
[1] https://wiki.gentoo.org/wiki/Installkernel
[2] https://wiki.gentoo.org/wiki/Unified_kernel_image |
|
|
Back to top |
|
 |
Majed17 Guru


Joined: 31 Aug 2011 Posts: 333 Location: Minsk, Belarus
|
Posted: Tue Mar 26, 2024 12:25 pm Post subject: |
|
|
i used https://wiki.gentoo.org/wiki/Systemd/systemd-boot
got to installkernel and here is the result:
s Code: | udo installkernel list
Loading /usr/lib/kernel/install.conf…
layout=bls set via /usr/lib/kernel/install.conf
INITRD_GENERATOR (dracut) 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=5378593cd156cceaefaf2dde60b86bdb set via /etc/machine-id.
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: 5378593cd156cceaefaf2dde60b86bdb
Kernel image not installed to '/usr/lib/modules/list/vmlinuz', requiring manual kernel image path specification |
i reverted the use flag to systemd and systemd--boot and added dracut
i'm afraid that a reboot would not boot the system. _________________ Seek and you shall find, Knock and it shall be opened, cry and you shall find comfort. |
|
Back to top |
|
 |
pietinger Moderator

Joined: 17 Oct 2006 Posts: 5490 Location: Bavaria
|
Posted: Tue Mar 26, 2024 12:27 pm Post subject: Re: grub does not recognise 6.6.21 kernel |
|
|
Majed17 wrote: | [...] after i read the kernel upgrade i added the rets of the flags and now it looks like this:
Code: | USE="ukify uki refind grub efistub dracut mariadb systemd-boot graph symlink systemd classicui web apache2 php snmp -xattr -threads -bindist intl pcntl elibc_glibc any-of cryptsetup pdo mmx sse sse2 symlink ncat udev cgi fpm ldap dlz snmp gmp zlib ssl rrdcgi rrdtool sendmail sockets perl gd jpeg png gif dba svg session cli tcpd truetype systemd sysv-utils jit"
|
but now when updating world i get:
Code: | [...]
The following REQUIRED_USE flag constraints are unsatisfied:
at-most-one-of ( grub refind systemd-boot )
The above constraints are a subset of the following complete expression:
systemd-boot? ( systemd ) ukify? ( uki ) at-most-one-of ( grub refind systemd-boot ) |
[...]
what to do? |
Choose one boot manager; you can't have all three: grub refind systemd-boot
If you want use grub then disable the Use-flags "refind systemd-boot" (and re-emerge "installkernel"). _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
 |
Majed17 Guru


Joined: 31 Aug 2011 Posts: 333 Location: Minsk, Belarus
|
Posted: Tue Mar 26, 2024 12:35 pm Post subject: |
|
|
i'm trying to switch to systemd-boot
Code: | USE="dracut mariadb systemd-boot graph symlink systemd classicui web apache2 php snmp -xattr -threads -bindist intl pcntl elibc_glibc any-of cryptsetup pdo mmx sse sse2 symlink ncat udev cgi fpm ldap dlz snmp gmp zlib ssl rrdcgi rrdtool sendmail sockets perl gd jpeg png gif dba svg session cli tcpd truetype systemd sysv-utils jit" |
what am i missing or should i switch back to grub? _________________ Seek and you shall find, Knock and it shall be opened, cry and you shall find comfort. |
|
Back to top |
|
 |
pietinger Moderator

Joined: 17 Oct 2006 Posts: 5490 Location: Bavaria
|
|
Back to top |
|
 |
Majed17 Guru


Joined: 31 Aug 2011 Posts: 333 Location: Minsk, Belarus
|
Posted: Tue Mar 26, 2024 1:04 pm Post subject: |
|
|
so now use=
Code: | USE="dracut mariadb grub graph symlink systemd classicui web apache2 php snmp -xattr -threads -bindist intl pcntl elibc_glibc any-of cryptsetup pdo mmx sse sse2 symlink ncat udev cgi fpm ldap dlz snmp gmp zlib ssl rrdcgi rrdtool sendmail sockets perl gd jpeg png gif dba svg session cli tcpd truetype systemd sysv-utils jit" |
then i followed my old instructions on upgrading the kernel
Code: | cd /usr/src/linux
sudo cp /boot/config-6.6.13-gentoo /usr/src/linux/.config
sudo make olddefconfig
diff <(cat .config | sort) <(cat .config.old | sort) | awk '/^<.*(=|Linux)/ { $1=""; print }'
############And which have been removed
diff <(cat .config | sort) <(cat .config.old | sort) | awk '/^>.*(=|Linux)/ { $1=""; print }'
############A quad core system contains four logical cores plus one (4 + 1):
sudo make -j5
sudo make modules_install
sudo make install
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo reboot |
Code: | /boot $ls -l
total 61388
drwxr-xr-x 3 root root 1024 Mar 26 08:30 5378593cd156cceaefaf2dde60b86bdb
-rw-r--r-- 1 root root 146292 Jan 22 11:53 config-6.6.13-gentoo
drwxr-xr-x 6 root root 1024 Mar 26 15:53 grub
-rw-r--r-- 1 root root 13447369 Jan 22 11:53 initramfs-6.6.13-gentoo.img
-rw------- 1 root root 13795734 Mar 26 15:53 initramfs-6.6.21-gentoo.img
-rw-r--r-- 1 root root 13501440 Mar 26 15:53 kernel-6.6.21-gentoo
drwxr-xr-x 3 root root 1024 Mar 26 08:30 loader
drwx------ 2 root root 12288 Jun 10 2021 lost+found
-rw-r--r-- 1 root root 8223483 Jan 22 11:53 System.map-6.6.13-gentoo
-rw-r--r-- 1 root root 13476448 Jan 22 11:53 vmlinuz-6.6.13-gentoo
|
but it booted into 6.6.13
~ $ uname -r
6.6.13-gentoo _________________ Seek and you shall find, Knock and it shall be opened, cry and you shall find comfort. |
|
Back to top |
|
 |
pietinger Moderator

Joined: 17 Oct 2006 Posts: 5490 Location: Bavaria
|
Posted: Tue Mar 26, 2024 1:16 pm Post subject: |
|
|
You want the traditional installation of your kernel, but you have use-flag "systemd" active. You should disable it for "installkernel" (and re-emerge "installkernel"). See also:
Quote: | Users of GRUB may wish to explicitly choose either the traditional
installkernel or systemd's kernel-install, in which case they may do so
via USE=-/+systemd. |
(if you have an systemd system then you can not disable it gloabally; disable it in your /etc/portage/package.use for installkernel; see also:
https://wiki.gentoo.org/wiki/Installkernel#Traditional_installkernel_.28USE.3D-systemd.29 ) _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
 |
Majed17 Guru


Joined: 31 Aug 2011 Posts: 333 Location: Minsk, Belarus
|
Posted: Thu Mar 28, 2024 1:05 pm Post subject: |
|
|
thanks that worked like a miracle! _________________ Seek and you shall find, Knock and it shall be opened, cry and you shall find comfort. |
|
Back to top |
|
 |
Nowa Developer


Joined: 25 Jun 2014 Posts: 478 Location: Nijmegen
|
Posted: Thu Mar 28, 2024 2:39 pm Post subject: |
|
|
Quote: | sudo installkernel list |
The correct command is 'kernel-install list'
Quote: | i'm trying to switch to systemd-boot |
Quote: | i'm afraid that a reboot would not boot the system. |
Systemd-boot uses a layout that is not compatible with GRUB (and vice-versa), it is normal that "grub-mkconfig" does not pick-up your kernel when the "systemd-boot" USE flag is enabled. Nor will systemd-boot pickup kernels that were installed when the "grub" flag is enabled.
If you want to be sure that systemd-boot will find and boot your kernel before rebooting, the command you are looking for is "bootctl list"
Quote: | You want the traditional installation of your kernel, but you have use-flag "systemd" active. You should disable it for "installkernel" (and re-emerge "installkernel"). See also: |
Both + and - systemd are compatible with GRUB, the use flag that controls whether kernels are installed for systemd-boot is NOT "systemd", it is "systemd-boot". That being said "systemd" is required by "systemd-boot" because the installation of kernels for systemd-boot is not implemented for the legacy installkernel. _________________ OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
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 |
|
 |
|