On 26/05/2024 à 16:08, Harald Dunkel wrote:
This is a highly destructive bug. You have UEFI boot finally working, you just do some cleanup, and on the next reboot of your server 8 weeks later it doesn't boot anymore. :-(
On the other hand, I doubt many users care to purge the old grub package after installing another grub flavour. But I agree this should be fixed anyway. There are several options:
- Remove /etc/default/grub only if it is associated with the package being purged in ucf.
- Do not remove /etc/default/grub when purging package-<target> because it is used by grub-install and update-grub which belong to grub2-common; only remove it from ucf registry if it is associated with the package being purged.
Also, it appears that grub-pc.postrm purge optionally removes files in /boot/grub which may have been installed for other grub targets (grub.cfg, fonts, locales, device.map, grubenv, background image cache). My opinion is that postrm should not touch /boot/grub at all. After all, it does not remove GRUB boot image and core image nor EFI partition contents.
Grub-team people, any comments ?