QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
543 stars 48 forks source link

Installing kernel-latest 5.13.13-1.fc32 shows `grub2-get-kernel-settings: command not found` #6886

Open ydirson opened 3 years ago

ydirson commented 3 years ago

Qubes OS release

4.1beta

Steps to reproduce

Request latest-and-greatest available kernel, still does not get installed automatically:

[root@dom0 ~]# qubes-dom0-update --enablerepo=qubes-*-testing kernel-latest
Using sys-firewall as UpdateVM to download updates for Dom0; this may take some time...
Qubes OS Repository for Dom0                                                                                                                                  2.9 MB/s | 3.0 kB     00:00    
Qubes OS Repository for Dom0                                                                                                                                  5.9 MB/s |  56 kB     00:00    
Package kernel-latest-1000:5.12.9-1.fc25.qubes.x86_64 is already installed.
Package kernel-latest-1000:5.12.14-1.fc25.qubes.x86_64 is already installed.
Package kernel-latest-1000:5.12.14-1.fc32.qubes.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

... and then it looks like a grub script does not find its tools, and no error is reported in the end, which is less than ideal:

[root@dom0 ~]# rpm -i /var/lib/qubes/updates/rpm/kernel-latest-5.13.13-1.fc32.qubes.x86_64.rpm 
/usr/lib/kernel/install.d/20-grub.install: line 81: grub2-get-kernel-settings: command not found
cat: /sys/power/resume: No such file or directory
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.13.13-1.fc32.qubes.x86_64
Found initrd image: /boot/initramfs-5.13.13-1.fc32.qubes.x86_64.img
Found linux image: /boot/vmlinuz-5.12.14-1.fc32.qubes.x86_64
Found initrd image: /boot/initramfs-5.12.14-1.fc32.qubes.x86_64.img
Found linux image: /boot/vmlinuz-5.12.14-1.fc25.qubes.x86_64
Found initrd image: /boot/initramfs-5.12.14-1.fc25.qubes.x86_64.img
Found linux image: /boot/vmlinuz-5.12.9-1.fc25.qubes.x86_64
Found initrd image: /boot/initramfs-5.12.9-1.fc25.qubes.x86_64.img
Found linux image: /boot/vmlinuz-5.10.61-1.fc32.qubes.x86_64
Found initrd image: /boot/initramfs-5.10.61-1.fc32.qubes.x86_64.img
Found linux image: /boot/vmlinuz-5.10.47-1.fc32.qubes.x86_64
Found initrd image: /boot/initramfs-5.10.47-1.fc32.qubes.x86_64.img
Found linux image: /boot/vmlinuz-5.4.129-1.fc25.qubes.x86_64
Found initrd image: /boot/initramfs-5.4.129-1.fc25.qubes.x86_64.img
Found linux image: /boot/vmlinuz-5.13.13-1.fc32.qubes.x86_64
Found initrd image: /boot/initramfs-5.13.13-1.fc32.qubes.x86_64.img
Found linux image: /boot/vmlinuz-5.12.14-1.fc32.qubes.x86_64
Found initrd image: /boot/initramfs-5.12.14-1.fc32.qubes.x86_64.img
Found linux image: /boot/vmlinuz-5.12.14-1.fc25.qubes.x86_64
Found initrd image: /boot/initramfs-5.12.14-1.fc25.qubes.x86_64.img
Found linux image: /boot/vmlinuz-5.12.9-1.fc25.qubes.x86_64
Found initrd image: /boot/initramfs-5.12.9-1.fc25.qubes.x86_64.img
Found linux image: /boot/vmlinuz-5.10.61-1.fc32.qubes.x86_64
Found initrd image: /boot/initramfs-5.10.61-1.fc32.qubes.x86_64.img
Found linux image: /boot/vmlinuz-5.10.47-1.fc32.qubes.x86_64
Found initrd image: /boot/initramfs-5.10.47-1.fc32.qubes.x86_64.img
Found linux image: /boot/vmlinuz-5.4.129-1.fc25.qubes.x86_64
Found initrd image: /boot/initramfs-5.4.129-1.fc25.qubes.x86_64.img
done
[root@dom0 ~]# 

