I ran an apt-get update
/ upgrade
on a server I don't know before. The apt-get update
hadn't been done since a long time (a year I guess..).
The second mistake is that I didn't check /etc/apt/sources.list
before running the upgrade: unfortunately there was a reference to the sid repository! (this is a prod server serving apache / PHP apps..)
I've removed the sid reference and changed it to squeeze: now my sources list is (OK, this is a mess but I'm afraid to break this production server so any good advice is welcome.)
deb ftp://mirror.hetzner.de/debian/packages lenny main contrib non-free
deb ftp://mirror.hetzner.de/debian/security lenny/updates main contrib non-free
deb http://ftp.uni-bayreuth.de/linux/Debian/debian/ lenny main non-free contrib
deb-src http://ftp.uni-bayreuth.de/linux/Debian/debian/ lenny main non-free contrib
deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free
deb ftp://ftp.fr.debian.org/debian squeeze main
deb-src ftp://ftp.fr.debian.org/debian squeeze main
Now I cant complete the upgrade process.
apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 97 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up linux-image-2.6.26-2-amd64 (2.6.26-29) ...
Running depmod.
Failed to find suitable ramdisk generation tool for kernel version
2.6.26-2-amd64 on running kernel 2.6.26-2-amd64 in mkinitramfs-kpkg mkinitrd.yaird
dpkg: error processing linux-image-2.6.26-2-amd64 (--configure):
subprocess post-installation script returned error exit status 127
Errors were encountered while processing:
linux-image-2.6.26-2-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
I've made a lot of search on Google and so on for this issue and never found a solution.