Boot partition full, can't remove kernels
Just before I dive into describing my issue, I just want to put out that I am quite new with Linux, so keep that in mind if I have not pointed out the obvious.
I have run into some issues with my Ubuntu server. Initially, I found that it was rebooting in a continuous loop. After forcing a power shutdown, and then removing the power cable, reconnecting and performed another boot, I was able to successfully boot the server. After some digging around, I believe the culprit to my server issues is that my boot partition is full.
Output of uname -r
3.16.0-41-generic
Output of cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/NUCmedia--vg-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sdb1 during installation
UUID=b81a82f4-5f78-4f1e-9aaf-711ce2eb08e8 /boot ext2 defaults 0 2
/dev/mapper/NUCmedia--vg-swap_1 none swap sw 0 0
/dev/NUCmedia-vg/NUCstorage /mnt/NUCStorage ext4 defaults 0 0
Output of df -h
:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/NUCmedia--vg-root 29G 8.2G 20G 30% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 3.9G 8.0K 3.9G 1% /dev
tmpfs 788M 1.9M 786M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 3.9G 88K 3.9G 1% /run/shm
none 100M 16K 100M 1% /run/user
/dev/sda1 236M 233M 0 100% /boot
/dev/mapper/NUCmedia--vg-NUCstorage 422G 206G 195G 52% /mnt/NUCStorage
Output of dpkg -l | grep linux-image
ii linux-image-3.16.0-33-generic 3.16.0-33.44~14.04.1 amd64 Linux kernel image for version 3.16.0 on 64 bit x86 SMP
ii linux-image-3.16.0-34-generic 3.16.0-34.47~14.04.1 amd64 Linux kernel image for version 3.16.0 on 64 bit x86 SMP
ii linux-image-3.16.0-36-generic 3.16.0-36.48~14.04.1 amd64 Linux kernel image for version 3.16.0 on 64 bit x86 SMP
ii linux-image-3.16.0-37-generic 3.16.0-37.51~14.04.1 amd64 Linux kernel image for version 3.16.0 on 64 bit x86 SMP
ii linux-image-3.16.0-38-generic 3.16.0-38.52~14.04.1 amd64 Linux kernel image for version 3.16.0 on 64 bit x86 SMP
ii linux-image-3.16.0-39-generic 3.16.0-39.53~14.04.1 amd64 Linux kernel image for version 3.16.0 on 64 bit x86 SMP
iF linux-image-3.16.0-41-generic 3.16.0-41.57~14.04.1 amd64 Linux kernel image for version 3.16.0 on 64 bit x86 SMP
iF linux-image-3.16.0-43-generic 3.16.0-43.58~14.04.1 amd64 Linux kernel image for version 3.16.0 on 64 bit x86 SMP
ii linux-image-extra-3.16.0-33-generic 3.16.0-33.44~14.04.1 amd64 Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
ii linux-image-extra-3.16.0-34-generic 3.16.0-34.47~14.04.1 amd64 Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
ii linux-image-extra-3.16.0-36-generic 3.16.0-36.48~14.04.1 amd64 Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
ii linux-image-extra-3.16.0-37-generic 3.16.0-37.51~14.04.1 amd64 Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
ii linux-image-extra-3.16.0-38-generic 3.16.0-38.52~14.04.1 amd64 Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
ii linux-image-extra-3.16.0-39-generic 3.16.0-39.53~14.04.1 amd64 Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
iU linux-image-extra-3.16.0-41-generic 3.16.0-41.57~14.04.1 amd64 Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
iU linux-image-extra-3.16.0-43-generic 3.16.0-43.58~14.04.1 amd64 Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
iU linux-image-extra-3.16.0-44-generic 3.16.0-44.59~14.04.1 amd64 Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
iU linux-image-extra-3.16.0-51-generic 3.16.0-51.69~14.04.1 amd64 Linux kernel extra modules for version 3.16.0 on 64 bit x86 SMP
iU linux-image-generic-lts-utopic 3.16.0.51.42 amd64 Generic Linux kernel image
Output if I try to run the following sudo apt-get remove linux-image-3.16.0-33-generic
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-image-extra-3.16.0-33-generic : Depends: linux-image-3.16.0-33-generic but it is not going to be installed
linux-image-extra-3.16.0-44-generic : Depends: linux-image-3.16.0-44-generic but it is not going to be installed
linux-image-extra-3.16.0-51-generic : Depends: linux-image-3.16.0-51-generic but it is not going to be installed
linux-image-generic-lts-utopic : Depends: linux-image-3.16.0-51-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
I seem to get similar outputs when trying to remove kernels 34, 36, etc.
I've done a lot of Googling but haven't come up with a solution. There is the one report to try 'apt-get -f install' with no packages
but unsure how to do that or if I should even try.
Any help or pointers on how to fix this would be most appreciated!
Thanks,
Torbuck
Use sudo dpkg -r <pkgname>
to remove each of the older kernel packages, and then once you free up some space by doing that, sudo apt-get install -f
.