Upgrade problem

I’ve updated several machines to F37 without problem but I have one machine that I get the following error.

# dnf system-upgrade download --releasever=37
.....
Error: 
 Problem: The operation would result in removing the following protected packages: grub2-efi-ia32, grub2-efi-x64, grub2-pc, shim-ia32, shim-x64, sudo

Does anyone know how to correct this problem so I can upgrade? (obviously removing sudo would be bad :sunglasses:

Michael

It looks like you have both 32-bit and 64-bit versions of grub installed on the same box?

I got yesterday an error about grub2. sudo dnf upgrade --refresh renewed the cache an made an update/fix of grub2. You might just check this too first.

or

  • If some of your packages have unsatisfied dependencies, the upgrade will refuse to continue until you run it again with an extra --allowerasing option. This often happens with packages installed from third-party repositories for which an updated repository hasn’t been yet published. Study the output very carefully and examine which packages are going to be removed. None of them should be essential for system functionality, but some of them might be important for your productivity.

  • In case of unsatisfied dependencies, you can sometimes see more details if you add --best option to the command line.

  • If you want to remove/install some packages manually before running dnf system-upgrade download again, it is advisable to perform those operations with --setopt=keepcache=1 dnf command line option. Otherwise the whole package cache will be removed after your operation, and you will need to download all the packages once again.

sudo dnf repolist remove what is coper etc. and install after update again.

These are the same grub packages as were on the system that did upgrade OK (except for being the.F37 version), so I don’t think thats it…

 # rpm -qa |grep grub
grubby-8.40-67.fc36.x86_64
grub2-common-2.06-61.fc36.noarch
grub2-tools-minimal-2.06-61.fc36.x86_64
grub2-tools-2.06-61.fc36.x86_64
grub2-pc-modules-2.06-61.fc36.noarch
grub2-tools-extra-2.06-61.fc36.x86_64
grub2-efi-ia32-cdboot-2.06-61.fc36.x86_64
grub2-efi-x64-cdboot-2.06-61.fc36.x86_64
grub2-tools-efi-2.06-61.fc36.x86_64
grub2-efi-x64-2.06-61.fc36.x86_64
grub2-efi-ia32-2.06-61.fc36.x86_64
grub2-pc-2.06-61.fc36.x86_64

Yes, I had tried that and it makes no difference.

You have higher version numbers as I do. Look like you are using testing.

Please check it with

From the versions it could be the testing repo who is culprit.

$ rpm -qa |grep grub
grubby-8.40-66.fc37.x86_64
grub2-common-2.06-89.fc37.noarch
grub2-tools-minimal-2.06-89.fc37.x86_64
grub2-tools-2.06-89.fc37.x86_64
grub2-pc-modules-2.06-89.fc37.noarch
grub2-pc-2.06-89.fc37.x86_64
grub2-efi-ia32-2.06-89.fc37.x86_64
grub2-efi-x64-2.06-89.fc37.x86_64
grub2-tools-extra-2.06-89.fc37.x86_64
grub2-efi-ia32-cdboot-2.06-89.fc37.x86_64
grub2-efi-x64-cdboot-2.06-89.fc37.x86_64
grub2-tools-efi-2.06-89.fc37.x86_64

Please continue reading the docs I mentioned above

Have you tried the always recommended step of dnf upgrade --refresh and possibly dnf distro-sync. Those commands often fix this type of error. If they cannot complete without error then the errors need resolved before doing the version upgrade.

Also the suggestion to disable or remove 3rd party repos is good when doing a major version update, though that need is often seen as a conflict rather than an error of the type you show.

1 Like

Yes, these were the first steps I tried but they made no difference.

No, I do not have any copr or testing repos enabled.

Try doing a reinstall of all the packages noted. That should get them in sync with the repos. Once they are in sync then a system upgrade should be able to manage it properly since they are not being removed, merely upgraded to the new release.

You might also consider using the options --allowerasing, --best, or --skip-broken individually or in some combination to find out what the results are. Sometimes that may fix it.

As a last resort I would consider running sudo rpm --rebuilddb. More info at
https://www.cyberciti.biz/tips/rebuilding-corrupted-rpm-database.html

1 Like

No rebuilding the data base didn’t work and I’d already reinstalled all those packages.
If I comment out the lines in /etc/dnf/protected.d files I get …

Error: 
 Problem 1: problem with installed package shim-ia32-15.6-2.x86_64
  - package shim-ia32-15.6-2.x86_64 requires grub2-efi-ia32 >= 2.06~rc1, but none of the providers can be installed
  - conflicting requests
 Problem 2: problem with installed package shim-x64-15.6-2.x86_64
  - package shim-x64-15.6-2.x86_64 requires grub2-efi-x64 >= 2.06~rc1, but none of the providers can be installed
  - conflicting requests

# rpm -qa |grep grub2-efi-x64
grub2-efi-x64-2.06-62.fc36.x86_64
grub2-efi-x64-cdboot-2.06-62.fc36.x86_64

this makes no sense … I’m not sure why it thinks it needs a higher version of grub2 than is availabl

Please post the output of dnf repolist

I removed all the UEFI packages (because I’m BIOS booting).
I commented the relevant lines in files from /etc/dnf/protected.d to see what might be happening and now see…

Error: 
 Problem: problem with installed package grub2-pc-1:2.06-62.fc36.x86_64
  - package grub2-pc-1:2.06-89.fc37.x86_64 requires grub2-tools = 1:2.06-89.fc37, but none of the providers can be installed
  - package grub2-pc-1:2.06-58.fc37.x86_64 requires grub2-tools = 1:2.06-58.fc37, but none of the providers can be installed
  - grub2-pc-1:2.06-62.fc36.x86_64 does not belong to a distupgrade repository
  - conflicting requests
(try to add '--skip-broken' to skip uninstallable packages)

Why would it be trying to install two versions of grub-pc ??

# dnf repolist
repo id                                                  repo name
fedora                                                   Fedora 36 - x86_64
fedora-cisco-openh264                                    Fedora 36 openh264 (From Cisco) - x86_64
fedora-modular                                           Fedora Modular 36 - x86_64
google-chrome                                            google-chrome
google-chrome-beta                                       google-chrome-beta
rpmfusion-free                                           RPM Fusion for Fedora 36 - Free
rpmfusion-free-updates                                   RPM Fusion for Fedora 36 - Free - Updates
rpmfusion-nonfree                                        RPM Fusion for Fedora 36 - Nonfree
rpmfusion-nonfree-updates                                RPM Fusion for Fedora 36 - Nonfree - Updates
updates                                                  Fedora 36 - x86_64 - Updates
updates-modular                                          Fedora Modular 36 - x86_64 - Updates

What about dnf list installed grub2-pc and possibly dnf list installed grub2-*

nothing unexpected here…


# dnf list installed grub2-pc
Installed Packages
grub2-pc.x86_64                                               1:2.06-62.fc36                                                @updates
[root@DC1A ~] # dnf list installed 'grub2-*'
Installed Packages
grub2-common.noarch                                                  1:2.06-62.fc36                                         @updates
grub2-efi-ia32-cdboot.x86_64                                         1:2.06-62.fc36                                         @updates
grub2-efi-x64-cdboot.x86_64                                          1:2.06-62.fc36                                         @updates
grub2-pc.x86_64                                                      1:2.06-62.fc36                                         @updates
grub2-pc-modules.noarch                                              1:2.06-62.fc36                                         @updates
grub2-tools.x86_64                                                   1:2.06-62.fc36                                         @updates
grub2-tools-efi.x86_64                                               1:2.06-62.fc36                                         @updates
grub2-tools-extra.x86_64                                             1:2.06-62.fc36                                         @updates
grub2-tools-minimal.x86_64                                           1:2.06-62.fc36                                         @updates
#

That version you have installed (1:2.06-62.fc36) is what it seems to be complaining about and it cannot seem to find a suitable replacement.

I do not have a machine with F36 for testing, but dnf does not seem to feel that either 2.06-58.fc37 or 2.06-89.fc37 are appropriate replacements.

Well I found a solution to the issue…
I removed the 32 bit efi files (I’m booting 64 bit, so I don’t know why these were ever installed) and marked the problem packages as ‘user installed’.
# dnf mark install grub2-pc grub2-efi-x64 shim-x64
After doing this the update proceeded without problems.

2 Likes