I am working VM which I haven't administered in the past and it is in a bad state (but I need to rescue it). I am not a linux expert but in the past 5 years I have been able to fix problems by using google. After a complete day yesterday I dunno what else to do then asking dumb questions by just stating my problem.
- The system won't do a regular boot (I can however open a rescue root shell in which I can mount the file system and enable networking to some degree (I can reach outside networks but I cannot open port 22 or start an ssh deamon - I can however start apache and open port 80)
- I cannot install or remove software since dpkg always complains about old linux header images (I think a former administrator has deleted manually linux headers from the boot partition to make space.)
- Now each time I try to do apt-get install or remove or upgrade or whatever it complains that there where too many errors in dkpg and especially there where errors with some old linux images (which are not present on my boot partition) and it aborts. It also complains of not finding files (related to the old linux headers)
- I found one instruction that suggested to reinstall grub2 which I followed through. I think removing worked but installing broke in the same way as not other software can be installed. I am pretty confident the next time I wan't to restart the machine I will not even be able to enter a rescue system because grub2 seems to be uninstalled.
- I cannot do something like
apt-get install linux-image-generic
I understand that this post does not even bare a proper question but I don't even know how to formulate one. There seem to be so many things broken that obviously I kind of lost track of where to start.
edit
output of dpkg --get-selections
: http://pastebin.com/CRFaaJ7m
output of apt-get install linux-generic
: http://pastebin.com/7t20Bavu
output of dpgk --configure -a
: http://pastebin.com/Hpmch9dM
also I think the output might be interesting (especially starting at line 484): http://pastebin.com/uUi86FtT
apt-get install linux-image-generic
anddpkg --get-selections
and add both to the question, so we know its current state.apt-get -s -yy install linux-generic 2>&1 | tee output.txt
of you can get the outputls -l /boot/vmlinuz* /boot/initrd*