tl;dr a failed dnf update has left me unable to boot. I can chroot in from a Live session butdnf undo/rollback
fails due to a known bug. Tempted to run dnf distro-sync
but don’t want to make things worse. How can I get my system back?
I ran a dnf update
and came back to find it had failed and then shortly after the machine must have frozen. I could not see enough details of the failure as they had scrolled up the terminal already. I rebooted and now on every boot I see a number of failures and cannot get to login. The first of the errors reads:
...
[FAILED] Failed to listen on Load/Save RF Kill Switch Status /dev/rfkill Watch
...
…but there are tons more FAILED after that, the system looks to be in a lot of trouble.
I have tried single user mode and emergency shell but I cannot get into them due to the lack of a root password, which seems to have been discussed here also: https://discussion.fedoraproject.org/t/howto-cannot-open-access-to-console-the-root-account-is-locked-in-emergency-mode-dracut-emergency-shell/2010/22
However with a Fedora Live session and chroot (as suggested by vgaetera in https://discussion.fedoraproject.org/t/fedora-33-upgrade-broken-system-after-35-hours/9989/2) I am though able to get into the broken system.
dnf history
shows me the failure:
[root@localhost-live /]# dnf history
ID | Command line | Date and time | Action(s) | Altered
----------------------------------------------------------------------------------------------------------------------
63 | upgrade -y | 2021-11-11 20:45 | ?, E, I, U | 72 ##
…and the top of the dnf history info
on that reads:
[root@localhost-live /]# sudo dnf history info 63
Transaction ID : 63
Begin time : Thu 11 Nov 2021 08:45:51 PM GMT
Begin rpmdb : 2600:c85641ebe1986a1db54b98fac09b77151d13f366
End time : Thu 01 Jan 1970 01:00:00 AM BST (-1636663551 seconds)
End rpmdb : **
User : <USER>
Return-Code : Failure: 1
Releasever :
Command Line : upgrade -y
...
I attempted to dnf history undo
this bad transaction but hit this bug: https://bugzilla.redhat.com/show_bug.cgi?id=2010259 that means dnf cannot undo it as one of the packages simply reports “REASON CHANGE” which dnf chokes on.
I then followed a bit of DNF System Upgrade :: Fedora Docs and found dnf repoquery --duplicates
gives me a ton of duplicated packages.
What is the best way out of this? I am tempted to run dnf distro-sync
but don’t want to break my system any more than it is already.