Here is what happened. cpanel updated and also updated my kernel during the update. It required a reboot.

On reboot, I got kernel panic. Luckily, I have IPMI and was able to easily switch back to the oldest kernel. It was the last to try because the other kernels, none of them worked but the oldest one.

So, now I am using the oldest kernel (it's not that old, just older than the other ones). To avoid the problem and because kernel update is still pending, I decided to run a kernel update over ssh using yum update -y kernel.

My only worry is that it might delete my current kernel.

Here is what I got. Maybe you can confirm something for me.

During install, I got this info:

  kernel.x86_64 0:3.10.0-693.11.1.el7

  kernel.x86_64 0:3.10.0-862.3.3.el7

So, this is the old kernel removed during this update now, and the new kernel that will become active on reboot.

I checked what kernel I am currently on:

# uname -r

And I checked the list of installed kernels:

# rpm -qa kernel

If I am correct, from this info it looks like it did not delete my current kernel (but I'm not sure), but rather the oldest with the exception of the one I am on.

If that is the case, I'm safe because if it goes back to kernel panic, then I can switch back to this kernel again.

Otherwise, I would waste like 3 days of work trying to get everything reinstalled. To be sure, I did do a full backup, but still reinstalling from scratch would be days of work, needless if I just didn't reboot before I resolved the issue.

It would be a bit of a challenge to get my provider to allow me to have them connect another SSD to DD the whole drive in the event it didn't work - especially if I don't need that. Because, if I know ahead of time, I could do a DD to another SSD to swap it back in for working in the event update failed (or would that even work? If kernel is missing, it still has to boot up!)

Overall, the concern here is whether the existing kernel is deleted when there are a limited number of kernels (I have it set to 3 max - too late to change it now).

It would make sense for CentOS devs to never delete the existing kernel as a failsafe. I just want to be 100% sure about it before risking a reboot and potentially giving myself a ton of work.

Of course, eventually this issue will need to be solved. But, I can wait until a week when I do not have a million things to do, and I simply don't have time for 3 days of unwanted work at the moment, especially when currently things will be working fine for sure until the next reboot. At this point, I can delay the reboot until a later date, and keep my server and all sites up and running.

So, in summary, when doing a CentOS 7 kernel update, is the existing kernel is deleted when there are a limited number of kernels?

Thanks so much, appreciate your help. I think this question would be useful for others in a variety of situations.


1 Answer 1


yum will never delete the currently running kernel unless explicitly directed to. It will update the related -devel package regardless though.

  • Excellent. Very good news. Thank you very much. Probably could have spent about 15 minutes less on the question then. lol Jun 17, 2018 at 1:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .