1

I'm a little confused by Ubuntu/Linux kernel updates. Coming from a Windows background I sort of expect all updates to be available via the update manager, in the case of Ubuntu apt/aptitude.

Yet if I look at the kernel versions of all our servers (around 60 of them) I see many have different kernels between 3.13.0-24-generic and 3.13.0-52-generic even though they are all running Ubuntu 14.04.2.

If I login to a server with 3.13.0-24-generic running and run an upgrade, no updates to the kernel are offered.

Why don't new kernel versions get installed / applied with an apt-get upgrade and why doesn't a do-release-upgrade update the kernel the same (latest) kernel?

Can someone give a little background on how linux/ubuntu kernel updates work?

Note, I am running apt-get update before apt-get upgrade yet no kernel updates are installed.

Many thanks!

2

Since the 4th number in a kernel version is usually considered a patch... I would assume that the system determined that you do not need THAT patch - ie the software installed on your system does not have the kernel patch version as a dependency. It also tells me that it is not a security update.

So, if no software depends on the 52 patch, and all software installed is fine with 24, then I assume it wont be installed and the system will leave the 24 kernel alone.

  • This might explain the differences but still seems strange. All the servers have essentially the same software setup. I wonder if it is because they were installed at different dates. For example they were updated from 12 or 13 at a certain date and took the latest kernel from that date. Then based on your suggestion as there have been no major kernel versions since they have not been updated? – user1167223 Jun 5 '15 at 16:46
3

Every Ubuntu release contains a list of pre-installed kernel to know the installed kernels, executhe the following command in the terminal:

dpkg -l | grep -Ei "linux-headers|linux-image"

the kernel is composed of files like :

linux-headers-<version>_<version>_all.deb  
linux-headers-<version>-generic_<version>_<architecture>.deb  
linux-image-<version>-generic_<version>_<architecture>.deb  
linux-image-extra-<version>-generic_<version>_<architecture>.deb  

according to the system architecture (x86 or x64) do-release-upgrade or apt-get upgrade will upgrade all the packages installed including the kernel packages, however we should to choose the appropriate kernel to boot from

to download new kernels, go to kernel.ubuntu.com
download the files and install them using dpkg -i

You could also do the following:

apt-cache search linux-image

Pick the one you want and then do:

sudo apt-get install linux-image-your_version_choice
3

Your problem might be related to missunderstandings regarding apt. The Ubuntu repositories are only holding one current version of a package.

Before you run apt-get upgrade, you need to update your apt's package cache. It has to ask the repositories for up-to-date metadata. Otherwise, apt will not recognize there is a new version of a package (in your case, the linux kernel package) available. Therefore, to actually upgrade packages on your servers to a newer version, you have to run

sudo apt-get update && sudo apt-get upgrade
  • 1
    sorry should have mentioned in the original post, of course I am updating apt before checking for upgrades. – user1167223 Jun 5 '15 at 16:43
1

The box will only pick up the new kernel once it has rebooted. You may have a newer kernel already installed, but if the box hasn't rebooted it hasn't had a chance to switch to it yet. Recent Linux kernels are developing technology that would allow a live kernel upgrade, but that's still very cutting edge.

  • thanks, boxes are rebooted weekly after updates have been applied – user1167223 Jun 5 '15 at 16:47
  • if the newer kernel package is installed and rebooting doesn't switch to it then you would need to check the grub configs – chicks Jun 8 '15 at 2:38
  • the problem is not that the new kernel is not being used, the problem is that new kernels are not being installed. – user1167223 Jun 8 '15 at 7:35
0

I don't remember at what version the change came, but several years ago apt-get and aptitude stopped offering kernel updates by default unless you were logged into the server locally. If you are logging into the servers remotely (via ssh), you can use the command

sudo apt-get update && sudo apt-get dist-upgrade

to include kernel updates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.