uname -r returns the wrong kernel version

10,176

Not exacly.

uname will tell you what kernel is running, not which is installed. So you might have installed the new kernel, but the system would only be running it after a reboot.

After you have installed a new kernel, especially manually, you will need to run sudo update-grub in a terminal window and reboot afterwards.

If the kernel 3.16 was installed correctly, be sure that it is chosen in GRUB2, when booting your PC. To be sure, you can select the "Advanced option for Ubuntu" option in grub. There all your installed kernels are present.

But the sudo update-grub part is crucial when manually installing kernels.

Share:
10,176
Micha Roon
Author by

Micha Roon

A unique combination of business understanding and in depth technical knowledge acquired working closely with the management and end-users of many international companies and organizations has allowed me to provide my customers with high added value through the projects I participated in driving to their success. Since 2015 I focused my learning on blockchain and smart-contracts which is paying dividends with many requests and interesting projects

Updated on September 18, 2022

Comments

  • Micha Roon
    Micha Roon over 1 year

    I upgraded from Ubuntu 12 to 14.04 and ran a check at the end of the process to verify everything went right. here is the output of uname -a

    Linux odoo 2.6.32-042stab092.3 #1 SMP Sun Jul 20 13:27:24 MSK 2014 x86_64 x86_64 x86_64 GNU/Linux
    

    and then the output of lsb_release -a

    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 14.04.1 LTS
    Release:    14.04
    Codename:   trusty
    

    So it seems that the system was updated but the kernel was not.

    Seeing this, I manually downloaded and installed the 3.16 kernel with these steps:

    cd /tmp/
    
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-headers-3.16.0-031600-generic_3.16.0-031600.201408031935_amd64.deb
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-headers-3.16.0-031600_3.16.0-031600.201408031935_all.deb
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-image-3.16.0-031600-generic_3.16.0-031600.201408031935_amd64.deb
    
    sudo dpkg -i linux-headers-3.16.0-*.deb linux-image-3.16.0-*.deb
    

    but after the reboot, uname -mrs still tells me

    Linux 2.6.32-042stab092.3 x86_64
    

    How can I check if the uname command is lying or if the kernel has really not been updated?