I am trying to install the latest kernel, but when I run

sudo apt-get -f install linux-image-4.4.0-78-generic linux-image-extra-4.4.0-78-generic

I get this error :

Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-image-4.4.0-78-generic is already the newest version (4.4.0-78.99).
linux-image-4.4.0-78-generic set to manually installed.
linux-image-extra-4.4.0-78-generic is already the newest version (4.4.0-78.99).
linux-image-extra-4.4.0-78-generic set to manually installed.
The following packages will be REMOVED:
0 to upgrade, 0 to newly install, 1 to remove and 76 not to upgrade.
5 not fully installed or removed.
After this operation, 153 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 193286 files and directories currently installed.)
Removing linux-image-extra-4.4.0-71-generic (4.4.0-71.92) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-71-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-71-generic /boot/vmlinuz-4.4.0-71-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-71-generic /boot/vmlinuz-4.4.0-71-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-71-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
depmod: WARNING: could not open /var/tmp/mkinitramfs_dPzLCV/lib/modules/4.4.0-71-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_dPzLCV/lib/modules/4.4.0-71-generic/modules.builtin: No such file or directory

And it seems to get stuck indefinitely...could anyone tell me how I can debug this, or recover from it?


edit: /boot isn't full, its got 254Mb free space

edit2: the problem seems to be with update-initramfs, when I run sudo update-initramfs -u its stuck indefinitely

marked as duplicate by Eric Carvalho, Zanna, Sumeet Deshmukh, Kaz Wolfe, Anwar May 23 '17 at 7:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Why are you installing kernels this way instead of the normal way? And why do you have 76 packages not upgraded? – user535733 May 22 '17 at 23:34
  • Hiya, I've checked /boot and its got 41% free space (254Mb). There are 76 packages not upgraded, because I'm unable to do 'apt-get upgrade'...unattended-upgrades got stuck at this step (removing linux-image-extra-4.4.0-71') and I've been trying to fix it ever since :( – teikjoon May 22 '17 at 23:49
  • You could try using aptitude, its problem resolution capability is pretty darn good. Just sudo aptitude then press u to update. It will list suggestions for problems it finds at the bottom in red. You can step through all the suggestions or apply one by pressing the appropriate key listed at the bottom. It cannot fix everything but it's pretty good. – Organic Marble May 23 '17 at 0:36

Browse other questions tagged or ask your own question.