Botched system upgrade, can't boot. Seeking help

Was updating from F40 to F41 and screwed things up by switching power from my dock to the laptop power cord (because I also had issues last time I did a system update and I didn’t want issues again lol).

I can’t boot and get the “Oh no! Something has gone wrong” screen.

I can boot into tty via ctrl+alt+f3

I’ve tried several iterations of distro-sync (e.g. like the command here) and have gotten to the point where the command finishes now.

sudo dnf distro-sync --refresh --releasever 41 --allowerasing --setopt protected_packages=

Updating a loading repositories:
Repositories loaded.
Nothing to do.

Perhaps its an issue that no repositories are listed? I’m not sure

I guess dnf got upgraded to dnf5 during the partial update

dnf --version
dnf5 version 5.2.13.1

I’ve also tried

sudo dnf update

Updating a loading repositories:
Repositories loaded.
Nothing to do.

I’ve also tried removing duplicates

sudo dnf reinstall $(dnf rq --duplicates --latest-limit=1 --qf="%{name}\n")

Updating and loading repositories:
Repositories loaded.
Failed to resolve the transaction:
Packages for argument 'libwpe' installed, but not available.

I’ve also tried

dnf list installed

Updating and loading repositories:
Repositories loaded.
No matching packages to list

Maybe my package database is corrupted like in this post where user vgaetera helped?

Not sure what to do from here

You could also run dnf check to see if it finds any problems. And also dnf repolist would be nice.

It is really nice that you include the result of the various commands as text with proper formatting.

1 Like

cool here are the results

dnf check

libwpe-0:1.15.2-1.fc40.x86-64
 duplicate with "libwpe-0:1.15.2-1.fc40.x86-64"
libwpe-0:1.15.2-1.fc40.x86_64
 duplicate with "libewpe-0:1.15.2-1.fc39.x86_64"
Check discovered 2 problem(s) in 2 package(s)
dnf repolist

repo id                                                                                repo name
1password                                                                         1Password Stable Channel
code                                                                                    Visual Studio Code
copr:copr.fedorainfracloud.org:atim:lazygit                Copr repo for lazygit owned by atim
copr:copr.fedorainfracloud.org:phracek:PyCharm     Copr repo for PyCharm owned by phracek
docker-ce-stable                                                                Docker CE Stable - x86_64
fedora                                                                                  Fedora 41 - x86_64
fedora-cisco-openh264                                                     Fedora 41 openh264 (From Cisco) - x86_64
google-chrome                                                                   google-chrome
google-cloud-cli                                                                  Google Cloud CLI
mullvad-stable                                                                    Mullvad VPN
pgAdmin4                                                                            pgadmin4
rpmfusion-nonfree-nvidia-driver                                    RPM Fusion for Fedora 41 - Nonfree - NVIDIA Driver
rpmfusion-nonfree-steam                                               RPM Fusion for Fedora 41 - Nonfree - Steam
slack                                                                                     slack
updates                                                                               Fedora 41 - x86_64 - Updates 

You appear to be using Fedora 41. Try sudo dnf distro-sync then sudo dnf remove --duplicates.

sudo dnf distro-sync upgraded/replaced 5 packages (I must’ve changed some things yesterday as I was trying more troubleshooting). The command completed successfully.

sudo dnf remove --duplicates gives this, since as I mentioned the dnf version is 5.2.13.1

Unknown argument "--duplicates" for command "remove". Add "--help" for more information about the arguments.
The argument is available for commands: check, repoquery. (it has to be placed after the command.)

ok, I was able to run sudo dnf4 remove --duplicates and it ran successfully. It remove the libwpe item listed as a duplicate from my dnf check run results above.

1 Like

After fixing the duplicates I still can’t boot normally. Do I need to trigger the upgrade to finish somehow?

When I boot into tty via ctrl+al+f3, here’s the result of some upgrade commands:

sudo dnf upgrade --refresh

Updating and loading repositories:
   <short list of repos>
Repositories loaded.
Nothing to do.
sudo dnf system-upgrade download --releasever=41
Need a --releasever greater than the current system version.

So in this tty mode, it thinks my current system is 41 which I guess makes sense since its a partially finished upgrade to 41? But in the normal boot process there isn’t a 41 listed in the fedora versions to boot into.

sudo dnf system-upgrade reboot
No offline transaction is stored.

Sorry for the confusion. Dnf5 is still not complete. There is already an upstream issue and Fedora bugzilla report.

1 Like

Ok, tried a few more commands from this thread.

sudo rpm -V -a listed one package as missing (glusterfs) and a couple had some flags.

This command reinstalled the missing package

sudo dnf --skip-broken reinstall \
$(rpm -q -f $(sudo rpm -V -a | awk -e '$1=="missing"{print $NF}'))

This command fixed the corrupted files, which were ‘fedora-workstation-repositories’ and ‘libdnf5’

sudo dnf --skip-broken reinstall \
$(rpm -q -f $(sudo rpm -V -a | awk -e '$1~/^S.5/{print $NF}'))

ugghh still no luck booting normally

I assume you get a Fedora 41 kernel in the text console using <Ctrl-Alt-F3>, so the failure to “boot normally” may be a graphics issue. If you have another system with working web browser you might want to enable ssh access so you use command-line tools and post output (as pre-formatted text) here.

Please provide the output from running inxi -Gzxx in the text console so we can understand your display hardware. You may get some relevant error messages with journalctl --no-hostname -b -p 3 (read man journalctl for explanation of the options). It can take some effort to find journalctl “filters” that select relevant lines from the massive amount of detail journalctl provides. To avoid truncated lines ending in >, you can add | cat at the end od the line so they are wrapped in the terminal.

I’m off to meetings, so may not be able to respond for 6-8 hours. Hopefully others an step in if you need added help.