[kwlug-disc] Removing old Linux images on upgrade
CrankyOldBugger
crankyoldbugger at gmail.com
Thu Dec 3 11:02:13 EST 2015
I've seen cases where I would do the upgrade (using apt-get dist-upgrade, I
really need to look into using aptitude), but apt-get autoremove wouldn't
do its thing properly until after a reboot. Do the upgrade, reboot, then
do autoremove. Rebooting should theoretically be unnecessary, but some
days the old kernel just doesn't want to let go.
You might want to see about opening up a bit more space to the /boot
partition, though, if only one or two upgrades fills it up.
On Thu, 3 Dec 2015 at 10:51 Khalid Baheyeldin <kb at 2bits.com> wrote:
> 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
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20151203/8a7ba400/attachment.htm>
More information about the kwlug-disc
mailing list