This is a result of using dpkg (or apt-get) for command line package management instead of aptitude, which is the upstream recommended command line package manager. Neither dpkg and apt-get handle dependencies nearly as gracefully as aptitude. Dpkg was never intended to do so. Apt-get does have better dependency handling, but aptitude was written in part to significantly improve dependency handling over apt-get. Synaptic by default uses apt-get, in part because of the installed base of machines that have exclusively used apt-get in the past. (IMHO, it's time to fix Synaptic.) The upstream Debian Manual is recommending that everyone switch to aptitude. (For a more complete analysis, see Larry Garfield's excellent article at http://www.garfieldtech.com/blog/your-debian-aptitude
But I digress. To fix your issue, try the following:
1. Become root, update aptitude, and sync dpkg and apt:
yourname@yourhost:/~# sudo -s
root@yourhost: /~# aptitude update
root@yourhost: /~# sync-available
2. Reinstall linux-image-2.6.22-12-generic and linux-ubuntu-modules-2.6.22-12-generic:
root@yourhost: /~# aptitude install linux-image-2.6.22-12-generic linux-ubuntu-modules-2.6.22-12-generic
You will need to read carefully the messages from aptitude, which provides much more helpful information that you are probably accustomed to using dpkg or apt-get. Aptitude will try to identify and solve dependency problems with your installation. If you have been using dpkg and/or apt-get on a machine for a while, you will likely have some, so ensure that you understand what it's doing.
3. Then purge both:
root@yourhost: /~# aptitude purge linux-image-2.6.22-12-generic linux-ubuntu-modules-2.6.22-12-generic
Again, read the screen. In this case, there will likely be some dependencies that need fixing. Aptitude will suggest solutions. Read and think about the choices it gives you. If you don't like the choice suggested, tell it and it will try to come up with another.
4. After you are done, EXIT ROOT and the terminal:
root@yourhost: /~# exit
Report back on if this fixes your issues.