In fact, I did have the problem during dnf system upgrade because the new F36 kernel was not activated.
I am running the dnf install kernel from existing
Same here. I downloaded the rpm and tried to extract the files with cpio to my home directory. The /boot directory is not extracted. However, other computers install this kernel with no issues.
EDIT: But even if the kernel is installed in these other computers, rpm2cpio does not extract the files.
Ahhhh.
I see you are running 35 from this Kernel: 5.17.6-200.fc35.x86_64 arch
but are trying to install a kernel from 36
$ sudo dnf install kernel
Last metadata expiration check: 2:23:00 ago on Wed 18 May 2022 08:48:37 AM CEST.
Dependencies resolved.
===============================================================================================
Package Architecture Version Repository Size
===============================================================================================
Installing:
kernel x86_64 5.17.7-300.fc36 updates 164 k
kernel-core x86_64 5.17.7-300.fc36 updates 46 M
I wonder if you had an incomplete upgrade?
I would not use dnf install kernel but instead would use dnf upgrade kernel* so it handled all the parts of the kernel while updating the kernel to the latest.
$ sudo dnf upgrade kernel*
Last metadata expiration check: 0:09:19 ago on Wed 18 May 2022 03:29:13 PM CEST.
Package kernel not installed, cannot update it.
No match for argument: kernel-5.17.7-300.fc36.x86_64.rpm
Package kernel-modules not installed, cannot update it.
No match for argument: kernel-modules-5.17.7-300.fc36.x86_64.rpm
Dependencies resolved.
===============================================================================================================================================================================================
Package Architecture Version Repository Size
===============================================================================================================================================================================================
Installing:
kernel-core x86_64 5.17.7-300.fc36 @commandline 46 M
Transaction Summary
===============================================================================================================================================================================================
Install 1 Package
Total size: 46 M
Installed size: 89 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : kernel-core-5.17.7-300.fc36.x86_64 1/1
Running scriptlet: kernel-core-5.17.7-300.fc36.x86_64 1/1
dkms: running auto installation service for kernel 5.17.7-300.fc36.x86_64
Done.
kdump: kernel 5.17.7-300.fc36.x86_64 doesn't exist
Verifying : kernel-core-5.17.7-300.fc36.x86_64 1/1
Installed:
kernel-core-5.17.7-300.fc36.x86_64
Complete!
That tells me it is possible that the upgrade did not complete successfully. The fact that you booted to an F35 kernel is ?.
It is also possible that the mirrors are not fully in sync with the latest kernel upgrade. If the mirrors are out of sync then wait a while for them to update and try again.
What is the output of ls -l /boot?
You should see at least one F36 kernel as initramfs*fc36* and a matching vmlinuz*fc36*.
If not and you only have the ability to boot to the f35 kernel from grub that is its own issue. To verify things are coherent try dnf distro-sync and see if that does anything to make sure things are properly matching before you do anything more.
I dnf remove kernel*5.17.7* and update again. No success.
I downloaded the kernel-core-5.17.7-300.fc36.x86_64.rpm and rpm -ivh kernel-core-5.17.7-300.fc36.x86_64.rpm with the same âfailureâ : no expected files in /boot
Attempting to install a kernel by downloading one specific rpm is fruitless and a waste of time. This is especially true when using rpm since that does not search for and install the dependencies needed. Dnf makes sure all the dependencies are available and installed.
It appears that definitely the upgrade did not complete successfully since it did not install the fc36 kernel.
Please try dnf list installed kernel and post that output here.
Also post the output of dnf remove kernel*5.17*fc36* and cat /etc/fedora-release
BTW, how did you do the upgrade from 35 to 36? Was it by using the gnome software app or by using dnf system-upgrade?
I am now in the 35.5 state !?
Do you suggest I remove the fc36 kernel and perform the dnf system-upgrade again ?
Why would this succeed this time ?
Regards
If you have old kernels taking up space on the drive, then you can delete them with the following script (from DNF System Upgrade):
#!/usr/bin/env bash
old_kernels=($(dnf repoquery --installonly --latest-limit=-1 -q))
if [ "${#old_kernels[@]}" -eq 0 ]; then
echo "No old kernels found"
exit 0
fi
if ! dnf remove "${old_kernels[@]}"; then
echo "Failed to remove old kernels"
exit 1
fi
echo "Removed old kernels"
exit 0
The DNF System Upgrade also has other tips for cleaning the old F35 installation after an upgrade.
Also note that the script dnf used to remove old kernels had a bug and it used to leave artifacts in /lib/modules. You can remove the old artifacts manually from /lib/modules once the kernels have been removed using dnf. Also see Issue 2016630, Removing old kernel-core leaves modules.builtin.alias.bin under /lib/modules.
For completeness, here is my /boot after a DNF System Upgrade to F36. I had 4 of them complete without trouble (and I always follow the official docs). After the reboot into the new kernel I remove all of the old kernels.
$ sudo ls -Al /boot
total 135180
-rw-r--r-- 1 root root 244012 May 12 11:30 config-5.17.7-300.fc36.x86_64
drwx------ 4 root root 16384 Dec 31 1969 efi
-rw-r--r-- 1 root root 151452 Jan 27 06:54 elf-memtest86+-5.31
drwxr-xr-x. 2 root root 4096 May 10 22:59 extlinux
drwx------. 4 root root 4096 May 9 12:37 grub2
-rw-------. 1 root root 71061064 Apr 19 2019 initramfs-0-rescue-7caccc78a36f4e6cacc7961848f0650c.img
-rw------- 1 root root 37922612 May 17 16:24 initramfs-5.17.7-300.fc36.x86_64.img
drwxr-xr-x. 3 root root 4096 Oct 24 2018 loader
drwx------. 2 root root 16384 Apr 19 2019 lost+found
-rw-r--r-- 1 root root 149856 Jan 27 06:54 memtest86+-5.31
lrwxrwxrwx 1 root root 46 May 17 16:22 symvers-5.17.7-300.fc36.x86_64.gz -> /lib/modules/5.17.7-300.fc36.x86_64/symvers.gz
-rw------- 1 root root 6235492 May 12 11:30 System.map-5.17.7-300.fc36.x86_64
-rwxr-xr-x. 1 root root 10795112 Jun 5 2020 vmlinuz-0-rescue-7caccc78a36f4e6cacc7961848f0650c
-rwxr-xr-x 1 root root 11800752 May 12 11:30 vmlinuz-5.17.7-300.fc36.x86_64
-rw-r--r-- 1 root root 167 May 12 11:26 .vmlinuz-5.17.7-300.fc36.x86_64.hmac
The kernel package is a meta package that pulls in all the dependencies and other parts of the kernel.
since you do not have the âkernelâ package installed the system does not know what to do, and that is probably the cause of failure to create the initramfs and vmlinuz entries in /boot.
I think the fix is to follow these steps.
dnf remove kernel*fc36* --noautoremove which will remove all the kernel packages from the fc36 install and will not try to remove all the extra packages. On my system there are about 20 or so packages that would be removed which is not really an issue. If you note which dependencies are removed they are easy to reinstall.
dnf install kernel-5.17.7-300-fc36 which should install all the needed kernel packages for fc36.
When #2 completes then ls -l /boot should now show the initramfs and vmlinuz entries for the 5.17.7 kernel
For me, doing dnf remove kernel*fc36* --noautoremove produces a huge list of packages that would be removed (104 altogether, totalling 2.1G in size). I tried instead dnf remove kernel*5.17.7-300.fc36.x86_64 followed by dnf install kernel-5.17.7-300.fc36.x86_64 but that did not put the newly-installed kernel in /boot.