[Bug 1675079] Re: 16.04 LTS Partition /boot fills up with Kernel images, gets underwear in a twist
private_lock
1675079 at bugs.launchpad.net
Wed Dec 9 23:44:09 UTC 2020
I'm hitting two distinct errors here:
1) Accepting the updates from the GUI-notification, all my kernels over
the past months get marked as "manual" - though I have the strong
feeling, they should be automatic and only kept until superseded by jet
more updates:
root at Meerschweinchen:/boot# apt-mark showmanual 'linux-image-.*'
linux-image-5.4.0-52-generic
linux-image-5.4.0-54-generic
linux-image-5.4.0-56-generic
2) Trying to mark an old kernel as "auto" will still not *MANUALLY* "autoremove":
root at Meerschweinchen:/boot# sudo apt-mark auto linux-image-5.4.0-51-generic
linux-image-5.4.0-51-generic wurde bereits auf automatisch installiert gesetzt.
root at Meerschweinchen:/boot# apt-mark showauto 'linux-image-.*'
linux-image-5.4.0-51-generic
linux-image-generic
root at Meerschweinchen:/boot# apt-get autoclean
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
root at Meerschweinchen:/boot# apt-get autoremove
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
This system is:
root at Meerschweinchen:/boot# uname -a
Linux Meerschweinchen 5.4.0-56-generic #62-Ubuntu SMP Mon Nov 23 19:20:19 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
root at Meerschweinchen:/boot# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to unattended-upgrades in Ubuntu.
https://bugs.launchpad.net/bugs/1675079
Title:
16.04 LTS Partition /boot fills up with Kernel images, gets underwear
in a twist
Status in unattended-upgrades package in Ubuntu:
Fix Released
Status in update-manager package in Ubuntu:
Fix Released
Status in unattended-upgrades source package in Xenial:
Fix Released
Status in update-manager source package in Xenial:
Fix Released
Status in unattended-upgrades source package in Artful:
Won't Fix
Status in update-manager source package in Artful:
Fix Released
Bug description:
[Impact]
* Update-manager and unattended-upgrades install many kernel packages during the lifetime of a release but does not remove them automatically leading to those packages filling disk space potentially completely filling /boot and making the system unable to install updates or even boot.
* Stable release users are impacted by this bug for years and their systems already collected many autoremovable unused kernel packages, thus they would benefit from backporting the fix greatly.
* The bug is fixed by removing autoremovable (not currently booted) kernel packages when running unattended-upgrades or update-manager. Update manager offers the kernel removals when there are other updates to be installed.
[Test Case]
1. Install kernel packages to be removed, mark them auto-installed
and run apt's kernel hook script to make apt consider them
autoremovable:
sudo apt install -y linux-image-extra-4.4.0-92-generic linux-image-extra-4.4.0-93-generic
sudo apt-mark auto linux-image-extra-4.4.0-92-generic linux-image-extra-4.4.0-93-generic
sudo /etc/kernel/postinst.d/apt-auto-removal
2. Also downgrade a package to be upgraded:
sudo apt-get install -y --allow-downgrades ca-
certificates=20160104ubuntu1
3. (update-manager). Run update-manager and observe that kernel
packages are offered for removal in Details of updates.
sudo update-manager
4. (update-manager) Click on Install Now and observe that the kernel
packages are removed.
3. (unattended-upgrades) Run unattended-upgrades manually and observe
the removal of the autoremovable kernel packages:
sudo unattended-upgrade -v
[Regression Potential]
The change may cause update-manager or unattanded-upgrades to remove
used kernel packages or fail to install other package updates.
[Other Info]
The unattended-upgrades fix is uploaded with many other fixes and
those may cause regressions in other areas in unattended-upgrades.
[Original bug text]
On a 16.04LTS system, the /boot partition will eventually fill with
Kernel images, until the point where "apt-get autoremove" can't
complete.
This issue has previously been reported as fixed, but it is not fixed:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1357093
Generally what I see is the final kernel image that fills the drive is
incompletely installed (the header package does not make it). "apt-
get autoremove" tries to work, but fails. I must manually remove
kernel images to free enough space.
I see this on a machine used by my elderly parents, where 'Download
and install updates automatically' is set. And on my home machines,
where the setting is elsewhere.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1675079/+subscriptions
More information about the foundations-bugs
mailing list