Hello,

On Sat 21 Jun 2025 at 01:46pm +02, Bastian Blank wrote:

> On Sat, Jun 21, 2025 at 11:38:46AM +0100, Sean Whitton wrote:
>> On Fri 20 Jun 2025 at 06:04pm +02, Felix Zielcke wrote:
>> > Also check /etc/kernel/postrm.d/
>> > Looks like there it's also missing or with the .dpkg-dist extension.
>> Yes, in that directory too it is there but only with a .dpkg-dist
>> extension.
>
> Neither maintainer scripts of linux nor grub2 contain code that could
> remove just /etc/kernel/post{inst,rm}.d/zz-upgrade-grub, which is what
> you claim you see.  Please provide evidence instead of paraphrasing.

Okay.

> Aka:
> - dpkg -s grub2-common

--8<---------------cut here---------------start------------->8---
Package: grub2-common
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 1404
Maintainer: GRUB Maintainers <pkg-grub-de...@alioth-lists.debian.net>
Architecture: amd64
Multi-Arch: foreign
Source: grub2
Version: 2.12-8
Replaces: grub, grub-cloud-amd64 (<< 0.0.4), grub-common (<< 1.99-1), 
grub-coreboot (<< 2.02+dfsg1-7), grub-doc (<< 0.97-32), grub-efi-amd64 (<< 
2.02+dfsg1-7), grub-efi-arm (<< 2.02+dfsg1-7), grub-efi-arm64 (<< 
2.02+dfsg1-7), grub-efi-ia32 (<< 2.02+dfsg1-7), grub-efi-ia64 (<< 
2.02+dfsg1-7), grub-ieee1275 (<< 2.02+dfsg1-7), grub-legacy, grub-legacy-doc 
(<< 0.97-59), grub-pc (<< 2.02+dfsg1-7), grub-uboot (<< 2.02+dfsg1-7), grub-xen 
(<< 2.02+dfsg1-7), grub-yeeloong (<< 2.02+dfsg1-7)
Depends: grub-common (= 2.12-8), dpkg (>= 1.15.4), libc6 (>= 2.38), 
libdevmapper1.02.1 (>= 2:1.02.197), libefiboot1t64 (>= 38), libefivar1t64 (>= 
38), liblzma5 (>= 5.1.1alpha+20120614)
Breaks: grub (<< 0.97-54), grub-cloud-amd64 (<< 0.0.4), grub-coreboot (<< 
2.02+dfsg1-7), grub-doc (<< 0.97-32), grub-efi-amd64 (<< 2.02+dfsg1-7), 
grub-efi-arm (<< 2.02+dfsg1-7), grub-efi-arm64 (<< 2.02+dfsg1-7), grub-efi-ia32 
(<< 2.02+dfsg1-7), grub-efi-ia64 (<< 2.02+dfsg1-7), grub-ieee1275 (<< 
2.02+dfsg1-7), grub-legacy (<< 0.97-83~), grub-legacy-doc (<< 0.97-59), grub-pc 
(<< 2.02+dfsg1-7), grub-uboot (<< 2.02+dfsg1-7), grub-xen (<< 2.02+dfsg1-7), 
grub-yeeloong (<< 2.02+dfsg1-7), shim (<< 0.9+1474479173.6c180c6-0ubuntu1~)
Conffiles:
 /etc/kernel/postinst.d/zz-update-grub 5a98abefbfe97dbed36db7899251e433
 /etc/kernel/postrm.d/zz-update-grub 5a98abefbfe97dbed36db7899251e433
Description: GRand Unified Bootloader (common files for version 2)
 This package contains common files shared by the distinct flavours of GRUB.
 The files in this package are specific to GRUB 2, and would break GRUB
 Legacy if installed on the same system.
Homepage: https://www.gnu.org/software/grub/
--8<---------------cut here---------------end--------------->8---

> - ls -alR /etc

Hmm, that feels like something of a privacy breach.
Could you narrow it down?

> - grep -r /etc/kernel /var/lib/dpkg/info

--8<---------------cut here---------------start------------->8---
/var/lib/dpkg/info/initramfs-tools.conffiles:/etc/kernel/postinst.d/initramfs-tools
/var/lib/dpkg/info/initramfs-tools.conffiles:/etc/kernel/postrm.d/initramfs-tools
/var/lib/dpkg/info/unattended-upgrades.conffiles:/etc/kernel/postinst.d/unattended-upgrades
/var/lib/dpkg/info/initramfs-tools.list:/etc/kernel
/var/lib/dpkg/info/initramfs-tools.list:/etc/kernel/postinst.d
/var/lib/dpkg/info/initramfs-tools.list:/etc/kernel/postinst.d/initramfs-tools
/var/lib/dpkg/info/initramfs-tools.list:/etc/kernel/postrm.d
/var/lib/dpkg/info/initramfs-tools.list:/etc/kernel/postrm.d/initramfs-tools
/var/lib/dpkg/info/linux-image-6.12.31-amd64.postrm:if [ -d 
/etc/kernel/postrm.d ]; then
/var/lib/dpkg/info/linux-image-6.12.31-amd64.postrm:          --arg=$image_path 
/etc/kernel/postrm.d
/var/lib/dpkg/info/apt.list:/etc/kernel
/var/lib/dpkg/info/apt.list:/etc/kernel/postinst.d
/var/lib/dpkg/info/grub2-common.conffiles:/etc/kernel/postinst.d/zz-update-grub
/var/lib/dpkg/info/grub2-common.conffiles:/etc/kernel/postrm.d/zz-update-grub
/var/lib/dpkg/info/grub-efi-amd64.postinst:    if egrep -q 
'^[[:space:]]*post(inst|rm)_hook[[:space:]]*=[[:space:]]*(/sbin/|/usr/sbin/)?update-grub'
 /etc/kernel-img.conf 2>/dev/null; then
