← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1615381] Re: apt-get autoremove may remove current kernel

 

This bug was fixed in the package apt - 1.6.13

---------------
apt (1.6.13) bionic; urgency=medium

  [ David Kalnischkies ]
  * Fix incorrect base64 encoding due to int promotion (LP: #1916050)
  * Harden test for no new acquires after transaction abort (Closes: #984966)
    (LP: #1918920)

  [ Julian Andres Klode ]
  * Implement update --error-on=any (Closes: #594813) (LP: #1693900)
  * Include all translations when building the cache (LP: #1907850)
  * Add basic support for the Protected field
  * Do not require force-loopbreak on Important packages
    (Closes: #983014) (LP: #1916725)
  * Protect currently running kernel at run-time (LP: #1615381)
  * Make ADDARG{,C}() macros expand to single statements
  * Improve immediate configuration handling (LP: #1871268)
    - Do not immediately configure m-a: same packages in lockstep
    - Ignore failures from immediate configuration. This does not change the
      actual installation ordering - we never passed the return code to the
      caller and installation went underway anyway if it could be ordered at a
      later stage, this just removes spurious after-the-fact errors.
      (Closes: #973305, #188161, #211075, #649588)
  * Default Acquire::AllowReleaseInfoChange::Suite to "true" (Closes: #931566)
    (LP: #1918907)

  [ Balint Reczey ]
  * Set LC_ALL=C.UTF-8 for unattended-upgrades environment when parsing its --help
    (LP: #1806076)

 -- Julian Andres Klode <juliank@xxxxxxxxxx>  Fri, 12 Mar 2021 14:09:15
+0100

** Changed in: apt (Ubuntu Bionic)
       Status: Fix Committed => Fix Released

** Changed in: apt (Ubuntu Focal)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1615381

Title:
  apt-get autoremove may remove current kernel

Status in apt package in Ubuntu:
  Fix Released
Status in unattended-upgrades package in Ubuntu:
  Fix Released
Status in unattended-upgrades source package in Trusty:
  Won't Fix
Status in unattended-upgrades source package in Xenial:
  Fix Released
Status in unattended-upgrades source package in Artful:
  Won't Fix
Status in apt source package in Bionic:
  Fix Released
Status in apt source package in Focal:
  Fix Released
Status in apt source package in Groovy:
  Fix Released
Status in apt source package in Hirsute:
  Fix Released

Bug description:
  [Impact]
  APT will try and fail to remove the currently running kernel, when booted into an older kernel that is not protected. May wreak some havoc if mixed with other operations to the point that apt goes weird and needs manual fixing up.

  [Test case]
  For the SRUs we have included an automated test case that starts with an empty autoremove config file, and then checks that the running kernel is protected at runtime.

  You can also test manually, but it's not necessary:

  - Install new kernel
  - Reboot into kernel not listed as protected in 01autoremove-kernels
  - Run autoremove

  [Where problems could occur]
  We may more easily run out of space in /boot. hirsute has new autoremoval code that runs completely at runtime; but that seems a bit large to SRU after only a few weeks in hirsute. Hence, we should protect the current kernel _in addition_ to the other kernels, just like unattended-upgrades and update-manager do. This increases the risk of filling up /boot compared to older apt versions, but is at the same level as unattended-upgrades and update-manager.

  [Original bug report]

  This may happen, if you boot one of the older kernels, that is not
  protected by /etc/apt/apt.conf.d/01autoremove-kernels

  Workaround: run
  /etc/kernel/postinst.d/apt-auto-removal
  during each boot (e.g. by using cron).
  Note: The workaround breaks autoremoving feature of new unneeded kernels in  unattended-upgrades i.e. the setting 'Unattended-Upgrade::Remove-New-Unused-Dependencies "true"' (which is default in 16.04 unless 'Unattended-Upgrade::Remove-Unused-Dependencies "true"' is set in '/etc/apt/apt.conf.d/50unattended-upgrades'.

  In shell:

  $ uname -r
  4.4.0-22-generic
  $ apt-get -s autoremove
  NOTE: This is only a simulation!
        apt-get needs root privileges for real execution.
        Keep also in mind that locking is deactivated,
        so don't depend on the relevance to the real current situation!
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  The following packages will be REMOVED:
    linux-headers-4.4.0-21 linux-headers-4.4.0-21-generic linux-headers-4.4.0-22
    linux-headers-4.4.0-22-generic linux-headers-4.4.0-31-generic
    linux-image-4.4.0-21-generic linux-image-4.4.0-22-generic
    linux-image-4.4.0-31-generic linux-image-extra-4.4.0-21-generic
    linux-image-extra-4.4.0-22-generic linux-image-extra-4.4.0-31-generic
  0 upgraded, 0 newly installed, 11 to remove and 13 not upgraded.

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: apt 1.2.12~ubuntu16.04.1
  ProcVersionSignature: Ubuntu 4.4.0-22.40-generic 4.4.8
  Uname: Linux 4.4.0-22-generic x86_64
  ApportVersion: 2.20.1-0ubuntu2.1
  Architecture: amd64
  CurrentDesktop: XFCE
  Date: Sun Aug 21 16:11:27 2016
  EcryptfsInUse: Yes
  InstallationDate: Installed on 2016-04-28 (114 days ago)
  InstallationMedia: Xubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
  SourcePackage: apt
  UpgradeStatus: No upgrade log present (probably fresh install)
  modified.conffile..etc.kernel.postinst.d.apt-auto-removal: [modified]
  mtime.conffile..etc.kernel.postinst.d.apt-auto-removal: 2016-07-30T12:15:32.706300

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1615381/+subscriptions