Note that given the script showing an error, the issue may have been shown by earlier upgrades, but just hidden in the output as it's not intercepted to tell the user something bad happened.

isodude commented 3 years ago

https://github.com/QubesOS/qubes-grub2/commits/master

Our grub2 is missing the command even though upstream has it. https://github.com/QubesOS/qubes-grub2/blob/f93f7b494d73b72bad23dc509c9d831eb4281fbb/grub2.spec#L1484

andrewdavidwong commented 1 year ago

Just noticed the same thing when installing kernel-latest. How much of a problem is this, @marmarek?

legobeat commented 1 year ago

Related/dupes:

8066 #7191

ydirson commented 1 year ago

Note the missing tool indeed looks like a minor point as, I still always have to install kernel-latest from testing manually, but was always able to boot them afterwards:

[root@dom0 ~]# qubes-dom0-update --console --show-output kernel-latest --enablerepo=qubes-dom0-current-testing 
Using sys-firewall as UpdateVM to download updates for Dom0; this may take some time...
Unable to detect release version (use '--releasever' to specify release version)
Fedora 32 - x86_64 - Updates                    9.5 kB/s | 4.4 kB     00:00    
Fedora 32 - x86_64                               40 kB/s | 5.1 kB     00:00    
Qubes Dom0 Repository (updates)                  19 kB/s | 2.7 kB     00:00    
Qubes Dom0 Repository (updates-testing)         2.1 MB/s | 1.5 MB     00:00    
Qubes Dom0 Repository (security-testing)         29 kB/s | 2.9 kB     00:00    
Package kernel-latest-1000:6.1.7-1.fc32.qubes.x86_64 is already installed.
Package kernel-latest-1000:6.1.12-1.qubes.fc32.x86_64 is already installed.
Package kernel-latest-1000:6.1.1-1.fc32.qubes.x86_64 is already installed.
Dependencies resolved.
==========================================================================================
 Package                 Arch    Version                 Repository                   Size
==========================================================================================
Installing:
 kernel-latest           x86_64  1000:6.2.6-1.qubes.fc32 qubes-dom0-current-testing   12 M
Installing dependencies:
 kernel-latest-modules   x86_64  1000:6.2.6-1.qubes.fc32 qubes-dom0-current-testing   71 M
Removing:
 kernel-latest           x86_64  1000:6.1.1-1.fc32.qubes @System                     396 M

Transaction Summary
==========================================================================================
Install  2 Packages
Remove   1 Package

Total download size: 82 M
DNF will only download packages for the transaction.
Downloading Packages:
(1/2): kernel-latest-6.2.6-1.qubes.fc32.x86_64. 4.2 MB/s |  12 MB     00:02    
(2/2): kernel-latest-modules-6.2.6-1.qubes.fc32 8.4 MB/s |  71 MB     00:08    
--------------------------------------------------------------------------------
Total                                           9.5 MB/s |  82 MB     00:08     
Complete!
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Qubes OS Repository for Dom0                                                                                                                                  2.9 MB/s | 3.0 kB     00:00    
Qubes OS Repository for Dom0                                                                                                                                  3.9 MB/s |  61 kB     00:00    
Package kernel-latest-1000:6.1.1-1.fc32.qubes.x86_64 is already installed.
Package kernel-latest-1000:6.1.7-1.fc32.qubes.x86_64 is already installed.
Package kernel-latest-1000:6.1.12-1.qubes.fc32.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@dom0 ~]# rpm -i /var/lib/qubes/updates/rpm/kernel-latest-*6.2.6-1.qubes.fc32.x86_64.rpm 
/usr/lib/kernel/install.d/20-grub.install: line 81: grub2-get-kernel-settings: command not found
cat: /sys/power/resume: No such file or directory
Generating grub configuration file ...
...