[SOLVED] - grub2-tools update breaks /etc/default/grub

Issues related to applications and software problems
Post Reply
User avatar
warron.french
Posts: 524
Joined: 2014/03/27 20:21:58

[SOLVED] - grub2-tools update breaks /etc/default/grub

Post by warron.french » 2020/09/22 13:33:17

I discovered an interesting problem, and I am hoping that someone who uses Red Hat, and maybe also CentOS, can confirm they are experiencing the same problem.

I started off chasing an issue of changing the GRUB2 (root) password for some of my systems, that a vendor provides me patches for.

At first I attempted to use grub2-mkpasswd-pbkdf2; and copy the resulting string into /boot/grub2/user.cfg. That did not work for me as it always has in the past. Fooie! I discovered another place where the GRUB2(root) password hash was being stored.

Then I discovered a problem after copy/pasting the hash into /etc/grub.d/40_custom, and executing the command

Code: Select all

grub2-mkconfig -o /boot/grub2/grub.cfg
that the command outputs errors! Those errors are the values given to GRUB_CMDLINE_LINUX, typically, but in my copy, due to the most recent updates we received from our vendor, that term - "GRUB_CMDLINE_LINUX" does not exist.

Can someone else please confirm whether or not grub2-tools-2.02-0.81 package is doing the same thing on their system and get back to me ASAP? Please?

I confirmed the /etc/default/grub file did actually come from grub2-tools-2.02-0.81, but I cannot remember how to validate the file has been changed since extraction from the RPM that delivered it. Can you help with that too please?
Last edited by warron.french on 2020/09/23 23:04:18, edited 2 times in total.
Thanks,
War

User avatar
TrevorH
Forum Moderator
Posts: 29719
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: grub2-tools update breaks /etc/default/grub

Post by TrevorH » 2020/09/22 15:07:23

The only thing that should ever touch /etc/default/grub after the initial install is the warm squashy thing sitting in front of the terminal. According to the rpm spec file, /etc/default/grub is what's known as a ghost file so the package claims ownership of it but does not supply its contents. The contents of the file are populated by anaconda during the final phase of the install.

I'd be more inclined to blame this unnamed vendor. And GRUB_CMDLINE_LINUX= really has to exist since it contains the kernel parameters that are passed to all kernels.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
warron.french
Posts: 524
Joined: 2014/03/27 20:21:58

Re: grub2-tools update breaks /etc/default/grub

Post by warron.french » 2020/09/22 15:54:51

Thanks for the quick reply TrevorH.

This matter has determined to be the fault of the vendor. I confirmed for a fact that it's their fault. They will remain nameless, but it wasn't from Red Hat or CentOS.

The vendor provided a script that for some reason errantly uses sed and deleted the GRUB_CMDLINE_LINUX line in /etc/default/grub. I learned of the script since posting my original question.

I will mark this as SOLVED. For the vendor's sake and discretion I am not going to disclose who the vendor was.

But this really made me upset!
Thanks,
War

Post Reply

Return to “CentOS 7 - Software Support”