/var/lib/dpkg/info/grub-efi-amd64.postinst:      echo 'Removing update-grub 
hooks from /etc/kernel-img.conf in favour of' >&2
/var/lib/dpkg/info/grub-efi-amd64.postinst:      echo '/etc/kernel/ hooks.' >&2
/var/lib/dpkg/info/grub-efi-amd64.postinst:      sed -ri /etc/kernel-img.conf 
-e 
'\%^[[:space:]]*post(inst|rm)_hook[[:space:]]*=[[:space:]]*(/sbin/|/usr/sbin/)?update-grub%d'
/var/lib/dpkg/info/grub-efi-amd64.preinst:       test -h 
/etc/kernel/postrm.d/zz-update-grub; then
/var/lib/dpkg/info/grub-efi-amd64.preinst:      rm -f 
/etc/kernel/postrm.d/zz-update-grub
/var/lib/dpkg/info/grub2-common.list:/etc/kernel
/var/lib/dpkg/info/grub2-common.list:/etc/kernel/postinst.d
/var/lib/dpkg/info/grub2-common.list:/etc/kernel/postinst.d/zz-update-grub
/var/lib/dpkg/info/grub2-common.list:/etc/kernel/postrm.d
/var/lib/dpkg/info/grub2-common.list:/etc/kernel/postrm.d/zz-update-grub
/var/lib/dpkg/info/systemd.list:/etc/kernel
/var/lib/dpkg/info/systemd.list:/etc/kernel/install.d
/var/lib/dpkg/info/intel-microcode.list:/etc/kernel
/var/lib/dpkg/info/intel-microcode.list:/etc/kernel/preinst.d
/var/lib/dpkg/info/intel-microcode.list:/etc/kernel/preinst.d/intel-microcode
/var/lib/dpkg/info/unattended-upgrades.list:/etc/kernel
/var/lib/dpkg/info/unattended-upgrades.list:/etc/kernel/postinst.d
/var/lib/dpkg/info/unattended-upgrades.list:/etc/kernel/postinst.d/unattended-upgrades
/var/lib/dpkg/info/extlinux.postinst:dpkg-maintscript-helper rm_conffile 
/etc/kernel/postinst.d/zz-extlinux 3:6.04\~git20171011.af7e95c3\+dfsg1-3 
extlinux -- "$@"
/var/lib/dpkg/info/extlinux.postinst:dpkg-maintscript-helper rm_conffile 
/etc/kernel/postrm.d/zz-extlinux 3:6.04\~git20171011.af7e95c3\+dfsg1-3 extlinux 
-- "$@"
/var/lib/dpkg/info/extlinux.postrm:dpkg-maintscript-helper rm_conffile 
/etc/kernel/postinst.d/zz-extlinux 3:6.04\~git20171011.af7e95c3\+dfsg1-3 
extlinux -- "$@"
/var/lib/dpkg/info/extlinux.postrm:dpkg-maintscript-helper rm_conffile 
/etc/kernel/postrm.d/zz-extlinux 3:6.04\~git20171011.af7e95c3\+dfsg1-3 extlinux 
-- "$@"
/var/lib/dpkg/info/extlinux.preinst:dpkg-maintscript-helper rm_conffile 
/etc/kernel/postinst.d/zz-extlinux 3:6.04\~git20171011.af7e95c3\+dfsg1-3 
extlinux -- "$@"
/var/lib/dpkg/info/extlinux.preinst:dpkg-maintscript-helper rm_conffile 
/etc/kernel/postrm.d/zz-extlinux 3:6.04\~git20171011.af7e95c3\+dfsg1-3 extlinux 
-- "$@"
/var/lib/dpkg/info/extlinux.prerm:dpkg-maintscript-helper rm_conffile 
/etc/kernel/postinst.d/zz-extlinux 3:6.04\~git20171011.af7e95c3\+dfsg1-3 
extlinux -- "$@"
/var/lib/dpkg/info/extlinux.prerm:dpkg-maintscript-helper rm_conffile 
/etc/kernel/postrm.d/zz-extlinux 3:6.04\~git20171011.af7e95c3\+dfsg1-3 extlinux 
-- "$@"
/var/lib/dpkg/info/intel-microcode.conffiles:/etc/kernel/preinst.d/intel-microcode
/var/lib/dpkg/info/linux-image-6.12.27-amd64.postinst:if [ -d 
/etc/kernel/postinst.d ]; then
/var/lib/dpkg/info/linux-image-6.12.27-amd64.postinst:        --arg=$image_path 
/etc/kernel/postinst.d
/var/lib/dpkg/info/linux-image-6.12.27-amd64.postrm:if [ -d 
/etc/kernel/postrm.d ]; then
/var/lib/dpkg/info/linux-image-6.12.27-amd64.postrm:          --arg=$image_path 
/etc/kernel/postrm.d
/var/lib/dpkg/info/linux-image-6.12.27-amd64.preinst:if [ -d 
/etc/kernel/preinst.d ]; then
/var/lib/dpkg/info/linux-image-6.12.27-amd64.preinst:         --arg=$image_path 
/etc/kernel/preinst.d
/var/lib/dpkg/info/linux-image-6.12.27-amd64.prerm:if [ -d /etc/kernel/prerm.d 
]; then
/var/lib/dpkg/info/linux-image-6.12.27-amd64.prerm:           --arg=$image_path 
/etc/kernel/prerm.d
/var/lib/dpkg/info/apt.postinst:dpkg-maintscript-helper rm_conffile 
/etc/kernel/postinst.d/apt-auto-removal 2.4.5\~ -- "$@"
/var/lib/dpkg/info/apt.postrm:dpkg-maintscript-helper rm_conffile 
/etc/kernel/postinst.d/apt-auto-removal 2.4.5\~ -- "$@"
/var/lib/dpkg/info/apt.preinst:dpkg-maintscript-helper rm_conffile 
/etc/kernel/postinst.d/apt-auto-removal 2.4.5\~ -- "$@"
/var/lib/dpkg/info/apt.prerm:dpkg-maintscript-helper rm_conffile 
/etc/kernel/postinst.d/apt-auto-removal 2.4.5\~ -- "$@"
--8<---------------cut here---------------end--------------->8---

