Problem:

If you have been playing around with your Debian system for a long time i.e. installing, purging, un-installing and re-installing them again you might end up in a situation where anytime you run a program, for example splashy, which triggers the initramfs-tools you might end up with the following message:

Processing triggers for initramfs-tools ...
/boot/initrd.img-2.6.30-mycustom does not exist. Cannot update.

So basically what happened in the above case is that I had uninstall a custom kernel package, linux-image-2.6.30-mycustom, long time back but for some reasons it seems that initramfs keeps referring to it and it tries to update the initrd file (initrd.img-2.6.30-mycustom) for my 2.6.30-mycustom kernel but the initrd file did not exist on my system since we removed the corresponding kernel package.

Solution:

So what I did was I initiated a system wide search for the references to this initrd file and I found the following location where the initrd file was indeed referenced:

debian:~# ls -l /var/lib/initramfs-tools/
total 4
-rw-r--r-- 1 root root 100 2010-01-29 17:12 2.6.30-mycustom

Inspecting the contents of this file:

debian:~# less /var/lib/initramfs-tools/2.6.30-mycustom
57e653360d455ed42efd756a41877e87c9f7fcff  /boot/initrd.img-2.6.30-mycustom

I am really not sure what the long number (probably a hex value?) means but it seems that the presence of this file was the main culprit.  So i decided to remove the file:

debian:~#rm /var/lib/initramfs-tools/2.6.30-mycustom

Note: You might want to back this file up before you try to remove it.

After that when I tried to install a program like splashy or bootcd-mkinitramfs which triggers the update-initramfs utility, it did not complain about the missing initrd.img file any more:

# apt-get install splashy
# apt-get install bootcd-mkinitramfs

Don’t know what caused to bring my system to this state on inconsistency but over a period of time if you keep experimenting (and I love it) with your system chances are you might end up in a situation like this.

That’s it.

Be Sociable, Share!