Cannot update Fedora due to kernel error

Hi, I’m having some problem updating Fedora with ‘sudo dnf update’. After launching the command, the terminal outputs this:

created by dnf config-manager from file:///home 0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'home_alessandrovulcu_onedrive_repo':
  - Curl error (37): Couldn't read a file:// file for file:///home/alessandrovulcu/onedrive/repo/repodata/repomd.xml [Couldn't open file /home/alessandrovulcu/onedrive/repo/repodata/repomd.xml]
Error: Failed to download metadata for repo 'home_alessandrovulcu_onedrive_repo': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Repository ignorati: home_alessandrovulcu_onedrive_repo
Ultima verifica della scadenza dei metadati: 1:14:25 fa il sab 27 ago 2022, 21:08:41.
Errore: 
 Problema 1: package kernel-modules-extra-5.18.9-200.fc36.x86_64 requires kernel-uname-r = 5.18.9-200.fc36.x86_64, but none of the providers can be installed
  - conflicting requests
 Problema 2: package kernel-5.18.9-200.fc36.x86_64 requires kernel-core-uname-r = 5.18.9-200.fc36.x86_64, but none of the providers can be installed
  - conflicting requests
(try to add '--skip-broken' to skip uninstallable packages)

(some lines are in italian but i guess that the errors and stuff are understandable)
Can someone hel me get through this?

There are two things going on. Your onedrive repo appears to be unreasonable. The other might go away with dnf update --refresh, since it could just be a mirror that hasn’t fully sync’d yet.

Unfortunately it didn’t work. I also tried to disable the Onedrive repo but the problem with the kernel update remains…

Which kernel version are you running?
uname -a
In addition, could you paste the result of this command?
rpm -qa kernel* | sort

(The kernel-5.18.9-200.fc36.x86_64 packages were in the repository a month ago).

ALso important

dnf repolist

So uname -a and rpm -qa kernel* | sort results are:

[alessandrovulcu@fedora ~]$  uname -a
Linux fedora 5.18.11-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 12 22:52:35 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
[alessandrovulcu@fedora ~]$  rpm -qa kernel* | sort
kernel-5.18.11-200.fc36.x86_64
kernel-5.18.7-200.fc36.x86_64
kernel-5.18.9-200.fc36.x86_64
kernel-core-5.18.11-200.fc36.x86_64
kernel-core-5.18.13-200.fc36.x86_64
kernel-core-5.18.7-200.fc36.x86_64
kernel-core-5.18.9-200.fc36.x86_64
kernel-devel-5.18.11-200.fc36.x86_64
kernel-devel-5.18.7-200.fc36.x86_64
kernel-devel-5.18.9-200.fc36.x86_64
kernel-headers-5.18.13-200.fc36.x86_64
kernel-modules-5.18.11-200.fc36.x86_64
kernel-modules-5.18.13-200.fc36.x86_64
kernel-modules-5.18.7-200.fc36.x86_64
kernel-modules-5.18.9-200.fc36.x86_64
kernel-modules-extra-5.18.11-200.fc36.x86_64
kernel-modules-extra-5.18.7-200.fc36.x86_64
kernel-modules-extra-5.18.9-200.fc36.x86_64
kernel-srpm-macros-1.0-14.fc36.noarch

Then dnf repolist result is:

[alessandrovulcu@fedora ~]$ dnf repolist
id repo                                        nome repo
copr:copr.fedorainfracloud.org:elxreno:preload Copr repo for preload owned by elxreno
copr:copr.fedorainfracloud.org:jstaf:onedriver Copr repo for onedriver owned by jstaf
copr:copr.fedorainfracloud.org:vbatts:bazel    Copr repo for bazel owned by vbatts
docker-ce-stable                               Docker CE Stable - x86_64
fedora                                         Fedora 36 - x86_64
fedora-cisco-openh264                          Fedora 36 openh264 (From Cisco) - x86_64
fedora-modular                                 Fedora Modular 36 - x86_64
google-chrome                                  google-chrome
home_MasterSoft24                              MasterSoft24's Projects (Fedora_26)
phracek-PyCharm                                Copr repo for PyCharm owned by phracek
rpmfusion-nonfree-nvidia-driver                RPM Fusion for Fedora 36 - Nonfree - NVIDIA Driver
rpmfusion-nonfree-steam                        RPM Fusion for Fedora 36 - Nonfree - Steam
updates                                        Fedora 36 - x86_64 - Updates
updates-modular                                Fedora Modular 36 - x86_64 - Updates

I’m not an expert, but it seems that there are multiple kernel versions installed, but i know this is normal for Fedora(?).
I can’t figure it out if it is something wrong here.

Yes. Fedora Linux keeps the last 3 kernels (the latest installed + two previous ones).

What sounds strange to me is that you are running on kernel-5.18.11-200 and there is kernel-core-5.18.13-200 package installed but no kernel-5.18.13-200 package.
Some previous update process gone wrong?
However, since you are on a more recent kernel, you could uninstall kernel-modules-extra-5.18.9-200 and retry the update.

1 Like

If dnf does not allow that, or if it tries to remove too musth. you can try to remove

dnf remove kernel-core-5.18.7-200.fc36.x86_64

Or you can edit /etc/dnf/dnf.conf changing installonly_limit=3 to installonly_limit=5.

That allows you to install two more kernels before you get the problem again.

I wonder if you have some strange package installed from one of the non-fedora repositories which would prevent you from removing kernel version 5.18.9-200.

All right removing kernel-modules-extra-5.18.9-200 solved the problem. Now updating is working. Thanks for the help all :heart:

4 Likes

Also, since it seems kernel 5.18.13 was not properly installed you may want to remove that kernel. sudo dnf remove kernel*5.18.13*
That kernel version is now obsolete anyway.

1 Like