Page 1 of 1

grub.cfg not updated after new kernel install

Posted: 2019/08/03 06:38:00
by drknut
Hello All,

After a kernel update (via yum), the server boots on the freshly installed kernel.

Except for one of my servers. To make the server boot with the updated kernel I have to manually run grub2-mkconfig.

Is it a yum configuration problem ? a permissions problem ?

Re: grub.cfg not updated after new kernel install

Posted: 2019/08/03 17:37:48
by TrevorH
If you are having problems with grub2 on CentOS 7, such as new kernels not being detected, you should check the symlink exists between /etc/grub2.cfg -> ../boot/grub2/grub.cfg (legacy BIOS) or /etc/grub2-efi.cfg -> ../boot/efi/EFI/centos/grub.cfg (UEFI systems)

Re: grub.cfg not updated after new kernel install

Posted: 2019/08/04 01:46:00
by drknut
The symlink existed but the target ../boot/grub2/grub.cfg is missing.

The effective grub.cfg is located in /boot/grub.

I made the symlink point to this file (/etc/grub2.cfg -> ../boot/grub/grub.cfg).

Waiting for the next kernel update.

Re: grub.cfg not updated after new kernel install

Posted: 2019/08/04 11:14:22
by TrevorH
Was this a conversion from CentOS 6 to 7? That appears to be a grub legacy directory not a grub2 one.

Re: grub.cfg not updated after new kernel install

Posted: 2019/08/04 14:14:42
by drknut
Was this a conversion from CentOS 6 to 7? That appears to be a grub legacy directory not a grub2 one.
This is the default installation of a CentOS 7 VPS hosted by www.gandi.net.

Re: grub.cfg not updated after new kernel install

Posted: 2019/08/04 15:24:23
by TrevorH
I fear you may have been sold something that isn't CentOS if it really uses /boot/grub/grub/cfg and not /boot/grub2/grub.cfg.

https://wiki.centos.org/AdditionalResources/OtherSpins
https://wiki.centos.org/fr/TipsAndTricks/BrokenVserver

Re: grub.cfg not updated after new kernel install

Posted: 2019/08/04 19:54:43
by drknut
Yes, it seems that the CentOS I got has been somewhat customized.

I must live with that.... as far as you don't ban me for using a bootleg CentOS ;)

Re: grub.cfg not updated after new kernel install

Posted: 2019/09/18 03:43:56
by drknut
I made the symlink point to this file (/etc/grub2.cfg -> ../boot/grub/grub.cfg).
This didn't solve the problem.

I'm updating this thread just for the sake of completeness. I'm not seeking help, I'll will use grub2-mkconfig.