Upgrading from F41 to F42 not working

Hi, I am using a KDE based F41 and I’m trying to upgrade to F42 in vain. I would need some help to fix that.

I issued the following commands without any apparent issue:

sudo dnf upgrade --refresh
sudo dnf system-upgrade download --releasever=42
sudo dnf5 system-upgrade status

An offline transaction was initiated by the following command:
dnf system-upgrade download --releasever 42
Run \`dnf5 offline reboot` to reboot and perform the offline transaction.

So I issued this command:

sudo dnf5 offline reboot

The system reboots but no update is happening. Just before the reboot I see the following message on the screen (not sure if that is relevant)

Additional information:

  1. My current F41 drive in encrypted, so I have to enter 2 times a password when booting.
  2. Trying to update through KDE discovery downloads correctly, but upon restart I get a notification in KDE saying the update failed.
  3. sudo dnf system-upgrade log is empty

If you clean the stored offline transaction with sudo dnf offline clean, and then start the process again, does it change anything?

Thanks for your response.
I also tried the clean command a couple of times and it didn’t make a difference.
The upgrade through KDE Discover seems to download everything needed then when I restart nothing really happens.

Could this be a problem related to the fact that the disk is encrypted? What log files are there which I can check?

If you repeat the process, how many packages are being proposed for upgrade? Please also share the output of dnf repolist.

I expect not, given that the disk should be decrypted by initramfs, before the kernel is started. What is the output of lsblk -f?

You can check the logs in /var/log/dnf5.log and the downloaded packages in /usr/lib/sysimage/libdnf5/offline/packages.

1 Like

It seems to me that the installation of the downloaded packages is not done after reboot.
I did a: sudo dnf offline clean again before executing the other commands as above.

how many packages are being proposed for upgrade?

[2601/2601] Total 100% | 10.5 MiB/s | 2.9 GiB | 04m38s

dnf repolist

repo id                                                                    repo name                                                                                    
fedora                                                                     Fedora 41 - x86_64                                                                           
fedora-cisco-openh264                                                      Fedora 41 openh264 (From Cisco) - x86_64                                                     
rpmfusion-free                                                             RPM Fusion for Fedora 41 - Free                                                              
rpmfusion-free-updates                                                     RPM Fusion for Fedora 41 - Free - Updates                                                    
rpmfusion-nonfree                                                          RPM Fusion for Fedora 41 - Nonfree                                                           
rpmfusion-nonfree-nvidia-driver                                            RPM Fusion for Fedora 41 - Nonfree - NVIDIA Driver                                           
rpmfusion-nonfree-steam                                                    RPM Fusion for Fedora 41 - Nonfree - Steam                                                   
rpmfusion-nonfree-updates                                                  RPM Fusion for Fedora 41 - Nonfree - Updates                                                 
updates                                                                    Fedora 41 - x86_64 - Updates                                                                 
david@fedora:~$
lsblk -f
nvme0n1                                                                                                                    
├─nvme0n1p1                                   vfat        FAT32        FE6E-94DF                             571.4M     5% /boot/efi
├─nvme0n1p2                                   ext4        1.0          f5370d55-4908-45da-9749-91e682052126  528.6M    39% /boot
└─nvme0n1p3                                   crypto_LUKS 2            6d99e3c5-64a8-433d-b753-4479accc468b                
  └─luks-6d99e3c5-64a8-433d-b753-4479accc468b btrfs             fedora abcaa5fe-4023-4843-9747-7df4ebc784ff  719.1G    24% /home
                                                                                                                           /

Number of files in /usr/lib/sysimage/libdnf5/offline/packages: 2601

