Which kernel am I using?

Long story short, I installed 11.1 and have applied all the updates.

If I do a modprobe -l I get:

FATAL: Could not load /lib/modules/2.6.27.7-9-pae/modules.dep

So I do an ls on /lib/modules:

server:/boot # ls -l /lib/modules
total 24
drwxr-xr-x 2 root root 4096 Apr 9 16:20 2.6.27.21-0.1-debug
drwxr-xr-x 2 root root 4096 Apr 9 16:20 2.6.27.21-0.1-default
drwxr-xr-x 4 root root 4096 Apr 9 16:57 2.6.27.21-0.1-pae
drwxr-xr-x 2 root root 4096 Apr 9 16:20 2.6.27.21-0.1-trace
drwxr-xr-x 2 root root 4096 Apr 9 16:20 2.6.27.21-0.1-vmi
drwxr-xr-x 2 root root 4096 Apr 9 16:20 2.6.27.21-0.1-xen

And sure enough, 2.6.27.7-9-pae is not there. Out of curiosity I do an ls on /boot:

server:/boot # ls -l /boot
total 13534
-rw-r–r-- 1 root root 1098261 Apr 1 19:52 System.map-2.6.27.21-0.1-pae
-rw------- 1 root root 512 Mar 27 03:38 backup_mbr
lrwxrwxrwx 1 root root 1 Mar 27 03:23 boot → .
-rw-r–r-- 1 root root 1236 Jan 7 20:03 boot.readme
-rw-r–r-- 1 root root 95940 Apr 1 20:04 config-2.6.27.21-0.1-pae
drwxr-xr-x 2 root root 1024 Apr 9 16:47 grub
lrwxrwxrwx 1 root root 24 Apr 9 16:58 initrd → initrd-2.6.27.21-0.1-pae
-rw-r–r-- 1 root root 5735567 Apr 9 16:58 initrd-2.6.27.21-0.1-pae
drwx------ 2 root root 12288 Mar 27 03:21 lost+found
-rw-r–r-- 1 root root 442880 Mar 27 03:38 message
-rw-r–r-- 1 root root 155172 Apr 1 20:08 symsets-2.6.27.21-0.1-pae.tar.gz
-rw-r–r-- 1 root root 406837 Apr 1 20:07 symtypes-2.6.27.21-0.1-pae.gz
-rw-r–r-- 1 root root 120136 Apr 1 20:05 symvers-2.6.27.21-0.1-pae.gz
-rw-r–r-- 1 root root 3220363 Apr 1 20:04 vmlinux-2.6.27.21-0.1-pae.gz
lrwxrwxrwx 1 root root 25 Apr 9 16:57 vmlinuz → vmlinuz-2.6.27.21-0.1-pae
-rw-r–r-- 1 root root 2497968 Apr 1 19:52 vmlinuz-2.6.27.21-0.1-pae

Also, I do an rpm -qa | grep kernel and get:

server:/boot # rpm -qa | grep kernel
kernel-pae-extra-2.6.27.21-0.1.2
kernel-source-2.6.27.21-0.1.1
kernel-pae-base-2.6.27.21-0.1.2
linux-kernel-headers-2.6.27-2.28
kernel-pae-2.6.27.21-0.1.2

So it seems to me that my installation really thinks it’s running 2.6.27.21-0.1. However, my uname -a is:

server:/boot # uname -a
Linux server 2.6.27.7-9-pae #1 SMP 2008-12-04 18:10:04 +0100 i686 athlon i386 GNU/Linux

It seems to me that according to uname, I am running kernel version 2.6.27.7-9-pae, and modprobe -l is looking in a directory according to that version. But I see no 2.6.27.7-9-pae kernel on my system – only 2.6.27.21-0.1? What am I missing? Any ideas how my system could be thinking it is 2.6.27.7-9?!? I’m very confused.

Thank you for any insight you can provide.

lrwxrwxrwx 1 root root 25 Apr 9 16:57 vmlinuz -> vmlinuz-2.6.27.21-0.1-pae

that is what you are running.

mark54g wrote:
> lrwxrwxrwx 1 root root 25 Apr 9 16:57 vmlinuz ->
> vmlinuz-2.6.27.21-0.1-pae
>
> that is what you are running.

Er, no, not exactly. That’s just the kernel on disk, which may not may
not mach what “uname -r” sais you’re runnning, e.g. when you just
upgraded the packages and forgot to reboot.

Kind regards,
Andreas Stieger

I’m not too familiar with servers, but is there a file akin to the /boot/grub/menu.lst you could consult? The default boot option could indicate which kernel is being initiated on launch.

My crystal ball also tells me, that somebody might have forgotten to reboot the machine after a kernel update…

(Which fits perfectly with the reported “errors” …)