No way to know the Ubuntu revision of running kernel on hardy

Asked by Christian Hudon

I have a bunch of computers that I need to ask people to reboot, to get the latest hardy kernel (2.6.24-28.75) with the X security fix. I'd like to be able to verify that that computers are all running that kernel, and not a previous version of kernel 2.6.24-28. Is there a command that is able to tell me the Ubuntu revision of the currently running kernel on a computer (the ".75" part). The command "uname" and friends only stop at 2.6.24-28.

Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu linux Edit question
Assignee:
No assignee Edit question
Solved by:
Christian Hudon
Solved:
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

You can find the installed kernels...

dpkg -l | grep -i ^ii | grep -i linux-image

Revision history for this message
Christian Hudon (chrish) said :
#2

Thanks for your answer, but it doesn't answer my question. I'm asking if there is a way to know if the currently running kernel is, say, 26.24-28.75 or 2.6.24-28.73.

The "dpkg ..." line tells me the full version of the kernels that are installed on disk, not the full version of the one loaded in memory and currently running. Thanks.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#3

In my pc the uname -a give me:

Linux ubuntu 2.6.32-24-generic #42-Ubuntu SMP Fri Aug 20 14:24:04 UTC 2010 i686 GNU/Linux

please note the #42 part

Then my installed kernel is:

dpkg -l | grep -i ^ii | grep -i linux-image

ii linux-image-2.6.32-24-generic 2.6.32-24.42 Linux kernel image for version 2.6.32 on x86/x86_64

ii linux-image-generic 2.6.32.24.25 Generic Linux kernel image

Please note the .42

Hope this helps

Revision history for this message
Christian Hudon (chrish) said :
#4

Hmm. This doesn't seem to work on hardy, though. "uname -a" gives me "#1", but I'm running ".75". I assume this feature was added after hardy?

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#5

Might be try

uname -v

#42-Ubuntu SMP Fri Aug 20 14:24:04 UTC 2010

Revision history for this message
Christian Hudon (chrish) said :
#6

> uname -v
#1 SMP Wed Mar 24 10:39:18 UTC 2010

Should I mark this as "solved (but not available for hardy)"?

Revision history for this message
Christian Hudon (chrish) said :
#7

Marking as "solved". Answer: not possible for hardy. For a later version of Ubuntu, look for the number after the "#" sign in the output of "uname -a". Thanks for your time.