I have recently compiled a new kernel for my linux server. It is almost identical with the previous kernel (I added cifs support). Because physical access to the server is limited, I configured grub to fallback to the old kernel if the new kernel failed to boot cleanly. I can now boot the server, but I don't know which kernel is running.
I tried doing "uname -a" and it gives me the kernel name followed by #2. Is the #2 relevant to my problem?
How can I find out which of the two possible kernels is running? Ideally I'd like to relate it to the order listed in my grub.conf
...should show
cifs
if you're on the new kernel.You can "tag" your kernel to identify it later on.
In menuconfig, go to "General Setup" -> "Local version - append to kernel release"
Any string you enter there will be displayed by uname as suffix to your kernel version.
Another answer to this is cat /proc/cmdline
This shows the path to the kernel and any command line parameters that were used.
example.
cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-3.2.0-17-generic root=UUID=b33290c0-553a-4fd1-af00-b82017923b88 ro ipv6.disable=1 splash quiet vt.handoff=7