When I install an updated kernel - as part of regular updates - it takes a lot longer than any other update. (I'm talking about a few minutes - not a really long time.) There are no error messages. I'm talking about successful, routine updates.

I have noticed this for years. It doesn't matter which specific kernel it is.

I have a fast connection. The time to download it isn't long and I'm not counting it. I'm also not counting the time to reboot after the kernel is installed.

I'd just like to know what its doing that takes so long.

It also takes pretty long to uninstall an old kernel version although it's a little faster than installing a new one.

Part of it is probably because it has to run grub update a couple of times, which is time consuming. From some messages I've seen, it looks like this always runs twice. I don't know why.

What does a kernel update actually do?

(I know what kernels are and what they do. I'm asking specifically about the update process itself.)


This is hard to say with out specifics, but in general:

  • Update initfs (the in memory file system used to start the system before all the modules are loaded) This can take a while.
  • Rebuild all DKMS modules, many "third party" modules like video card drivers or Virtual Box modules are distributed as a DKMS package. They get recompiled at every kernel version. Virtual Box's host OS drivers can take a very long time depending how "in use" they are.
  • Update Grub - This can take a while, or not, depending on setup.
  • Restart services, though not strictly needed for a kernal update, updating DKMS packages, can require the re-starting of services in some cases. VMWare (I think) for example
  • Building the system map.
  • Updating the Dependency tree

Some of these steps can be very fast or very long. For example, rebuilding DKMS packages on a VMWare Server can take hours if you have to wait for the service to shutdown cleanly, while updating DKMS packages on a system with no DKMS modules takes very little time (just enough to check that there are no modules).

  • Thanks for the detailed answer. I'm not dealing with any VMs at the moment. In my simple case, I wouldn't expect any services to restart until after/as part of the reboot and I wasn't counting that time. I had not run into System.map. I looked it up at en.wikipedia.org/wiki/System.map. Mine is over 70,000 lines long.
    – Joe
    Nov 10 '15 at 8:58
  • I would also add that when installing linux-image-generic-blah this often pulls in two packages: linux-image-foo, and linux-image-extra-foo. This results in update-initramfs and update-grub being run twice, once for each package. Feb 2 '16 at 1:37

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.