1

Apologies, I am aware this is a common question, but I have tried numerous things and still can't get my system to update due to 100% usage of boot disk.

I have no idea what to do.

uname -r = 3.16.0-62-generic

$ df -h
Filesystem                   Size  Used Avail Use% Mounted on
udev                         4.9G   12K  4.9G   1% /dev
tmpfs                        988M  1.4M  987M   1% /run
/dev/mapper/ubuntu--vg-root  107G   62G   40G  62% /
none                         4.0K     0  4.0K   0% /sys/fs/cgroup
none                         5.0M     0  5.0M   0% /run/lock
none                         4.9G   78M  4.8G   2% /run/shm
none                         100M   32K  100M   1% /run/user
/dev/sda2                    237M  225M     0 100% /boot
/dev/sda1                    511M  3.4M  508M   1% /boot/efi

If I try sudo apt-get autoremove, I see:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 83 not to upgrade.
7 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-3.16.0-62-generic (3.16.0-62.83~14.04.1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Not updating initrd symbolic links since we are being     updated/reinstalled 
(3.16.0-62.82~14.04.1 was configured last, according to dpkg)
Not updating image symbolic links since we are being updated/reinstalled 
(3.16.0-62.82~14.04.1 was configured last, according to dpkg)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-    62-generic /boot/vmlinuz-3.16.0-62-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.16.0-62-generic /boot/vmlinuz-3.16.0-62-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-62-generic /boot/vmlinuz-3.16.0-62-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-62-generic
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.16.0-62-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.16.0-62-generic.postinst line 1025.
dpkg: error processing package linux-image-3.16.0-62-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-3.16.0-62-generic:
 linux-image-extra-3.16.0-62-generic depends on linux-image-3.16.0-62-generic; however:
  Package linux-image-3.16.0-62-generic is not configured yet.

dpkg: error processing package linux-image-extra-3.16.0-62-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic-lts-utopic:
 linux-image-generic-lts-utopic depends on linux-image-3.16.0-62-generic; however:
  Package linux-image-3.16.0-62-generic is not configured yet.
 linux-image-generic-lts-utopic depends on linux-image-extra-3.16.0-62-generic; however:
  Package linux-image-extra-3.16.0-62-generic is not configured yet.

dpkg: error processing package linux-image-generic-lts-utopic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-utopic:
 linux-generic-lts-utopic depends on linux-image-generic-
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                                                                   No apport report written because the error message indicates it's a follow-up error from a previous failure.
                                                                         No apport report written because MaxReports has already been reached
                                   No apport report written because MaxReports has already been reached
 No apport report written because MaxReports has already been reached
                                                                     No apport report written because MaxReports has already been reached
                               lts-utopic (= 3.16.0.62.53); however:
  Package linux-image-generic-lts-utopic is not configured yet.

dpkg: error processing package linux-generic-lts-utopic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-image-3.16.0-62-generic:
     linux-signed-image-3.16.0-62-generic depends on linux-image-3.16.0-62-generic (= 3.16.0-62.83~14.04.1); however:
  Package linux-image-3.16.0-62-generic is not configured yet.
 linux-signed-image-3.16.0-62-generic depends on linux-image-extra-3.16.0-62-generic (= 3.16.0-62.83~14.04.1); however:
  Package linux-image-extra-3.16.0-62-generic is not configured yet.

dpkg: error processing package linux-signed-image-3.16.0-62-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-image-generic-lts-utopic:
 linux-signed-image-generic-lts-utopic depends on linux-signed-image-3.16.0-62-generic; however:
  Package linux-signed-image-3.16.0-62-generic is not configured yet.

dpkg: error processing package linux-signed-image-generic-lts-utopic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-signed-generic-lts-utopic:
 linux-signed-generic-lts-utopic depends on linux-signed-image-generic-lts-utopic (= 3.16.0.62.53); however:
  Package linux-signed-image-generic-lts-utopic is not configured yet.

dpkg: error processing package linux-signed-generic-lts-utopic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-3.16.0-62-generic
 linux-image-extra-3.16.0-62-generic
 linux-image-generic-lts-utopic
 linux-generic-lts-utopic
 linux-signed-image-3.16.0-62-generic
 linux-signed-image-generic-lts-utopic
 linux-signed-generic-lts-utopic
    N: Ignoring file 'trillian.list.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'trillian.list.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
E: Sub-process /usr/bin/dpkg returned an error code (1)`
Kalle Richter
  • 6,180
  • 21
  • 70
  • 103
taffer
  • 13
  • 4
  • try sudo apt-get clean then sudo apt-get update anf finally sudo apt-get install -f – Pascal Fares Mar 24 '16 at 09:08
  • The outcome is the same. – taffer Mar 24 '16 at 09:09
  • Would you please add the output of the command "df -h"? – EnzoR Mar 24 '16 at 09:15
  • i think the reason is /dev/sda2 237M 225M 0 100% /boot (the /boot i full) if you havemany kernel try to clean old ones before – Pascal Fares Mar 24 '16 at 09:25
  • Provide the output of "ls -l /boot". The only easy option here is to thin it out by removing older and possibly not needed kernel images. 225 MB should be more then enough for a kernel or two. It looks like there are quire more. Without some repartitioning, you'll need to keep an eye on the content of that fs. – EnzoR Mar 24 '16 at 09:28
  • Have you tried this? – jarno Mar 24 '16 at 11:27

1 Answers1

1

It's probably because too many kernels are installed on your system.

So, you have to remove the old kernel images via dpkg.

  1. Detect no longer required kernels:

    dpkg -l 'linux-[ihs]*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\([-0-9]*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'

  2. After the check if the correct kernel versions were detected, you can remove them:

    dpkg -l 'linux-[ihs]*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\([-0-9]*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo dpkg -P

  3. Afterwards you should check if corrupt or incomplete packages exist:

    dpkg -l linux-[ihs]* | sed '1,6d'| grep -vE '^ii|^un|^rc'

  4. In case the stdout is not empty you should install the corrupt/incomplete packages:

    sudo apt-get -f install

(The commands are from the German Wiki Ubuntuusers.de. I used them in the past too and they worked fine for me.)

Aliquis
  • 168