2

I've been searching here and have a very similar problem to another post at (How do I free up more space in /boot?)

The problem I'm getting is when I try the solution. For example: sudo apt-get purge linux-image-2.6.38-11

I get:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'linux-image-2.6.38-11-server' for regex 'linux-image-2.6.38-11'
You might want to run 'apt-get -f install' to correct these:

The following packages have unmet dependencies:
linux-image-server : Depends: linux-image-3.2.0-36-generic but it is not going to be installed

E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

This is on an older Ubuntu 12.0.4.1 LTS server I've inherited. uname -a reports

3.2.0-35-generic #55-Ubuntu SMP

Am I left with having to resize the partition? ls /boot reports the following:

abi-2.6.38-11-server         lost+found
abi-2.6.38-12-server         memtest86+.bin
abi-2.6.38-13-server         memtest86+_multiboot.bin
abi-2.6.38-14-server         System.map-2.6.38-11-server
abi-2.6.38-15-server         System.map-2.6.38-12-server
abi-2.6.38-16-server         System.map-2.6.38-13-server
abi-2.6.38-8-server          System.map-2.6.38-14-server
abi-3.0.0-26-server          System.map-2.6.38-15-server
abi-3.2.0-34-generic         System.map-2.6.38-16-server
abi-3.2.0-35-generic         System.map-2.6.38-8-server
config-2.6.38-11-server      System.map-3.0.0-26-server
config-2.6.38-12-server      System.map-3.2.0-34-generic
config-2.6.38-13-server      System.map-3.2.0-35-generic
config-2.6.38-14-server      vmcoreinfo-2.6.38-11-server
config-2.6.38-15-server      vmcoreinfo-2.6.38-12-server
config-2.6.38-16-server      vmcoreinfo-2.6.38-13-server
config-2.6.38-8-server       vmcoreinfo-2.6.38-14-server
config-3.0.0-26-server       vmcoreinfo-2.6.38-15-server
config-3.2.0-34-generic      vmcoreinfo-2.6.38-16-server
config-3.2.0-35-generic      vmcoreinfo-2.6.38-8-server
grub                         vmcoreinfo-3.0.0-26-server
initrd.img-2.6.38-11-server  vmlinuz-2.6.38-11-server
initrd.img-2.6.38-12-server  vmlinuz-2.6.38-12-server
initrd.img-2.6.38-13-server  vmlinuz-2.6.38-13-server
initrd.img-2.6.38-14-server  vmlinuz-2.6.38-14-server
initrd.img-2.6.38-15-server  vmlinuz-2.6.38-15-server
initrd.img-2.6.38-16-server  vmlinuz-2.6.38-16-server
initrd.img-2.6.38-8-server   vmlinuz-2.6.38-8-server
initrd.img-3.0.0-26-server   vmlinuz-3.0.0-26-server
initrd.img-3.2.0-34-generic  vmlinuz-3.2.0-34-generic
initrd.img-3.2.0-35-generic  vmlinuz-3.2.0-35-generic

One poster mentioned they ended up using rm -f to remove as the above method didn't work, but this was also not recommended. Thanks in advance, Sir_Timbit

An update: I ended up backing up all the old 2.6.x kernels and deleted them. This did get rid of the "/boot is using 98%" warning. However, I then tried to do a

apt-get -f install 

It chugged along but eventually errored out with the following:

update-initramfs: Generating /boot/initrd.img-3.2.0-90-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-90-generic /boot/vmlinuz-3.2.0-90-generic
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-90-generic
Found initrd image: /boot/initrd.img-3.2.0-90-generic
Found linux image: /boot/vmlinuz-3.2.0-35-generic
Found initrd image: /boot/initrd.img-3.2.0-35-generic
Found linux image: /boot/vmlinuz-3.2.0-34-generic
Found initrd image: /boot/initrd.img-3.2.0-34-generic
Found linux image: /boot/vmlinuz-3.0.0-26-server
Found initrd image: /boot/initrd.img-3.0.0-26-server
Found linux image: /boot/vmlinuz-2.6.38-16-server
Found initrd image: /boot/initrd.img-2.6.38-16-server
Found memtest86+ image: /memtest86+.bin
done
dpkg: dependency problems prevent configuration of linux-image-server:
linux-image-server depends on linux-image-3.2.0-36-generic; however:
Package linux-image-3.2.0-36-generic is not installed.
dpkg: error processing linux-image-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up linux-headers-3.2.0-90 (3.2.0-90.128) ...
Setting up linux-headers-3.2.0-90-generic (3.2.0-90.128) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.2.0-90-generic /boot/vmlinuz-3.2.0-90-generic
Setting up linux-headers-server (3.2.0.36.43) ...
dpkg: dependency problems prevent configuration of linux-server:
linux-server depends on linux-image-server (= 3.2.0.36.43); however:
Package linux-image-server is not configured yet.
dpkg: error processing linux-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up linux-libc-dev (3.2.0-36.57) ...
Errors were encountered while processing:
linux-image-server
linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
  • Have you tried sudo apt-get remove linux-image-2.6.38-11; sudo apt-get purge linux-image-2.6.38-11? – Daniel Sep 16 '15 at 18:03
  • And you can just do rm -f since none of these are in use anyways. – Daniel Sep 16 '15 at 18:04
  • Not recommended but it works – Daniel Sep 16 '15 at 18:04
  • Why does this happen in the first place? I've run into the 'full /boot' problem with a number of Ubuntu installations (both server and desktop). Is there no safe way to automatically prevent this situation? – Jerbot Sep 16 '15 at 18:10
  • Why not using Ubuntu Tweaks? http://askubuntu.com/a/553595/16395 – Rmano Sep 16 '15 at 18:29
  • Did you tried to install linux-image-3.2.0-36 but failed cause of space left ? On which version are you currently running ? – Inglebard Sep 16 '15 at 18:34
  • Hi, doing 'sudo apt-get remove linux-image-2.6.38-11' returns the same error. The server is Ubuntu 12.0.4.1 LTS. Looks like Ubuntu Tweaks requires the GUI. Guess I will try manually deleting the older 2.x kernels. – Sir_Timbit Sep 16 '15 at 19:37

2 Answers2

0

Since the kernels (and all their associated packages) were installed via a package manager, using sudo /bin/rm will cause the package manager's database to be out-of-step with the real world. Confusion will eventually overwhelm you.

I recommend my answer over here. Use uname -r to find your current kernel release number. Ignore any -generic suffix. DO NOT DELETE ANY PACKAGE WITH THIS VERSION NUMBER. DO NOT DELETE YOUR CURRENT KERNEL.

Sorry for emphasis, but this area (cleaning out old operating systems) is one where it is easy to accidentally to convert your computer into a doorstop.

waltinator
  • 36,399
-1

why dont use :

apt-get autoremove
apt-get autoclean

after each update/upgrade ??? this is doing the job correctly since a while, without messing to much the os, even in the case of a svr runing since years with a bunch of update/upgrade. I m missing something?

caymus
  • 34
  • This is not by hazard that i say this, waltinator point a important thing, go read the source code of apt-get to undersand... I have never used more than 126MB of hdd space with this methode for /boot. If your /boot grow, this is probably because you have messed apt-get with manual input. This is a database... Not a rm- rf do the job... The question isnt how to have a low space usage of /boot, kernel upgrades after kernels upgrades? In this case read apt-get source code... & say me why autoremove autoclean isnt the appropriate thing to do? This is a DATABASE dont mess with rm manually... – caymus Sep 17 '15 at 18:51