After upgrading one of my desktops from Ubuntu Jaunty 9.04 to Karmic 9.10, I was left with a system that wouldn’t boot. Dynamic Kernel Module Support (DKMS) was not rebuilding the existing NVIDIA and Virtual Box modules that were in place before the upgrade. A scan through the system logs led to the conclusion that the kernel headers were not installed as part of the kernel image upgrade.
The solution seemed obvious–install the missing kernel headers and manually rebuild the modules. I went into recovery mode, installed the kernel headers, rebuilt the NVIDIA and Virtual Box modules and rebooted. The system came back up and all was well. This all changed when the next set of updates were applied to the system. I was right back where I started with a non-bootable system.
A little investigation on the web and I found the problem. The linux-headers-generic package was missing. I opened a terminal and executed the following:
sudo apt-get install linux-headers-generic
Now every time a kernel update comes down, the kernel headers are automatically updated and the kernel modules get rebuilt as expected. One question remains, why was the generic headers package removed during the upgrade?