I am under Debian 9.9 Stretch.

When I want to install new packets with dpkg -i, apt install or even when I am doing a apt-upgrade I got the following error:

Processing triggers for initramfs-tools (0.130) ...
update-initramfs: Generating /boot/initrd.img-4.9.0-9-amd64
Added Linux  +  *

Fatal: open /boot/vmlinuz-4.9.0-7-amd64: No such file or directory

run-parts: /etc/initramfs/post-update.d//runlilo exited with return code 1
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I don't understand why it looks for 4.9.0-7 since I have 4.9.0-9:

 $ uname -a
 Linux my_laptop 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u3 (2019-06-16) x86_64 GNU/Linux

It seems I also have 4.9.0-8 files:

$ ll boot/ | grep vmlinuz

I tried to install 4.9.0-7 headers (via synaptic package manager) but I ended up with the same error.

It seems I have broke something but I don't know how to fix this (without a full re-installation from scratch, which I'd like to avoid).

Any pointers ?

1 Answer 1


I actually found my answer here: https://superuser.com/a/1318064/329216

It seems the following command did the trick:

sudo apt install --reinstall linux-image-4.9.0-7-amd64

[EDIT] A year later I had similar issue, googled it and found my own post there... Except it did not work this time. Turns out my /etc/lilo.conf was outdated, pointing on old images. I did the following steps:

  • remove old images/kernels (do NOT remove the one matching uname -R) (still got the post-update lilo error at this point)
  • manually edit /etc/lilo.conf top point on last image
  • sudo liloconfig -u
  • sudo lilo
  • reboot
  • sudo apt dist-upgrade

Problem solved.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .