Bug#1135137: upgrade-reports: Bookworm -> Trixie mdadm raid EFI not updated on both disks

Thorsten Behrens tbehrens at outlook.com
Fri May 1 10:16:43 BST 2026


On Thu, 30 Apr 2026 00:46:30 +0200 Pascal Hambourg <pascal at plouf.fr.eu.org> wrote:
> Thorsten Behrens wrote:
> > A thought on how to improve the postinst of grub
> > Something along these lines - not this exact script, but in spirit - would update grub on all ESPs
>
> This is a bad idea. Not all detected ESPs may belong to this system.
> A correct solution requires to record the ESPs which are managed by this
> system and must be updated.

Thank you for your patience as I learn how Debian hangs together. Is this an equally bad idea?

Get UUID of  currently mounted /boot/grub with CURRENT_UUID=$(lsblk -no UUID $(df /boot/grub | tail -1 | awk '{print $1}'))

Get UUID that `grub.cfg` on the ESP I am looking at chains to with `ESP_UUID=$(grep "search.fs_uuid" "$mnt"/EFI/debian/grub.cfg | awk '{print $2}')`

If the two match, this ESP is managed by this system and should be updated

The main point being whether comparing these two UUIDs is the right way to identify that an ESP is managed by the current system.

My tail and awk and grep stuff may well not be robust to get these two UUIDs in the first place.

Yours
Thorsten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grub-devel/attachments/20260501/6d301b4e/attachment-0001.htm>


More information about the Pkg-grub-devel mailing list