tail -n 20 /var/log/dnf5.log
2025-04-16T13:57:29+0000 [115529] DEBUG Creating repo "rpmfusion-nonfree" from config file "/etc/yum.repos.d/rpmfusion-nonfree.repo" section "rpmfusion-nonfree"
2025-04-16T13:57:29+0000 [115529] DEBUG Creating repo "rpmfusion-nonfree-debuginfo" from config file "/etc/yum.repos.d/rpmfusion-nonfree.repo" section "rpmfusion-nonfre
e-debuginfo"
2025-04-16T13:57:29+0000 [115529] DEBUG Creating repo "rpmfusion-nonfree-source" from config file "/etc/yum.repos.d/rpmfusion-nonfree.repo" section "rpmfusion-nonfree-s
ource"
2025-04-16T13:57:30+0000 [115529] INFO Rebooting to perform offline transaction.
2025-04-16T13:57:30+0000 [115529] INFO DNF5 finished
2025-04-16T13:58:36+0000 [1574] INFO --- DNF5 launched with arguments: "/usr/bin/dnf5 offline _execute" ---
2025-04-16T13:58:36+0000 [1574] DEBUG Loading plugin file="/usr/lib64/dnf5/plugins/builddep_cmd_plugin.so"
2025-04-16T13:58:36+0000 [1574] INFO Loaded dnf5 plugin "builddep" ("/usr/lib64/dnf5/plugins/builddep_cmd_plugin.so") version "1.0.0"
2025-04-16T13:58:36+0000 [1574] DEBUG Loading plugin file="/usr/lib64/dnf5/plugins/changelog_cmd_plugin.so"
2025-04-16T13:58:36+0000 [1574] INFO Loaded dnf5 plugin "changelog" ("/usr/lib64/dnf5/plugins/changelog_cmd_plugin.so") version "1.0.0"
2025-04-16T13:58:36+0000 [1574] DEBUG Loading plugin file="/usr/lib64/dnf5/plugins/config-manager_cmd_plugin.so"
2025-04-16T13:58:36+0000 [1574] INFO Loaded dnf5 plugin "config-manager" ("/usr/lib64/dnf5/plugins/config-manager_cmd_plugin.so") version "0.1.0"
2025-04-16T13:58:36+0000 [1574] DEBUG Loading plugin file="/usr/lib64/dnf5/plugins/copr_cmd_plugin.so"
2025-04-16T13:58:36+0000 [1574] INFO Loaded dnf5 plugin "copr" ("/usr/lib64/dnf5/plugins/copr_cmd_plugin.so") version "0.1.0"
2025-04-16T13:58:36+0000 [1574] DEBUG Loading plugin file="/usr/lib64/dnf5/plugins/needs_restarting_cmd_plugin.so"
2025-04-16T13:58:36+0000 [1574] INFO Loaded dnf5 plugin "needs_restarting" ("/usr/lib64/dnf5/plugins/needs_restarting_cmd_plugin.so") version "1.0.0"
2025-04-16T13:58:36+0000 [1574] DEBUG Loading plugin file="/usr/lib64/dnf5/plugins/repoclosure_cmd_plugin.so"
2025-04-16T13:58:36+0000 [1574] INFO Loaded dnf5 plugin "repoclosure" ("/usr/lib64/dnf5/plugins/repoclosure_cmd_plugin.so") version "1.0.0"
2025-04-16T13:58:36+0000 [1574] DEBUG Loading plugin file="/usr/lib64/dnf5/plugins/reposync_cmd_plugin.so"
2025-04-16T13:58:36+0000 [1574] INFO Loaded dnf5 plugin "reposync" ("/usr/lib64/dnf5/plugins/reposync_cmd_plugin.so") version "1.0.0"

Actually log files are rotated, you might want to check the other files as well (dnf5.log.<n>).

Thanks @tqcharm,
Actually the latest updated file seem to be /var/log/dnf5.log indeed

ls -lt /var/log/dnf5*
-rw-r--r--. 1 root root  650253 Apr 16 17:58 /var/log/dnf5.log
-rw-r--r--. 1 root root 1048501 Apr 16 17:45 /var/log/dnf5.log.1
-rw-r--r--. 1 root root 1048497 Apr 16 17:44 /var/log/dnf5.log.2
-rw-r--r--. 1 root root 1048524 Apr 16 17:42 /var/log/dnf5.log.3
-rw-r--r--. 1 root root 1048479 Apr 16 17:40 /var/log/dnf5.log.4

I have also used a couple of grep commands to try to find something to no avail:


grep -Rine "fail" /var/log/dnf5*
grep -Rine "error" /var/log/dnf5*

I’ve run a system upgrade on Fedora KDE 41 VM without disk encryption, and it obviously went through (though it seemed unresponsive for about 10 minutes, without progress outputs).

What happens when you run the sudo dnf offline reboot command? It just boots up into the previous F41 system?

Also, journalctl around the time of the offline reboot might give some hints.

1 Like

Thank you @tqcharm for taking time to respond and offering guidance.

The system rebooted, then I saw grub menu, then the disk encryption password was requested, I entered it, the system rebooted again… and I was back on the SDDM login screen. Nothing got installed apparently.

This is what I saw while trying to go through the journalctl. Could you please recommend where to look and/or what to do next please?

That’s a bit strange. I wonder if it is an issue that dnf4 (/usr/bin/dnf-3) seems to be requested to perform the offline upgrade, and hence the No module named 'dnf' error:

$ ll /usr/bin/dnf*
lrwxrwxrwx. 1 root root       4 Apr  2 03:00 /usr/bin/dnf -> dnf5
-rwxr-xr-x. 1 root root    1986 Mar  7 02:00 /usr/bin/dnf-3
lrwxrwxrwx. 1 root root       5 Mar  7 02:00 /usr/bin/dnf4 -> dnf-3
-rwxr-xr-x. 1 root root 1496976 Apr  2 03:00 /usr/bin/dnf5

Was this a system upgraded to F41 from an older version, or was it an F41 fresh install?

