Results 1 to 3 of 3
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-09-2008 #1Just Joined!
- Join Date
- May 2008
- Posts
- 2
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
- 05-11-2008 #2
uname -r should be reliable.
Good LuckLinux since: 2001
Gentoo since: 2004
- - - - - - - -
Translation:
I fix things until they break.
- 05-11-2008 #3Just Joined!
- Join Date
- May 2008
- Posts
- 2
> uname -r should be reliable.
There is no doubt that uname -r would produce a kernel version reliably
The question is how reliable the fact, that this version can be found in vmlinuz, is. After all, vmlinuz is compressed and the only real code is the loader/decompressor in the beginning. Technically, there is no guarantee that the version string would be present in the loader, but it does appear to be that way.


Reply With Quote
