How to determine kernel/initrd used during booting
Does anyone know a way to determine which kernel/initrd file was used when the system booted?
There are appear to be symbolic links (vmlinuz, initrd) in /boot (in / on Ubuntu), which point to the most recent kernel. However, these links are really static and are not recreated during each boot cycle. Thus, they are not very reliable.
As an alternative approach to this problem, I was trying to scan all kernels listed /boot/grub/menu.lst for the current kernel version using something like this:
strings /boot/vmlinuz | grep `uname -r`
This seems to produce a build string with the exact version, build user and time. Does anybody know if this can actually be relied upon or is it just a fluke in my distribution?
Thanks in advance