PS: It is better to post the outputs as preformatted text, using the </> button, given that screnshots are not searchable.

No, it was not an upgrade, it was a fresh install of F41.

ls -l /usr/bin/dnf*
lrwxrwxrwx. 1 root root       4 Apr  2 04:00 /usr/bin/dnf -> dnf5
-rwxr-xr-x. 1 root root    1986 Mar  7 04:00 /usr/bin/dnf-3
lrwxrwxrwx. 1 root root       5 Mar  7 04:00 /usr/bin/dnf4 -> dnf-3
-rwxr-xr-x. 1 root root 1496976 Apr  2 04:00 /usr/bin/dnf5

PS: Sorry, noted for screenshot.

sudo rpm -q -a \*dnf\* | grep -v -e dnf5

libdnf-0.74.0-1.fc41.x86_64
python3-libdnf-0.74.0-1.fc41.x86_64
dnf-data-4.23.0-1.fc41.noarch
python3-dnf-4.23.0-1.fc41.noarch
python3-dnf-plugins-core-4.10.1-1.fc41.noarch
dnf-plugins-core-4.10.1-1.fc41.noarch

I decided not to remove the packages above as they had all sorts of dependencies and I wasn’t sure about what to remove and what to keep.
However, I redefined all files /usr/bin/dnf* to point to /usr/bin/dnf5 and tried the upgrade again but without clean and this time upon reboot I saw briefly a screen where updates were getting installed, but then the system rebooted and eventually no upgrade happened.

Here’s what I found in the journalctl:

Apr 17 07:59:58 fedora pk-offline-update[1604]: assigned role
Apr 17 07:59:58 fedora dnf-3[1601]: Unknown argument "upgrade" for command "system-upgrade". Add "--help" for more information about the arguments.
Apr 17 07:59:58 fedora systemd[1]: dnf-system-upgrade.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 17 07:59:58 fedora systemd[1]: dnf-system-upgrade.service: Failed with result 'exit-code'.
Apr 17 07:59:58 fedora systemd[1]: Failed to start dnf-system-upgrade.service - System Upgrade using DNF.
Apr 17 07:59:58 fedora systemd[1]: dnf-system-upgrade.service: Triggering OnFailure= dependencies.
Apr 17 07:59:58 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dnf-system-upgrade comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? a>
Apr 17 07:59:58 fedora dnf5[1602]: Trigger file does not exist. Exiting.
Apr 17 07:59:58 fedora systemd[1]: Starting NetworkManager.service - Network Manager...
Apr 17 07:59:58 fedora systemd[1]: Starting dnf-system-upgrade-cleanup.service - System Upgrade using DNF failed...
Apr 17 07:59:58 fedora systemd[1]: Starting packagekit.service - PackageKit Daemon...
Apr 17 07:59:58 fedora systemd[1]: dnf5-offline-transaction.service: Deactivated successfully.
Apr 17 07:59:58 fedora systemd[1]: Finished dnf5-offline-transaction.service - Offline upgrades/transactions using DNF 5.
Apr 17 07:59:58 fedora audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dnf5-offline-transaction comm="systemd" exe="/usr/lib/systemd/systemd" hostna>
Apr 17 07:59:58 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dnf5-offline-transaction comm="systemd" exe="/usr/lib/systemd/systemd" hostnam>
Apr 17 07:59:58 fedora PackageKit[1634]: daemon start
Apr 17 07:59:58 fedora systemd[1]: Created slice user.slice - User and Session Slice.

I’m going to try one last time to do the whole clean thing and see what happens and update this message afterwards.

UPDATE: it didn’t work.

I know this is a lot of work, but I wonder if this issue would replicate on your hardware if you do an F41 fresh install and then upgrade, then system-upgrade to F42. If it’d still replicate, then it would be certainly an issue worth reporting.

1 Like

I wanted to thank you for your help.
As I believe I have reached a dead-end on that very issue, I’m considering doing a fresh install of F42.

I already had issues with KDE Discover after my F41 fresh install. Basically every time I attempted to update through that software everything seemed to work fine then after a reboot, I would get a message that the updates failed. I didn’t bother investigating as updates were working just fine using DNF.

Probably an existing issue then, which became a blocker with the F42 upgrade.

Hope you’ll enjoy F42 after the fresh install.

PS: If you’re with KDE, you could also give Kinoite a try. Being an atomic desktop, it’s less configurable, but system-upgrades rarely come with issues.

Thanks @tqcharm ,
I made a fresh F42 install and restored my settings and backed-up files with no major issues encountered.

I am updating this because I think I know what might have caused the issue.
At some point on my F41 I downgraded python and I manually changed the simlinks /usr/bin/python and /usr/bin/python3 to point to the downgraded version of python instead of the original one which came with F41.

1 Like