Grub2-tools and YUM

General support questions
Post Reply
sconos
Posts: 2
Joined: 2018/02/16 20:13:59

Grub2-tools and YUM

Post by sconos » 2018/02/16 20:25:21

Hi,

I've been having a problem during yum updates with the grub2-tools package, the last update that I did the kernel panic'd and froze on boot.

I was able to reboot and select last kernel through grub, but I'm noticing a lot of failed dependencies now. I've run yum-complete-transactions then yum --cleanup-only and they all comeback OK with the exception of grub2-tools

(xxxx@xxxxxxx boot]# yum update grub2-tools
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.wdc1.us.leaseweb.net
* epel: mirror.cs.princeton.edu
* extras: mirror.teklinks.com
* nux-dextop: mirror.li.nux.ro
* updates: mirrors.maine.edu
Package 1:grub2-tools-efi-2.02-0.64.el7.centos.x86_64 is obsoleted by 1:grub2-tools-2.02-0.65.el7.centos.2.x86_64 which is already installed
Resolving Dependencies
--> Running transaction check
---> Package grub2-tools.x86_64 1:2.02-0.44.el7.centos will be updated
--> Processing Dependency: grub2-tools = 1:2.02-0.44.el7.centos for package: 1:grub2-2.02-0.44.el7.centos.x86_64
---> Package grub2-tools.x86_64 1:2.02-0.44.el7.centos will be obsoleted
--> Processing Dependency: grub2-tools = 1:2.02-0.44.el7.centos for package: 1:grub2-2.02-0.44.el7.centos.x86_64
---> Package grub2-tools.x86_64 1:2.02-0.65.el7.centos.2 will be obsoleting
Removing grub2-tools.x86_64 1:2.02-0.44.el7.centos - ud due to obsoletes from installed 1:grub2-tools-2.02-0.65.el7.centos.2.x86_64
Removing grub2-tools.x86_64 1:2.02-0.44.el7.centos - od due to obsoletes from installed 1:grub2-tools-2.02-0.65.el7.centos.2.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package grub2-tools.x86_64 1:2.02-0.44.el7.centos will be updated
---> Package grub2-tools.x86_64 1:2.02-0.44.el7.centos will be obsoleted
--> Finished Dependency Resolution
Error: Package: 1:grub2-2.02-0.44.el7.centos.x86_64 (@base)
Requires: grub2-tools = 1:2.02-0.44.el7.centos
Removing: 1:grub2-tools-2.02-0.44.el7.centos.x86_64 (@base)
grub2-tools = 1:2.02-0.44.el7.centos
Updated By: 1:grub2-tools-2.02-0.65.el7.centos.2.x86_64 (updates)
grub2-tools = 1:2.02-0.65.el7.centos.2
Obsoleted By: 1:grub2-tools-2.02-0.65.el7.centos.2.x86_64 (updates)
grub2-tools = 1:2.02-0.65.el7.centos.2
Available: 1:grub2-tools-2.02-0.64.el7.centos.x86_64 (base)
grub2-tools = 1:2.02-0.64.el7.centos
You could try using --skip-broken to work around the problem

I did cleanup grub2 and the /boot partition and grub menu with package-cleanup --oldkernels --count=2 so it's not a space issue in boot, and I did check free space after that.

I can keep updating with --skip-broken but would like to see if I can fix this package problem if possible.

Any ideas?

Thanks

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Grub2-tools and YUM

Post by avij » 2018/02/16 22:19:17

Looks like your rpm database thinks you have a mix of "44", "64" and "65" grub2 packages installed. What does rpm -qa 'grub2*' report?

desertcat
Posts: 843
Joined: 2014/08/07 02:17:29
Location: Tucson, AZ

Re: Grub2-tools and YUM

Post by desertcat » 2018/02/17 13:12:10

sconos wrote:Hi,

I've been having a problem during yum updates with the grub2-tools package, the last update that I did the kernel panic'd and froze on boot.

I was able to reboot and select last kernel through grub, but I'm noticing a lot of failed dependencies now. I've run yum-complete-transactions then yum --cleanup-only and they all comeback OK with the exception of grub2-tools

