Fedora 39 Upgrade not starting - permission denied /usr/bin/dnf-3

,

I tried to upgrade from fully up-to-date F38 to F39, both with GUI and CLI. However, at reboot, the system just starts normally and doesn’t enter the update.

I haven’t found anything in any logs or online about this. What could the issue be?

Besides system log (journal), did you take a look at /var/log/dnf.log(s)?

1 Like

I have also encountered the same problem. I am looking into what caused the failure of the upgrade.

Hello @alexander-schoch ,
Welcome to :fedora: !
Did you first try sudo dnf distro-sync to get your packages up to latest before the upgrade? Often an upgrade will fail somewhat silently (without digging through logs) if your existing is not up to date first.

1 Like

By running journalctl | grep dnf, i found this

dnf-system-upgrade.service: Failed to execute /usr/bin/dnf-3: Permission denied

and then, later:

Starting dnf-system-upgrade-cleanup.service - System Upgrade using DNF failed...
dnf-system-upgrade-cleanup.service: Deactivated successfully.

Thank you. This solution solves my problem.

I assume you followed the steps described in the Docs… when performing sudo dnf system-upgrade download --releasever=39 (step 3), was there any warning or error message that would prevent the system from updating?

Yes, I followed the docs with this. There weren’t any errors or warnings with this command.

dnf distro-sync?

Maybe, to clarify:

@augenauf /var/log/dnf.log shows the sudo dnf systsem-upgrade download --releasever=39, but there’s no errors or warnings

@jakfrost The system was up-to-date already, so sudo dnf distro-sync did nothing.

Yes, this will allow system to enter the upgrade screen.

$ sudo grubby --info=ALL | grep -E “^kernel|^index”
index=0
kernel=“/boot/vmlinuz-6.5.10-300.fc39.aarch64”
index=1
kernel=“/boot/vmlinuz-6.5.9-300.fc39.aarch64”
index=2
kernel=“/boot/vmlinuz-0-rescue-f2e1fc6f47d8484ba3804011f0bd423f”

When it gets to the end of the upgrade, does it show no error in the terminal? This sounds conspicuously like not being able to write the boot loader after update has completed.

In which case it will boot the F38 kernel but /etc/fedora-release will shows that its an f39.
However if the upgrade did not run at all /etc/fedora-release will show that its f38 still.

What kernel was booted?

What is in /etc/fedora-release?

/etc/fedora-release shows Fedora release 38 (Thirty Eight)

uname -r gives 6.5.10-200.fc38.x86_64

so it really hasn’t updated at all

Ok. Run the system-upgrade in a terminal so that you can see any errors.

sudo dnf update --refresh
# if anything installed
sudo reboot
sudo dnf system-upgrade download --releasever=39 
# Are there any error?
# If no errors then
sudo dnf system-upgrade download reboot

Does that work?

I tried it again with your commands. Other than system-upgrade download reboot not existing, there weren’t any errors (except some warnings that some packages don’t exist in F39, as they are replaced).

Command is different! Please see above or follow the link to Docs page

Yes, I know. I used the correct one.

output of journalctl | grep dnf

Nov 08 16:29:57 fedora systemd[1]: dnf-makecache.timer: Deactivated successfully.
Nov 08 16:29:57 fedora systemd[1]: Stopped dnf-makecache.timer - dnf makecache --timer.
Nov 08 16:30:22 fedora systemd[1]: Starting dnf-system-upgrade.service - System Upgrade using DNF...
Nov 08 16:30:22 fedora audit[790]: AVC avc:  denied  { execute } for  pid=790 comm="(dnf-3)" name="python3.11" dev="nvme0n1p3" ino=21827174 scontext=system_u:system_r:init_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=0
Nov 08 16:30:22 fedora audit[790]: SYSCALL arch=c000003e syscall=59 success=no exit=-13 a0=555cee7dbe50 a1=555cee84a0f0 a2=555cee664b30 a3=0 items=0 ppid=1 pid=790 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="(dnf-3)" exe="/usr/lib/systemd/systemd" subj=system_u:system_r:init_t:s0 key=(null)
Nov 08 16:30:22 fedora audit: PROCTITLE proctitle="(dnf-3)"
Nov 08 16:30:22 fedora (dnf-3)[790]: dnf-system-upgrade.service: Failed to execute /usr/bin/dnf-3: Permission denied
Nov 08 16:30:22 fedora (dnf-3)[790]: dnf-system-upgrade.service: Failed at step EXEC spawning /usr/bin/dnf-3: Permission denied
Nov 08 16:30:22 fedora systemd[1]: dnf-system-upgrade.service: Main process exited, code=exited, status=203/EXEC
Nov 08 16:30:22 fedora systemd[1]: dnf-system-upgrade.service: Failed with result 'exit-code'.
Nov 08 16:30:22 fedora systemd[1]: Failed to start dnf-system-upgrade.service - System Upgrade using DNF.
Nov 08 16:30:22 fedora systemd[1]: dnf-system-upgrade.service: Triggering OnFailure= dependencies.
Nov 08 16:30:22 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=? addr=? terminal=? res=failed'
Nov 08 16:30:22 fedora systemd[1]: Starting dnf-system-upgrade-cleanup.service - System Upgrade using DNF failed...
Nov 08 16:30:23 fedora systemd[1]: dnf-system-upgrade-cleanup.service: Deactivated successfully.
Nov 08 16:30:23 fedora systemd[1]: Finished dnf-system-upgrade-cleanup.service - System Upgrade using DNF failed.
Nov 08 16:30:23 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-cleanup comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Nov 08 16:30:23 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=dnf-system-upgrade-cleanup comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Nov 08 16:31:29 fedora systemd[1]: Started dnf-makecache.timer - dnf makecache --timer.

My bad! sudo dnf system-upgrade reboot
Sorry for that.