Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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  lenny          main contrib non-free
deb  lenny/updates  main contrib non-free

deb  lenny  main non-free contrib
deb-src  lenny  main non-free contrib

deb  lenny/updates  main contrib non-free
deb-src  lenny/updates  main contrib non-free

deb squeeze main
deb-src 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:
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.

share|improve this question
up vote 2 down vote accepted

If I understood this right, you can try to download initramfs-tools .deb file and install it with dpkg. Then re-run apt-get install -f.

share|improve this answer
thank you ! now its ok ! – matt Mar 19 '12 at 13:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.