2

I have an issue where I can't install anything new due to my /boot being full. I've been through the fixes below, but every time I run apt-get -f install, apt-get autoremove, apt-get purge it always re-creates the initrd.img-4.4.0-*-generic files which are ~35MB each and fills the /boot up again.

The full output when I run apt-get -f install after I delete data from /boot. Maybe I'm a little lost when I do this because there's too much information in it.

root@NIC-WEB01:/boot# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 125 not to upgrade.
9 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-firmware (1.157.11) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-79-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
update-initramfs: Generating /boot/initrd.img-4.4.0-78-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
update-initramfs: Generating /boot/initrd.img-4.4.0-75-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
update-initramfs: Generating /boot/initrd.img-4.4.0-72-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
update-initramfs: Generating /boot/initrd.img-4.4.0-71-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
update-initramfs: Generating /boot/initrd.img-4.4.0-70-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
update-initramfs: Generating /boot/initrd.img-4.4.0-66-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
update-initramfs: Generating /boot/initrd.img-4.4.0-64-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
update-initramfs: Generating /boot/initrd.img-4.4.0-63-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
update-initramfs: Generating /boot/initrd.img-4.4.0-38-generic
WARNING: missing /lib/modules/4.4.0-38-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-38-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
depmod: WARNING: could not open /var/tmp/mkinitramfs_R5U52Z/lib/modules/4.4.0-38-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_R5U52Z/lib/modules/4.4.0-38-generic/modules.builtin: No such file or directory
Setting up linux-image-4.4.0-87-generic (4.4.0-87.110) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-83-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-87-generic /boot/vmlinuz-4.4.0-87-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-87-generic /boot/vmlinuz-4.4.0-87-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-87-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-87-generic /boot/vmlinuz-4.4.0-87-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-87-generic /boot/vmlinuz-4.4.0-87-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-87-generic /boot/vmlinuz-4.4.0-87-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-87-generic
Found initrd image: /boot/initrd.img-4.4.0-87-generic
Found linux image: /boot/vmlinuz-4.4.0-83-generic
done
Setting up linux-image-extra-4.4.0-87-generic (4.4.0-87.110) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-87-generic /boot/vmlinuz-4.4.0-87-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-87-generic /boot/vmlinuz-4.4.0-87-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-87-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-87-generic /boot/vmlinuz-4.4.0-87-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-87-generic /boot/vmlinuz-4.4.0-87-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-87-generic /boot/vmlinuz-4.4.0-87-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-87-generic
Found initrd image: /boot/initrd.img-4.4.0-87-generic
Found linux image: /boot/vmlinuz-4.4.0-83-generic
done
Setting up linux-image-generic (4.4.0.87.93) ...
Setting up linux-generic (4.4.0.87.93) ...
Setting up linux-image-4.4.0-83-generic (4.4.0-83.106) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-83-generic /boot/vmlinuz-4.4.0-83-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-83-generic /boot/vmlinuz-4.4.0-83-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-83-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-83-generic /boot/vmlinuz-4.4.0-83-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-83-generic /boot/vmlinuz-4.4.0-83-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-83-generic /boot/vmlinuz-4.4.0-83-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-87-generic
Found initrd image: /boot/initrd.img-4.4.0-87-generic
Found linux image: /boot/vmlinuz-4.4.0-83-generic
Found initrd image: /boot/initrd.img-4.4.0-83-generic
done
Setting up linux-image-extra-4.4.0-79-generic (4.4.0-79.100) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-79-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-79-generic /boot/vmlinuz-4.4.0-79-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-79-generic /boot/vmlinuz-4.4.0-79-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-79-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-79-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-79-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up linux-image-extra-4.4.0-83-generic (4.4.0-83.106) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-83-generic /boot/vmlinuz-4.4.0-83-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-83-generic /boot/vmlinuz-4.4.0-83-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-83-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-83-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-83-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up nginx-core (1.10.3-0ubuntu0.16.04.2) ...
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
invoke-rc.d: initscript nginx, action "start" failed.
dpkg: error processing package nginx-core (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-4.4.0-79-generic
 linux-image-extra-4.4.0-83-generic
 nginx-core
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any help would be fantastic, I need my apt-get! :P

closed as off-topic by Zanna, karel, Eric Carvalho, edwinksl, David Foerster Aug 8 '17 at 7:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This describes a problem that can't be reproduced that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – Zanna, karel, Eric Carvalho, edwinksl, David Foerster
If this question can be reworded to fit the rules in the help center, please edit the question.

  • any clue what mdadm is upset about? Are you using RAID of some kind? Could you tell us what commands you ran from the other answers? What kernel are you using now (perhaps show us uname -r and ls /boot) – Zanna Aug 3 '17 at 6:40
  • @Zanna I think you put your finger on my issue. When I ran uname -r it came up with: 4.4.0-63-generic .. And I have quite a few newer ones in there, -38, 63, 64, 66, 70, 71, 72, 75, 78, 79, 83, 87. How do I force the system to use the latest kernel?? Is it possible that because it's using an older version, I can't remove any of them? Also, this is a VM on Hyper-V, no RAID at all, so I don't know why MDM is complaining, all of that was handled by the automatic provisioning. (accidentally hit enter and submitted this too early..) – damian Aug 3 '17 at 6:44
  • The system should use the latest kernel by default, but perhaps the newer ones are unbootable, possibly because they have no working initrd or modules directory. Could you try to access the GRUB menu at boot time and see what options you have there, and try to boot the latest kernel to see what happens? I'm afraid I don't know anything about mdadm, but you might want to configure it to stop trying to assemble arrays or even remove it if you don't need it. Could you run (ls /boot ; ls /lib/modules; sudo update-grub) | pastebinit and give the link? – Zanna Aug 3 '17 at 7:31
  • Well! I ran those commands (pastebin.com/ddZB5Hvt), restarted, it pushed me up to 4.4.0-87-generic, I cleared out the initrd.img-* files from /boot again, ran a apt-get -f install and it cleared out the issues that were there (pastebin.com/2dj6cgJy). And now I can finally use apt-get again! Thanks so much Zanna! I also found a fix for the mdadm issue on another post, you can get it to ignore trying to hunt for the array. – damian Aug 3 '17 at 10:23
  • Oh that's great! Since it seems to have been fixed by reboot, I'll vote to close the question as a problem that can't be reproduced. Happy you fixed it :) – Zanna Aug 3 '17 at 10:28

Browse other questions tagged or ask your own question.