> - zgrep /etc/kernel /var/log/apt/*

This did not produce any useful output:

--8<---------------cut here---------------start------------->8---
/var/log/apt/term.log:/etc/kernel/postinst.d/initramfs-tools:
/var/log/apt/term.log:/etc/kernel/postinst.d/initramfs-tools:
/var/log/apt/term.log:/etc/kernel/postrm.d/initramfs-tools:
/var/log/apt/term.log.10.gz:/etc/kernel/postinst.d/initramfs-tools:
/var/log/apt/term.log.10.gz:/etc/kernel/postrm.d/initramfs-tools:
/var/log/apt/term.log.11.gz:/etc/kernel/postinst.d/initramfs-tools:
/var/log/apt/term.log.11.gz:/etc/kernel/postrm.d/initramfs-tools:
/var/log/apt/term.log.12.gz:/etc/kernel/postinst.d/initramfs-tools:
/var/log/apt/term.log.12.gz:/etc/kernel/postrm.d/initramfs-tools:
/var/log/apt/term.log.1.gz:/etc/kernel/postinst.d/initramfs-tools:
/var/log/apt/term.log.1.gz:/etc/kernel/postrm.d/initramfs-tools:
/var/log/apt/term.log.1.gz:/etc/kernel/postrm.d/initramfs-tools:
/var/log/apt/term.log.2.gz:/etc/kernel/postinst.d/initramfs-tools:
/var/log/apt/term.log.2.gz:Installing new version of config file 
/etc/kernel/postinst.d/initramfs-tools ...
/var/log/apt/term.log.2.gz:Installing new version of config file 
/etc/kernel/postrm.d/initramfs-tools ...
/var/log/apt/term.log.2.gz:/etc/kernel/postinst.d/initramfs-tools:
/var/log/apt/term.log.2.gz:/etc/kernel/postrm.d/initramfs-tools:
/var/log/apt/term.log.2.gz:/etc/kernel/postrm.d/initramfs-tools:
/var/log/apt/term.log.3.gz:/etc/kernel/postinst.d/initramfs-tools:
/var/log/apt/term.log.3.gz:/etc/kernel/postrm.d/initramfs-tools:
/var/log/apt/term.log.4.gz:/etc/kernel/postinst.d/initramfs-tools:
/var/log/apt/term.log.4.gz:/etc/kernel/postrm.d/initramfs-tools:
/var/log/apt/term.log.6.gz:/etc/kernel/postinst.d/initramfs-tools:
/var/log/apt/term.log.6.gz:/etc/kernel/postrm.d/initramfs-tools:
/var/log/apt/term.log.8.gz:/etc/kernel/postinst.d/initramfs-tools:
/var/log/apt/term.log.8.gz:/etc/kernel/postrm.d/initramfs-tools:
/var/log/apt/term.log.9.gz:/etc/kernel/postinst.d/initramfs-tools:
/var/log/apt/term.log.9.gz:/etc/kernel/postrm.d/initramfs-tools:
--8<---------------cut here---------------end--------------->8---

-- 
Sean Whitton

Attachment: signature.asc
Description: PGP signature

Reply via email to