Bug#1014455: systemd-boot: kernel postrm hook runs twice on purge

Andrea Pappacoda andrea at pappacoda.it
Wed Jul 6 13:42:59 BST 2022


Package: systemd-boot
Version: 251.2-7
Severity: normal
X-Debbugs-Cc: a.heider at gmail.com, sam at robots.org.uk

Hi, I just noticed that when purging an installed kernel, the
/etc/kernel/postrm.d/systemd-boot hook runs twice; here's an example:

    # apt purge linux-image-5.17.0-1-amd64
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following packages will be REMOVED:
      linux-image-5.17.0-1-amd64*
    0 upgraded, 0 newly installed, 1 to remove and 37 not upgraded.
    After this operation, 454 MB disk space will be freed.
    Do you want to continue? [Y/n]
    (Reading database ... 221345 files and directories currently installed.)
    Removing linux-image-5.17.0-1-amd64 (5.17.3-1) ...
    I: /vmlinuz.old is now a symlink to boot/vmlinuz-5.18.0-2-amd64
    I: /initrd.img.old is now a symlink to boot/initrd.img-5.18.0-2-amd64
    /etc/kernel/postrm.d/initramfs-tools:
    update-initramfs: Deleting /boot/initrd.img-5.17.0-1-amd64
    /etc/kernel/postrm.d/systemd-boot:
    Removing kernel version 5.17.0-1-amd64 from systemd-boot...
    (Reading database ... 216472 files and directories currently installed.)
    Purging configuration files for linux-image-5.17.0-1-amd64 (5.17.3-1) ...
    /etc/kernel/postrm.d/systemd-boot:
    Removing kernel version 5.17.0-1-amd64 from systemd-boot...

I don't personally know well enough how these scripts are invoked and I can't
propose a solution, but the scripts suggested by Andre and Sam in bug #826045
seem to not have this issue.


-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.18.0-2-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages systemd-boot depends on:
ii  libc6              2.33-7
ii  libsystemd-shared  251.2-7
ii  systemd-boot-efi   251.2-7

Versions of packages systemd-boot recommends:
ii  efibootmgr  17-1

systemd-boot suggests no packages.

-- no debconf information



More information about the Pkg-systemd-maintainers mailing list