I'm running Debian 8 Jessie with kernel 4.1.20 from kernel.org. For some reason when I do update-initramfs -u it tells me the following: /boot/initrd.img-4.4.4 does not exist. Cannot update. For some reason it selects kernel 4.4.4 even though the only kernel I have installed is 4.1.20. When I do an apt-get upgrade and a packages tries to update it it tells me the same thing so I have to manually update it after all the packages get upgraded. I looked in the config but I can't really figure out why it's selecting the wrong kernel.


I ran into the same problem on Xenial by updating it with update-manager. Check /var/lib/initramfs-tools/ to see if it has the wrong kernel version:

$ ls -al /var/lib/initramfs-tools/
insgesamt 20
drwxr-xr-x  2 root root 4096 Sep 28 15:26 .
drwxr-xr-x 62 root root 4096 Sep  3 20:10 ..
-rw-r--r--  1 root root   76 Sep  3 20:38 4.4.0-36-generic
-rw-r--r--  1 root root   76 Sep 28 14:06 4.4.0-38-generic
-rw-r--r--  1 root root   80 Sep 29 14:21 linux-image-4.4.0-22

The last entry was giving me the depmod error; after I removed it, no problems.

  • This is a really old question and as a result I haven't had this issue in quite a while although not because I fixed it, I still don't know what the issue is. It just kinda stopped at some point when I updated my kernel...however if I ever run into it again I'll check out that directory. Since it does have a file named my kernel version in it I'm hoping that was the issue. – Scoopta Sep 29 '16 at 16:21
  • Yes, you are right. I read that the post is from august. Sorry – user192526 Sep 29 '16 at 20:08
  • yea but that's ok because if I run into the issue again I have something to try – Scoopta Sep 29 '16 at 20:49
  • I can confirm that this works for me (Ubuntu 16.04) – Phil Jan 5 '18 at 16:02

From the man pages of update-initramfs

-k  version
              Set  the  specific  kernel  version for whom the initramfs will be generated.  For example the output of uname -r for your currently
              running kernel.  This argument is optional for update. The default is the latest kernel version.

              The use of "all" for the version string specifies update-initramfs to execute the chosen action for all kernel  versions,  that  are
              already known to update-initramfs.

So, try to update the initramfs with -k switch

  • That totally works and as I said after an apt-get upgrade finishes I manually update my ramfs by doing just that although that doesn't fix the issue. I don't want to have to update my ramfs after apt fails to do it. I'm looking to have it default to my actual kernel version so apt can automatically update it as needed. – Scoopta Apr 4 '16 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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