Recent releases of Ubuntu have migrated to GRUB2.
From the wiki:
Configuring GRUB 2
Important note: Configuration changes
are normally made to /etc/default/grub
and to the custom files located in
/etc/grub.d. The /boot/grub/grub.cfg
file should not be edited by the user;
changes to this file are made by
configuration scripts. After editing
/etc/default/grub, you need to run
sudo update-grub for your changes to
take effect on the next boot.
You are asking two questions: Why did it happen, and how do I fix it?
What should happen
When the package manager installs a new kernel, the script at /etc/kernel/postinst.d/apt-auto-removal marks the previous kernel for deletion the next time the package manager runs. It does work properly for most users most of the time.
The script is rather conservative. It doesn't delete all old kernels, and it errs on the side of leaving kernels in place rather that erroneously delete your current kernel or previous kernel (in case you need to revert). It doesn't scan to see all the kernels you have installed - it just uses the version numbers of the new and current kernels.
Why it didn't happen
There could have been a bug in the script, a different package management problem could have prevented the marking, several user actions could have remarked the package to manually-installed before deletion. The exact cause is unknown and possibly unknowable. It's all a rich tapestry.
How to fix it
Fixing is very easy. You need two pieces of information:
- The current kernel (use the command: uname -r)
- The other kernels installed (use the command: ls /boot)
Example:
$ uname -r
3.11.0-15-generic
$ ls /boot
abi-3.11.0-14-generic initrd.img-3.11.0-14-generic
abi-3.11.0-15-generic initrd.img-3.11.0-15-generic
config-3.11.0-14-generic System.map-3.11.0-14-generic
config-3.11.0-15-generic System.map-3.11.0-15-generic
extlinux vmlinuz-3.11.0-14-generic
grub vmlinuz-3.11.0-15-generic
Ignore all the file names. Look at all the version numbers. You can see from the example the there are two kernel versions installed:
- 3.11.0-14-generic (can be deleted)
- 3.11.0-15-generic (the running kernel - do NOT delete!)
So we can delete the old kernel:
sudo apt-get remove linux-image-3.11.0-14-generic
When a kernel is removed, the package manager will automatically remove all those files from /boot and update the grub menu.
Best Answer
Seems to be an issue with the file
/etc/grub.conf
. Removing the file and re-configuring seems to work: