Package: grub-efi-amd64,linux-image-amd64
Severity: important
Dear maintainers,
I had kernel 6.12.27 running. I just upgraded to kernel 6.12.32. My system
then did not boot by itself because the grub config still contained
entries
for 6.12.31, which had been autoremoved. I could recover by booting
the old
6.12.27 and then doing a manual 'update-grub'.
I see this in my /var/log/apt/term.log:
Am Freitag, dem 20.06.2025 um 13:49 +0100 schrieb Sean Whitton:
Package: grub-efi-amd64,linux-image-amd64[...]
Severity: important
Dear maintainers,
I had kernel 6.12.27 running. I just upgraded to kernel 6.12.32. My
system
then did not boot by itself because the grub config still contained
entries
for 6.12.31, which had been autoremoved. I could recover by booting
the old
6.12.27 and then doing a manual 'update-grub'.
I see this in my /var/log/apt/term.log:
Hi Sean,
strange that update-grub isn't at all run.
Do you have /etc/kernel/postinst.d/zz-update-grub?
It should be installed by grub2-common.
Hello,
[...]
I have /etc/kernel/postinst.d/zz-update-grub.dpkg-dist only.
Reinstalling grub2-common does not fix the problem.
Am Freitag, dem 20.06.2025 um 15:28 +0100 schrieb Sean Whitton:
I have /etc/kernel/postinst.d/zz-update-grub.dpkg-dist only.
Reinstalling grub2-common does not fix the problem.
This is very strange.
zz-update-grub is just a normal dpkg conffile. We don't do anything
special with it.
And according to our git, it wast last changed 2021.
I guess to fix that with dpkg you would need to completely purge the
package and then reinstall.
Also check /etc/kernel/postrm.d/
Looks like there it's also missing or with the .dpkg-dist extension.
On Fri 20 Jun 2025 at 06:04pm +02, Felix Zielcke wrote:
Also check /etc/kernel/postrm.d/Yes, in that directory too it is there but only with a .dpkg-dist
Looks like there it's also missing or with the .dpkg-dist extension.
extension.
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/Yes, in that directory too it is there but only with a .dpkg-dist
Looks like there it's also missing or with the .dpkg-dist extension.
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.
Aka:
- dpkg -s grub2-common
- ls -alR /etc
- grep -r /etc/kernel /var/lib/dpkg/info
- dpkg -s grub2-common/etc/kernel/postinst.d/zz-update-grub 5a98abefbfe97dbed36db7899251e433
/etc/kernel/postrm.d/zz-update-grub 5a98abefbfe97dbed36db7899251e433
- ls -alR /etcHmm, that feels like something of a privacy breach.
Could you narrow it down?
- grep -r /etc/kernel /var/lib/dpkg/info
- zgrep /etc/kernel /var/log/apt/*This did not produce any useful output:
On Sun, Jun 22, 2025 at 05:25:07PM +0100, Sean Whitton wrote:
- dpkg -s grub2-common/etc/kernel/postinst.d/zz-update-grub 5a98abefbfe97dbed36db7899251e433
/etc/kernel/postrm.d/zz-update-grub 5a98abefbfe97dbed36db7899251e433
So at least you now have the correct files.
- ls -alR /etcHmm, that feels like something of a privacy breach.
Could you narrow it down?
This was more fishing for possibly other lost conffiles, aka
"*.dpkg-dist", or other weird stuff.
- zgrep /etc/kernel /var/log/apt/*This did not produce any useful output:
But this shows that those two scripts where missing for a long time, as
they don't show up in the run-parts output. With the default logrotate config for term.log (rotate monthly and keep 12) this means it is broken since a year.
So all the calls of "update-grub" from the linux maintainer scripts have
been missing. But something still created new grub configs or you
would've never booted 6.12.31. So either there is something else on
this system that creates grub configs or someone did it by hand.
You could try and see if logs contain traces of "update-grub":
- grep "Found linux image" -B 10 /var/log/ -r
- journalctl --since=2025-04-01 -g 'Found linux image'
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (1 / 15) |
Uptime: | 155:27:31 |
Calls: | 10,383 |
Files: | 14,054 |
Messages: | 6,417,848 |