0

Ok so I am not sure what to do, my boot was full and I cleaned it up by manually removing the old kernals and then ran sudo apt-get -f install to fix dependency or so I thought, during that process it tried to install the next kernal or something and ran out of space, Now my /boot is full but it doesn't appear there is anything for me to clean. Please help this is an emergency.

Here is the results of: uname -r

4.4.0-206-generic

So then I ran this:

dpkg -l linux-image-* | awk '/ii/{print $2}'

Which gave me:

linux-image-4.4.0-200-generic
dclarke@NASBUBUNTU:~$ dpkg --list 'linux-image*' | grep ^ii
ii  linux-image-4.4.0-200-generic          4.4.0-200.232 amd64        Signed kernel image generic

So I tried to remove 200 by running this:

sudo apt-get remove linux-image-4.4.0-200-generic

Which gave me this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  linux-image-unsigned-4.4.0-200-generic
Suggested packages:
  fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools
The following packages will be REMOVED:
  linux-image-4.4.0-200-generic linux-modules-extra-4.4.0-200-generic
The following NEW packages will be installed:
  linux-image-unsigned-4.4.0-200-generic
0 upgraded, 1 newly installed, 2 to remove and 114 not upgraded.
1 not fully installed or removed.
Need to get 7,051 kB of archives.
After this operation, 156 MB disk space will be freed.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-image-unsigned-4.4.0-200-generic amd64 4.4.0-200.232 [7,051 kB]
Fetched 7,051 kB in 0s (10.6 MB/s)
(Reading database ... 194153 files and directories currently installed.)
Removing linux-modules-extra-4.4.0-200-generic (4.4.0-200.232) ...
Removing linux-image-4.4.0-200-generic (4.4.0-200.232) ...
/etc/kernel/prerm.d/dkms:
DKMS: Starting autoremove for kernel: 4.4.0-200-generic
DKMS: removing: rapidrecovery-vss 6.1.3.100 (4.4.0-200-generic) (x86_64)

cp: error writing '/boot/initrd.img-4.4.0-200-generic.old-dkms': No space left on device /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-4.4.0-200-generic /etc/kernel/postrm.d/x-grub-legacy-ec2: Searching for GRUB installation directory ... found: /boot/grub Searching for default file ... found: /boot/grub/default Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst Searching for splash image ... none found, skipping ... Found kernel: /vmlinuz-4.4.0-206-generic Found kernel: /vmlinuz-4.4.0-201-generic Found kernel: /vmlinuz-4.4.0-200-generic Replacing config file /run/grub/menu.lst with new version Found kernel: /vmlinuz-4.4.0-206-generic Found kernel: /vmlinuz-4.4.0-201-generic Replacing config file /run/grub/menu.lst with new version Updating /boot/grub/menu.lst ... done

/etc/kernel/postrm.d/zz-update-grub: Generating grub configuration file ... Found linux image: /boot/vmlinuz-4.4.0-206-generic Found initrd image: /boot/initrd.img-4.4.0-206-generic Found linux image: /boot/vmlinuz-4.4.0-201-generic done Selecting previously unselected package linux-image-unsigned-4.4.0-200-generic. (Reading database ... 189722 files and directories currently installed.) Preparing to unpack .../linux-image-unsigned-4.4.0-200-generic_4.4.0-200.232_amd64.deb ... Unpacking linux-image-unsigned-4.4.0-200-generic (4.4.0-200.232) ... Setting up linux-image-4.4.0-201-generic (4.4.0-201.233) ... I: /initrd.img is now a symlink to boot/initrd.img-4.4.0-201-generic Setting up linux-image-unsigned-4.4.0-200-generic (4.4.0-200.232) ... I: /vmlinuz.old is now a symlink to boot/vmlinuz-4.4.0-201-generic I: /vmlinuz is now a symlink to boot/vmlinuz-4.4.0-200-generic I: /initrd.img is now a symlink to boot/initrd.img-4.4.0-200-generic Processing triggers for linux-image-4.4.0-201-generic (4.4.0-201.233) ... /etc/kernel/postinst.d/dkms: DKMS: Starting post-install script on kernel 4.4.0-201-generic DKMS: Error: Linux headers are missing, Will not continue autoinstall process. Please install the linux-headers-4.4.0-201-generic package and run command '/usr/lib/dkms/dkms_autoinstaller 4.4.0-201-generic' manually. /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-4.4.0-201-generic W: mdadm: /etc/mdadm/mdadm.conf defines no arrays. /etc/kernel/postinst.d/x-grub-legacy-ec2: Searching for GRUB installation directory ... found: /boot/grub Searching for default file ... found: /boot/grub/default Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst Searching for splash image ... none found, skipping ... Found kernel: /vmlinuz-4.4.0-206-generic Found kernel: /vmlinuz-4.4.0-201-generic Replacing config file /run/grub/menu.lst with new version Found kernel: /vmlinuz-4.4.0-206-generic Found kernel: /vmlinuz-4.4.0-201-generic Found kernel: /vmlinuz-4.4.0-200-generic Replacing config file /run/grub/menu.lst with new version Updating /boot/grub/menu.lst ... done

