After upgrading to 15.04, I need to have kernel headers matching the running kernel (for another package).
The upgrade installed kernel 3.19.0-17. Just in case, I also installed linux-headers-generic
. Then, I ran sudo update-grub
and rebooted. Yet, the system booted into kernel 3.16.0-31 (as confirmed by uname -r
).
After much digging, I found that GrUB recognizes the 3.19 kernel in update-grub
and even populates it into /boot/grub/menu.lst
. However, on startup, GrUB only recognizes up to the 3.16 kernel in the boot menu. How do I fix this, so that GrUB can boot into 3.19?
Here are some outputs from my current system.
sudo update-grub
always produces the following output:
$ sudo update-grub
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-3.19.0-17-generic
Found kernel: /boot/vmlinuz-3.16.0-31-generic
Found kernel: /boot/vmlinuz-3.13.0-40-generic
Found kernel: /boot/vmlinuz-3.11.0-19-generic
Found kernel: /boot/vmlinuz-3.8.0-35-generic
Found kernel: /boot/memtest86+.bin
Found kernel: /boot/vmlinuz-3.19.0-17-generic
Found kernel: /boot/vmlinuz-3.16.0-31-generic
Found kernel: /boot/vmlinuz-3.13.0-40-generic
Found kernel: /boot/vmlinuz-3.11.0-19-generic
Found kernel: /boot/vmlinuz-3.8.0-35-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
Opening /boot/grub/menu.lst
after running update-grub
, the very first option is:
title Ubuntu 15.04, kernel 3.19.0-17-generic
uuid ac9d0eaf-e090-4c29-8e7b-30e98ed07d29
kernel /boot/vmlinuz-3.19.0-17-generic root=UUID=ac9d0eaf-e090-4c29-8e7b-30e98ed07d29 ro quiet splash
initrd /boot/initrd.img-3.19.0-17-generic
But, holding Shift during boot, there is no option to choose 3.19 (although I can choose any of the others). After startup, uname -r
confirms it booted into 3.16:
$ uname -r
3.16.0-31-generic
Output cropped from a dpkg -l
, showing that the 3.19 kernel is indeed installed:
ii linux-headers-3.19.0-17 3.19.0-17.17 all Header files related to Linux kernel version 3.19.0
ii linux-headers-3.19.0-17-generic 3.19.0-17.17 amd64 Linux kernel headers for version 3.19.0 on 64 bit x86 SMP
ii linux-headers-generic 3.19.0.17.16 amd64 Generic Linux kernel headers
I have also tried purge/reinstalling grub and the headers, and some other things that amounted to no consequence.
linux-image-*
packages are more important than thelinux-headers-*
packages./boot/grub/menu.lst
, but instead have a/boot/grub/grub.cfg
, which seems to get updated instead. The man page forupdate-grub
suggests that it callsgrub-mkconfig
, telling it to output the data to/boot/grub/grub.cfg
. Do you have a file named/boot/grub/grub.cfg
, and does it not have the newer kernel?linux-image-3.19.0-17-generic
is also present in thedpkg
listing. I do have agrub.cfg
file, and it indeed lacks the 3.19 record./boot/grub/menu.lst
and/boot/grub/default
(if the latter exists) and runupdate-grub
again. Check to see if/boot/grub/grub.cfg
now contains the 3.19 record.