Kernel not updating to newer releases

General support questions
Post Reply
bhazell0696
Posts: 4
Joined: 2020/07/30 16:54:09

Kernel not updating to newer releases

Post by bhazell0696 » 2020/07/30 17:01:45

I'm finding that the base CentOS 7.8.2003 kernel 3.10.0-1127.x86_64 will not update to a newer kernel. performing a yum localinstall for the RPMs and i'm receiving an error of nothing to do. Why will the kernel not update to 3.10.0-1127.8.2 or 3.10.0-1127.13.1 or 3.10.0-1127.18.2

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

Re: Kernel not updating to newer releases

Post by TrevorH » 2020/07/30 17:30:39

Show us all of the output from your yum update kernel from the command you enter right the way through until the command prompt returns afterwards.
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
TrevorH
Forum Moderator
Posts: 29117
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Kernel not updating to newer releases

Post by TrevorH » 2020/07/30 18:57:44

I'm suspecting that you've broken your symlink from /etc/grub2.cfg to /boot/grub2/grub.cfg so the copy that grub uses in /boot is not being updated but the one in /etc (which it doesn't use) is being updated. You'll need to copy the one from /etc to /boot then correct the symlink in /etc which should look like this

Code: Select all

[root@centos7 ~]# ls -la /etc/grub2.cfg 
lrwxrwxrwx. 1 root root 22 Apr  4 14:12 /etc/grub2.cfg -> ../boot/grub2/grub.cfg
If your system is UEFI then that's not the right file and the /etc copy will be something like grub2-efi.cfg and should point to a subdirectory of /boot/efi (I don't use UEFI if I can help it so don't have a system with it set up like that).
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

bhazell0696
Posts: 4
Joined: 2020/07/30 16:54:09

Re: Kernel not updating to newer releases

Post by bhazell0696 » 2020/07/30 20:55:50

there isn't a /etc/grub2.cfg can I copy it from another duplicate box? Server2 cp /etc/grub2.cfg to Server1 /etc/grub2.cfg

bhazell0696
Posts: 4
Joined: 2020/07/30 16:54:09

Re: Kernel not updating to newer releases

Post by bhazell0696 » 2020/07/30 21:12:53

[root@fhlogger1 ~]# yum update kernel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.constant.com
* epel: mirror.team-cymru.com
* extras: repos.lax.quadranet.com
* updates: mirrors.usinternet.com
No packages marked for update
[root@fhlogger1 ~]#

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

Re: Kernel not updating to newer releases

Post by TrevorH » 2020/07/31 00:09:13

Do you have an /etc/grub2-efi.cfg instead? It should be a symlink to ../boot/efi/EFI/centos/grub.cfg
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

bhazell0696
Posts: 4
Joined: 2020/07/30 16:54:09

Re: Kernel not updating to newer releases

Post by bhazell0696 » 2020/07/31 13:24:17

When I went to copy the grub2.cfg, to the one from /etc to /boot it was not there. So I performed a yum install grub2 and grub2 re-installed producing a new grub2.cfg.rpmnew file in/etc. I made a copy of the new file naming in grub2.cfg and ran the grub2-mkconfig, opened up the grub2.cfg in /etc and /boot/grub2 and the newest kernel information has populated however when I perform a uname -r the base kernel information is still showing 3.10.0-1127.el7.x86_64 and not 3.10.0-1127.18.2.el7.x86_64. I'm a novice Linux engineer, trying to learn as I go. All of your help has been greatly appreciated.

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

Re: Kernel not updating to newer releases

Post by TrevorH » 2020/07/31 15:47:46

I performed a yum install grub2 and grub2 re-installed producing a new grub2.cfg.rpmnew file in/etc
So it must've been there as yum doesn't create .rpmnew files unless the file it supplies is a) present and b) not the same checksum it expects and c) is marked as a config file. If you now have a copy of grub2.cfg that contains all the right kernels then that copy needs to go into /boot/grub2/grub.cfg and you also need to rename the file that's in /etc/ as it should not be a file, it should be a symlink to the one in /boot/grub2.

Yum updates the copy in /etc and that should be a symlink to the copy in /boot so that the actual update goes into the /boot copy. When grub boots, it does not have access to /etc so it reads the copy in /boot which is the only filesystem it has access to at the time. To get the kernels recognised the correct one has to be in /boot/grub2. To get new kernels added to that, the copy in /etc must be a symlink to the /boot one or it will just happen again.

As for what caused the problem,. some tools, usually sed, need to be told that they are working on a symlink or they rm the symlink and replace it with a plain file.
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

Post Reply

Return to “CentOS 7 - General Support”