/etc/kernel/postinst.d/zz-update-grub: Generating grub configuration file ... Found linux image: /boot/vmlinuz-4.4.0-206-generic Found initrd image: /boot/initrd.img-4.4.0-206-generic Found linux image: /boot/vmlinuz-4.4.0-201-generic Found initrd image: /boot/initrd.img-4.4.0-201-generic Found linux image: /boot/vmlinuz-4.4.0-200-generic sed: couldn't flush stdout: No space left on device run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 4 dpkg: error processing package linux-image-4.4.0-201-generic (--configure): subprocess installed post-installation script returned error exit status 1 Processing triggers for linux-image-unsigned-4.4.0-200-generic (4.4.0-200.232) ... /etc/kernel/postinst.d/dkms: DKMS: Starting post-install script on kernel 4.4.0-200-generic Warning: Unable to find an initial ram disk that I know how to handle. Will not try to make an initrd. /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-4.4.0-200-generic W: mdadm: /etc/mdadm/mdadm.conf defines no arrays. cat: write error: No space left on device update-initramfs: failed for /boot/initrd.img-4.4.0-200-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-unsigned-4.4.0-200-generic (--configure): subprocess installed post-installation script returned error exit status 1 E: Sub-process /usr/bin/dpkg returned an error code (1)

If I simply try to run:

sudo apt-get autoremove

I get the following:

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 114 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-4.4.0-201-generic (4.4.0-201.233) ...
I: /initrd.img.old is now a symlink to boot/initrd.img-4.4.0-201-generic
Setting up linux-image-unsigned-4.4.0-200-generic (4.4.0-200.232) ...
I: /initrd.img is now a symlink to boot/initrd.img-4.4.0-200-generic
Processing triggers for linux-image-4.4.0-201-generic (4.4.0-201.233) ...
/etc/kernel/postinst.d/dkms:
DKMS: Starting post-install script on kernel 4.4.0-201-generic
DKMS: Error: Linux headers are missing, Will not continue autoinstall process.
      Please install the linux-headers-4.4.0-201-generic package and run command '/usr/lib/dkms/dkms_autoinstaller 4.4.0-201-generic' manually.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.4.0-201-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
cat: write error: No space left on device
update-initramfs: failed for /boot/initrd.img-4.4.0-201-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-4.4.0-201-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for linux-image-unsigned-4.4.0-200-generic (4.4.0-200.232) ...
/etc/kernel/postinst.d/dkms:
DKMS: Starting post-install script on kernel 4.4.0-200-generic
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.4.0-200-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
cat: write error: No space left on device
update-initramfs: failed for /boot/initrd.img-4.4.0-200-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-unsigned-4.4.0-200-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-4.4.0-201-generic
 linux-image-unsigned-4.4.0-200-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any help would be greatly appreciated.

Thanks in advance.

Charles Green
  • 21,339

1 Answers1

0

Ok it appears my issues was actually all the old initrd.img files left in /boot even after I cleaned up the old kernels I was still only getting 5% of my /boot back. When I looked at the /boot drive with ls I noticed several dozen old initrdimg files and followed the following post to help fix

Is there unused `initrd.img` to remove?

I now have 82% on my /boot :)

Thanks