Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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

  2. #2
    uname -r should be reliable.

    Good Luck
    Linux since: 2001
    Gentoo since: 2004
    - - - - - - - -
    Translation:
    I fix things until they break.

  3. #3
    > 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.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •