Module-assistant and nVidia
I've found it a big pain that Debian typically upgrades its kernels without upgrading commonly-used kernel modules at the same time. The result is that I have only a text login after the next reboot. Now I've found a relatively painless solution that works well every time.
A general upgrade through the package manager will install a new kernel automatically, even though I have kernel modules installed that are not being upgraded, and which won't work with the new kernel. The problem is usually with the nVidia kernel module, and the nVidia driver in the X server (Xorg) requires the kernel module in order to function, so the X server consistently gives up with an error, and gdm is disabled.
The solution, I've found, is to use module-assistant to rebuild the module from source every time I have a kernel upgrade. The command is simple:
sudo module-assistant auto-install nvidia
This does all the work of downloading and installing the right kernel-headers package, building the module as a package, and installing the resulting package. At this point, I can either reboot, or use modprobe to load the module and restart gdm.
Ideally, I want to use module-assistant before rebooting into the new kernel, because usually I don't notice that there's going to be a problem until after I reboot, which of course is often a long time after I did the upgrade. Running module-assistant under the old kernel requires you to specifiy the new kernel version as a parameter, like this:
sudo module-assistant auto-install -l version nvidia
where version is the version of the new kernel you are installing. It is the same as appears at the end of the name of the
linux-image- package, eg
A nice benefit of using module-assistant is that the kernel module shows up in the list of installed packages, and doesn't cause problems when Debian finally comes up with their own package to match the latest kernel.