Upgrade failed, mismatched packages | F40 |

I did a dnf system upgrade (as described in the official guides, and now have a system that seems to be kind of stuck between two releases (F39 and F40).

It seemed to go well - everything downloaded and everything seemed to install right upon rebooting. Once it was done, it rebooted again and the system seemed to boot right up intil gdm crashed.

Going to another tty, I was able to login and reboot. I then noticed that all the boot entries in grub were still labeled f39.

A f40 kernel has been installed though:

[esbeeen@fedora ~] $ dnf list --installed kernel
Installed Packages
kernel.x86_64                                     6.9.5-100.fc39                                      @@System
kernel.x86_64                                     6.9.6-100.fc39                                      @updates
kernel.x86_64                                     6.9.10-100.fc39                                     @updates
kernel.x86_64                                     6.9.10-200.fc40                                     @updates
[esbeeen@fedora ~] $ 

I figured i could reinstall it tp trigger a grub update, but it was unable to locate the package.
It seems all my sources are still f39:

[esbeeen@fedora ~] $ dnf repolist
repo id                                                  repo name
code                                                     Visual Studio Code
copr:copr.fedorainfracloud.org:phracek:PyCharm           Copr repo for PyCharm owned by phracek
copr:copr.fedorainfracloud.org:sunwire:input-remapper    Copr repo for input-remapper owned by sunwire
fedora                                                   Fedora 39 - x86_64
fedora-cisco-openh264                                    Fedora 39 openh264 (From Cisco) - x86_64
gitlab.com_paulcarroty_vscodium_repo                     gitlab.com_paulcarroty_vscodium_repo
mono-centos8-stable                                      mono-centos8-stable
owncloud                                                 owncloud
rpmfusion-free                                           RPM Fusion for Fedora 39 - Free
rpmfusion-free-updates                                   RPM Fusion for Fedora 39 - Free - Updates
rpmfusion-nonfree-nvidia-driver                          RPM Fusion for Fedora 39 - Nonfree - NVIDIA Driver
updates                                                  Fedora 39 - x86_64 - Updates
zerotier                                                 ZeroTier, Inc. RPM Release Repository

The system does think it’s f40 though:

[esbeeen@fedora ~] $ cat /etc/os-release 
NAME="Fedora Linux"
VERSION="40 (Workstation Edition)"
ID=fedora
VERSION_ID=40
VERSION_CODENAME=""
PLATFORM_ID="platform:f40"
PRETTY_NAME="Fedora Linux 40 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:40"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f40/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=40
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=40
SUPPORT_END=2025-05-13
VARIANT="Workstation Edition"
VARIANT_ID=workstation
[esbeeen@fedora ~] $ 

Any ideas how to salvage this?

I can’t even do a dnf update:

[esbeeen@fedora ~] $ sudo dnf upgrade 
Last metadata expiration check: 0:00:01 ago on Fri 02 Aug 2024 04:54:37 PM CEST.
Error: 
 Problem: package kernel-modules-extra-6.9.6-100.fc39.x86_64 from @System requires kernel-uname-r = 6.9.6-100.fc39.x86_64, but none of the providers can be installed
  - conflicting requests
(try to add '--skip-broken' to skip uninstallable packages)

Attempting to redownload f40 fails with the same error as above, as well as a bunch og No match for group package X.
Triggering the upgrade reboot also fails - it simply reboots.

I’m outta ideas here - any suggestions much appreciated!

“Upgrade failed” is not an adequate description of your issue. You should check journalctl and dnf logs for details, and start a new topic that mentions the errors you find, or at least “Fedora 40 upgrade incomplete using dnf system plugin”. The logs contain massive amounts of detail, so you will need to focus attention on the time around the update attempt and then scan for error messages. Providing carefully selected error messages in text form so they can be found with web searches promote input from people with similar experiences who may already know a solution or be able to contribute useful details that lead to a solution.

If you can boot the F40 kernel to a text console you can capture output from inxi -Fzxx, then post that (as text), it may also help us understand the problem.

It looks like your update got interrupted. This can have several reasons. One of the could be missing space. When it is in the partition boot, it can not update the kernels and you have an incomplete upgrade.

The command df -h would give you some more information.

p.s.
Yes please give more info’s as @gnwiii asked for :bluethumb:

Thank you for your input!
The logs for dnf don’t seem to reveal much (too me at least), but it does contain the following error at the end of the system upgrade:

2024-07-26T21:50:30+0200 SUBDEBUG
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/dnf/cli/main.py", line 130, in cli_run
    ret = resolving(cli, base)
          ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dnf/cli/main.py", line 173, in resolving
    base.resolve(cli.demands.allow_erasing)
  File "/usr/lib/python3.12/site-packages/dnf/base.py", line 934, in resolve
    raise exc
dnf.exceptions.DepsolveError:
 Problem: The operation would result in removing the following protected packages: NetworkManager, dnf, grub2-tools-minimal, setup, sudo, systemd, systemd-udev
2024-07-26T21:50:30+0200 CRITICAL Error:
 Problem: The operation would result in removing the following protected packages: NetworkManager, dnf, grub2-tools-minimal, setup, sudo, systemd, systemd-udev
2024-07-26T21:50:30+0200 INFO (try to add '--skip-broken' to skip uninstallable packages)
2024-07-26T21:50:30+0200 DDEBUG Cleaning up.
2024-07-26T21:50:30+0200 DDEBUG Plugins were unloaded.

If you can boot the F40 kernel to a text console you can capture output from inxi -Fzxx, then post that (as text), it may also help us understand the problem.

Unfortunately, i am unable to boot to F40, as that entry is not present in grub

I did run out of space prior to starting the upgrade.
I freed about 85 gb before starting the download.

[esbeeen@fedora ~] $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/dm-0       476G  398G   74G  85% /
devtmpfs        4.0M     0  4.0M   0% /dev
tmpfs           7.5G     0  7.5G   0% /dev/shm
efivarfs        118K   42K   72K  37% /sys/firmware/efi/efivars
tmpfs           3.0G  2.1M  3.0G   1% /run
/dev/dm-0       476G  398G   74G  85% /home
tmpfs           7.5G   12K  7.5G   1% /tmp
/dev/nvme0n1p2  974M  343M  565M  38% /boot
/dev/nvme0n1p1  599M   20M  580M   4% /boot/efi
tmpfs           1.5G   88K  1.5G   1% /run/user/42
tmpfs           1.5G   84K  1.5G   1% /run/user/1000

565M on /boot should be enough, right?

Well, i just stumbled on a 3y old post by none other than myself with more or less the same issue while upgrading to F34.
The comments in there helped me greatly.

For future reference, what i did was:

sudo dnf group install minimal-environment --allowerasing --skip-broken --releasever=40
sudo dnf group update minimal-environment --allowerasing --skip-broken --releasever=40

This revealed a conflict caused by having glibc.i686 installed in order to use an ancient Brother label printer.

Removing it and proceeding worked:

sudo dnf remove glibc-2.39-17.fc40.i686
sudo dnf remove glibc.i686
sudo dnf group update minimal-environment --allowerasing --skip-broken --releasever=40
sudo dnf distrosync --releasever=40 --allowerasing 
sudo dnf remove kernel-modules-extra-6.9.6-100.fc39.x86_64
sudo dnf distrosync --releasever=40 --allowerasing --skip-broken
sudo dnf group update minimal-environment --allowerasing --skip-broken --releasever=40
sudo dnf remove --duplicates --releasever=40 --allowerasing
sudo dnf distrosync --releasever=40 --allowerasing 
sudo dnf reinstall kernel*

I had to do the cycle of commands twice, but after this I was able to boot to Gnome on F40.

Then I did the Post upgrade steps:

sudo rpmconf -a
sudo dnf install remove-retired-packages
remove-retired-packages

… And I now seem to have successfully upgraded to F40.

3 Likes

This worked for me. Thank you.

1 Like