[kwlug-disc] Removing old Linux images on upgrade

Khalid Baheyeldin kb at 2bits.com
Thu Dec 3 10:48:48 EST 2015


I mentioned this in passing during a previous discussion, but it warrants
its own discussion.

On Ubuntu, when a new Linux image (and headers) are installed, it
automatically removes some of the old ones. This is helpful in keeping the
/boot partition size down.

Now, I am not a fan of making /boot be its own partition. I prefer to make
it a directory under the root partition. However, there are cases where
this is necessary, like when having some RAID configurations with drivers
needed at a later stage.

The side effect is when many hosting companies set the /boot to its own
partition and to something small, e.g. 250MB or even 200MB.

The behaviour I am looking for is exactly this:

# aptitude full-upgrade
The following NEW packages will be installed:
  linux-headers-3.13.0-71{a} linux-headers-3.13.0-71-generic{a}
linux-image-3.13.0-71-generic
The following packages will be REMOVED:
  linux-headers-3.2.0-94{u} linux-headers-3.2.0-94-generic{u}
The following packages will be upgraded:
  linux-generic-lts-trusty linux-headers-generic-lts-trusty
linux-image-generic-lts-trusty
3 packages upgraded, 3 newly installed, 2 to remove and 0 not upgraded.
Need to get 0 B/66.5 MB of archives. After unpacking 207 MB will be used.
Do you want to continue? [Y/n/?]

As you can see, old images and headers are automatically removed, and if
this worked reliably on all servers, this would take care of unwanted space
depletion in the /boot partition.

But often not, this does not work, and a full-upgrade fails because of lack
of space, and I have to clean the partition manually.

Any one knows why this sometimes works, but not others?
-- 
Khalid M. Baheyeldin
2bits.com, Inc.
Fast Reliable Drupal
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
Simplicity is the ultimate sophistication. --   Leonardo da Vinci
For every complex problem, there is an answer that is clear, simple, and
wrong." -- H.L. Mencken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20151203/bb7284c2/attachment.htm>


More information about the kwlug-disc mailing list