Where is my kernel ? [SOLVED]

General support questions
Post Reply
AntoineL
Posts: 6
Joined: 2020/08/27 11:43:37

Where is my kernel ? [SOLVED]

Post by AntoineL » 2020/11/17 00:02:16

Hi everyone,

I updated my kernel from kernel-3.10.0-1127.19.1.el7.x86_64 to kernel-5.9.8-1.el7.elrepo.x86_64 x86_64

I would like to remove few old kernel.
However when I enter the command "rpm -qa kernel"
It doesn't show the running kernel, even with a reboot.

By the way, I am sure that the running kernel is the new one since when I enter the command "uname -smr" I got the correct answer.

Do you know why ?

Thanks

Antoine
Last edited by AntoineL on 2020/11/19 23:00:25, edited 1 time in total.

User avatar
toracat
Forum Moderator
Posts: 7453
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Where is my kernel ?

Post by toracat » 2020/11/17 06:14:15

Try running:

rpm -qa kernel\* | sort
CentOS Forum FAQ

AntoineL
Posts: 6
Joined: 2020/08/27 11:43:37

Re: Where is my kernel ?

Post by AntoineL » 2020/11/17 20:44:16

Hello toracat,

Well it works thanks.
What does it mean then?

Thanks

Antoine

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

Re: Where is my kernel ?

Post by TrevorH » 2020/11/17 22:53:52

You show us the output and we might be able to tell you.
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

kdpatil
Posts: 31
Joined: 2020/10/20 07:19:31

Re: Where is my kernel ?

Post by kdpatil » 2020/11/18 06:31:29

on my centos 7 it works

rpm -qa kernel
kernel-3.10.0-1160.el7.x86_64
kernel-3.10.0-1160.2.2.el7.x86_64
kernel-3.10.0-514.10.2.el7.x86_64
kernel-3.10.0-693.2.2.el7.x86_64
kernel-3.10.0-514.21.1.el7.x86_64

So should work for you too

bonedome
Posts: 181
Joined: 2017/04/22 08:11:04

Re: Where is my kernel ?

Post by bonedome » 2020/11/18 21:25:46

In answer to the original question, as root or sudo

Code: Select all

package-cleanup --oldkernels --count=3
will delete the oldest kernels and leave the most recent 3
To keep a maximum of 3 edit /etc/yum.conf line, to installonly_limit=3

AntoineL
Posts: 6
Joined: 2020/08/27 11:43:37

Re: Where is my kernel ?

Post by AntoineL » 2020/11/18 22:21:53

Hi all,

Trevor and kdpatil,

If I run: rpm -qa kernel
Here is what I get:
kernel-3.10.0-1160.2.2.el7.x86_64
kernel-3.10.0-327.36.3.el7.x86_64
kernel-3.10.0-1127.19.1.el7.x86_64

If I run: rpm -qa kernel\* | sort
Here is what I get:
kernel-3.10.0-1127.19.1.el7.x86_64
kernel-3.10.0-1160.2.2.el7.x86_64
kernel-3.10.0-327.36.3.el7.x86_64
kernel-devel-3.10.0-1127.19.1.el7.x86_64
kernel-devel-3.10.0-1160.2.2.el7.x86_64
kernel-headers-3.10.0-1160.2.2.el7.x86_64
kernel-lt-4.4.243-1.el7.elrepo.x86_64
kernel-ml-5.8.5-1.el7.elrepo.x86_64
kernel-ml-5.9.8-1.el7.elrepo.x86_64
kernel-tools-3.10.0-1160.2.2.el7.x86_64
kernel-tools-libs-3.10.0-1160.2.2.el7.x86_64

If I run: uname -sr
Linux 5.9.8-1.el7.elrepo.x86_64

I can't get why I can't see my running kernel with rpm...

bonedome,

Thanks you for the help, actually I knew how to delete, the original question was more, why can't I see my running kernel with "rpm -qa kernel".

Thanks again all,

Antoine

tunk
Posts: 829
Joined: 2017/02/22 15:08:17

Re: Where is my kernel ?

Post by tunk » 2020/11/18 22:48:15

Most likely because the rpm is called "kernel-ml" and not "kernel".

kdpatil
Posts: 31
Joined: 2020/10/20 07:19:31

Re: Where is my kernel ?

Post by kdpatil » 2020/11/19 02:52:01

AntoineL wrote:
2020/11/18 22:21:53
Hi all,

Trevor and kdpatil,

If I run: rpm -qa kernel
Here is what I get:
kernel-3.10.0-1160.2.2.el7.x86_64
kernel-3.10.0-327.36.3.el7.x86_64
kernel-3.10.0-1127.19.1.el7.x86_64

If I run: rpm -qa kernel\* | sort
Here is what I get:
kernel-3.10.0-1127.19.1.el7.x86_64
kernel-3.10.0-1160.2.2.el7.x86_64
kernel-3.10.0-327.36.3.el7.x86_64
kernel-devel-3.10.0-1127.19.1.el7.x86_64
kernel-devel-3.10.0-1160.2.2.el7.x86_64
kernel-headers-3.10.0-1160.2.2.el7.x86_64
kernel-lt-4.4.243-1.el7.elrepo.x86_64
kernel-ml-5.8.5-1.el7.elrepo.x86_64
kernel-ml-5.9.8-1.el7.elrepo.x86_64
kernel-tools-3.10.0-1160.2.2.el7.x86_64
kernel-tools-libs-3.10.0-1160.2.2.el7.x86_64

If I run: uname -sr
Linux 5.9.8-1.el7.elrepo.x86_64

I can't get why I can't see my running kernel with rpm...

bonedome,

Thanks you for the help, actually I knew how to delete, the original question was more, why can't I see my running kernel with "rpm -qa kernel".

Thanks again all,

Antoine

if you all ok , edit the topic & add [SOLVED] .. that will help other as they need

AntoineL
Posts: 6
Joined: 2020/08/27 11:43:37

Re: Where is my kernel ?

Post by AntoineL » 2020/11/19 22:59:41

Tunk,

Well that makes sense now :D

Thanks a lot

Best,

Antoine

Post Reply

Return to “CentOS 7 - General Support”