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.
- Can't purge old kernels - boot at 100%
- My /boot partition hit 100% and now I can't upgrade. Can't remove old kernels to make room
- Manually cleaned up old kernels because /boot full, still can't run apt-get -f install
- apt-get won't run; /boot is full
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
uname -r
andls /boot
) – Zanna Aug 03 '17 at 06:40(ls /boot ; ls /lib/modules; sudo update-grub) | pastebinit
and give the link? – Zanna Aug 03 '17 at 07:31I 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 03 '17 at 10:23