(xxxx@xxxxxxx boot]# yum update grub2-tools
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.wdc1.us.leaseweb.net
* epel: mirror.cs.princeton.edu
* extras: mirror.teklinks.com
* nux-dextop: mirror.li.nux.ro
* updates: mirrors.maine.edu
Package 1:grub2-tools-efi-2.02-0.64.el7.centos.x86_64 is obsoleted by 1:grub2-tools-2.02-0.65.el7.centos.2.x86_64 which is already installed
Resolving Dependencies
--> Running transaction check
---> Package grub2-tools.x86_64 1:2.02-0.44.el7.centos will be updated
--> Processing Dependency: grub2-tools = 1:2.02-0.44.el7.centos for package: 1:grub2-2.02-0.44.el7.centos.x86_64
---> Package grub2-tools.x86_64 1:2.02-0.44.el7.centos will be obsoleted
--> Processing Dependency: grub2-tools = 1:2.02-0.44.el7.centos for package: 1:grub2-2.02-0.44.el7.centos.x86_64
---> Package grub2-tools.x86_64 1:2.02-0.65.el7.centos.2 will be obsoleting
Removing grub2-tools.x86_64 1:2.02-0.44.el7.centos - ud due to obsoletes from installed 1:grub2-tools-2.02-0.65.el7.centos.2.x86_64
Removing grub2-tools.x86_64 1:2.02-0.44.el7.centos - od due to obsoletes from installed 1:grub2-tools-2.02-0.65.el7.centos.2.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package grub2-tools.x86_64 1:2.02-0.44.el7.centos will be updated
---> Package grub2-tools.x86_64 1:2.02-0.44.el7.centos will be obsoleted
--> Finished Dependency Resolution
Error: Package: 1:grub2-2.02-0.44.el7.centos.x86_64 (@base)
Requires: grub2-tools = 1:2.02-0.44.el7.centos
Removing: 1:grub2-tools-2.02-0.44.el7.centos.x86_64 (@base)
grub2-tools = 1:2.02-0.44.el7.centos
Updated By: 1:grub2-tools-2.02-0.65.el7.centos.2.x86_64 (updates)
grub2-tools = 1:2.02-0.65.el7.centos.2
Obsoleted By: 1:grub2-tools-2.02-0.65.el7.centos.2.x86_64 (updates)
grub2-tools = 1:2.02-0.65.el7.centos.2
Available: 1:grub2-tools-2.02-0.64.el7.centos.x86_64 (base)
grub2-tools = 1:2.02-0.64.el7.centos
You could try using --skip-broken to work around the problem

I did cleanup grub2 and the /boot partition and grub menu with package-cleanup --oldkernels --count=2 so it's not a space issue in boot, and I did check free space after that.

I can keep updating with --skip-broken but would like to see if I can fix this package problem if possible.

Any ideas?

Thanks
That throws me a curve ball: I just checked my /boot; /boot/grub; /boot/grub2; /etc/default/grub; and /etc/grub.d and could not find any mention of grub2-tools. I don't seem to have it anywhere. One difference maybe is I also also happen to run straight BIOS and not UEFI.

A quick search shows that there happens to be a bug associated with grub2-tools.

https://stackoverflow.com/questions/462 ... yum-update


Here is the way one person solved it:

4
down vote
accepted


I encountered the same problem, due to abnormal stop of yum update process.

I solve by removing grub2-tools and then re-install it, skipping the multilib check.

Specifically here's what I did:

[CAUTION! Use at your own risk ]

yum remove grub2-tools
yum install grub2 --setopt=protected_multilib=false
yum clean all
yum update

shareimprove this answer

