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-grub
d, 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.
uname
probably (technically) isn't giving you the wrong value; That's saying that you're running kernel version 3.16 and not 3.19. Have you restarted the VM since the upgrade? – saiarcot895 May 15 '15 at 2:32linux-image-3.16.0-31-generic
andlinux-image-extra-3.16.0-31-generic
. That way, your VM will be forced to boot the latest kernel. – saiarcot895 May 15 '15 at 2:40update-grub
can after booting into 3.16. I already tried purging/reinstalling grub to no avail. – imallett May 15 '15 at 2:56