2

Today I upgraded by 14.10 VM to 15.04. Since it's a virtual machine (via VirtualBox), I needed to install guest additions. However, the installation fails saying (in /var/log/vboxadd-install.log):

Error! Your kernel headers for kernel 3.16.0-31-generic cannot be found.

So, I tried to install it in the usual way and got:

Package linux-headers-3.16.0-31-generic is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source[.]

Having installed linux-headers-generic, which should provide the correct headers, I was confused. This is the sort of error I would expect if 3.16.0-31 was out of date. But . . . indeed dpkg -l | grep generic produces:

...
ii linux-headers-3.19.0-17-generic ...
...

A ha! So it looks like the guest additions are trying to use an outdated kernel. Maybe they use uname. So I tried uname -r and got:

3.16.0-31-generic


My guess is that the guest additions are using uname to get the desired kernel header version, but that uname is giving the incorrect value for whatever reason. Question: If my analysis is right, how do I fix it? If not, what's the problem?


EDIT: After looking around, it seems that this means the running kernel is actually 3.16.0-31, while 3.19.0-17 is merely installed. I sudo update-grubd, confirmed that 3.19 kernel is the 0th element of /boot/grub/menu.lst and rebooted, but it doesn't seem to change anything.

EDIT: While /boot/grub/menu.lst is correct (the 0th entry is 3.19), on reboot and holding Shift to get the manual menu, I do not see the 3.19 kernel, and the top entry is the 3.16 kernel.

2 Answers2

2

It looks like upgrade process from 14.10 to 15.04 has a bug. Kernel does not install correctly. This can be fixed by running:

sudo apt-get install linux-generic

This will pull both linux-image-generic and linux-headers-generic.

These meta packages always point to the latest kernel image and headers.

This is not the first question with this kind of a problem.

Pilot6
  • 92,041
0

fixed mine with:

uname -r
3.13.0-30-generic

sudo apt-get update
sudo apt-get dist-upgrade
reboot

uname -r
3.13.0-30-generic

??

sudo apt-get install linux-image-generic
sudo reboot

uname -r
3.19.0-18-generic

followed by:

sudo /etc/init.d/vboxdrv setup