I have used a similar method to solve similar problems: Run yum erase (or yum remove the package giving you the problem, then running yum install the package. though do use CAUTION: I erased / removed what I thought was a single package and did not watch the number of packages it planned to remove and said Y only to discover it removed a whole lot of dependencies needed by OTHER programs and it had a snow ball effect. I lucked out since I had at that time a relatively recent backup. The idea is to get rid of ALL the files of a similar name, then running yum install package_name which will then, it is hoped install only the most recent one.

Hope this helps

sconos
Posts: 2
Joined: 2018/02/16 20:13:59

Re: Grub2-tools and YUM

Post by sconos » 2018/02/21 15:25:09

avij wrote:Looks like your rpm database thinks you have a mix of "44", "64" and "65" grub2 packages installed. What does rpm -qa 'grub2*' report?
sudo rpm -qa 'grub2'

grub2-2.02-0.44.el7.centos.x86_64
grub2-2.02-0.65.el7.centos.2.x86_64

Not sure how two packages for the same process can be installed at the same time? I'm a little hesitent to just blow all grub2 away since it is the boot manager ....

sudo rpm -qa 'grub2*'

grub2-2.02-0.44.el7.centos.x86_64
grub2-tools-minimal-2.02-0.65.el7.centos.2.x86_64
grub2-pc-2.02-0.65.el7.centos.2.x86_64
grub2-2.02-0.65.el7.centos.2.x86_64
grub2-tools-2.02-0.65.el7.centos.2.x86_64
grub2-common-2.02-0.65.el7.centos.2.noarch
grub2-pc-modules-2.02-0.65.el7.centos.2.noarch
grub2-tools-extra-2.02-0.65.el7.centos.2.x86_64
grub2-tools-2.02-0.44.el7.centos.x86_64

I'm going to do a little tracing and most likely rpm -e the 44 version then update again, but I need to see the dependencies first on the -e

Kind of scary messing around with a systems boot manager (IMHO).

Thanks for the pointers.

desertcat
Posts: 843
Joined: 2014/08/07 02:17:29
Location: Tucson, AZ

Re: Grub2-tools and YUM

Post by desertcat » 2018/02/21 21:25:00

sconos wrote:
avij wrote:Looks like your rpm database thinks you have a mix of "44", "64" and "65" grub2 packages installed. What does rpm -qa 'grub2*' report?
sudo rpm -qa 'grub2'

grub2-2.02-0.44.el7.centos.x86_64
grub2-2.02-0.65.el7.centos.2.x86_64

Not sure how two packages for the same process can be installed at the same time? I'm a little hesitent to just blow all grub2 away since it is the boot manager ....

sudo rpm -qa 'grub2*'

grub2-2.02-0.44.el7.centos.x86_64
grub2-tools-minimal-2.02-0.65.el7.centos.2.x86_64
grub2-pc-2.02-0.65.el7.centos.2.x86_64
grub2-2.02-0.65.el7.centos.2.x86_64
grub2-tools-2.02-0.65.el7.centos.2.x86_64
grub2-common-2.02-0.65.el7.centos.2.noarch
grub2-pc-modules-2.02-0.65.el7.centos.2.noarch
grub2-tools-extra-2.02-0.65.el7.centos.2.x86_64
grub2-tools-2.02-0.44.el7.centos.x86_64

I'm going to do a little tracing and most likely rpm -e the 44 version then update again, but I need to see the dependencies first on the -e

Kind of scary messing around with a systems boot manager (IMHO).

Thanks for the pointers.
As that one fellow pointed out you can selectively choose to remove grub2-tools issuing yum erase (remove?) grub2-tools it will then pop up a message and say what it plans to erase (remove). You can then chicken out and say NO, but at least you will KNOW which packages and dependencies are in conflict.

I too would be careful about blowing "...all grub2 away since it is the boot manager" but grub2-tools should be INDEPENDENT of the boot MANAGER. As I said I searched my entire disk and while I have a grub2, I do NOT have a grub2-tools. BEFORE I messed with grub I would make a backup of /boot just in case you manage to screw up something, that way you can restore it.

Actually having a backup for the entire disk would probably be an excellent suggestion if you don't already have one. I have always backup up my system however using the dd command which was painful and time consumming so I did it only once or twice a year. I recently discovered a back up program that is simple, flexible, and -- best of all -- available for CentOS 7 called Backupninja To install issue the command as root yum install backupninja. To run you it type ninjahelper. The current version for CentOS 7 is 1.0.1-8.el7. I have it set to back up roughly 90% of my entire disk on a weekly basis.... including /boot. For more information on Backupninja here are two links:

https://www.techrepublic.com/blog/produ ... for-linux/
https://vpsguide.net/tutorials/vps-tuto ... nd-debian/

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Grub2-tools and YUM

Post by TrevorH » 2018/02/21 22:20:20

Don't use yum to remove those packages as it will expand the selection and remove more than you want to. Back up /var/lib/rpm and /var/lib/yum then use rpm -e --nodeps --justdb on each one of the newer packages and then when they are all gone, rerun yum update and it should offer to upgrade the older ones to the newer ones again.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply