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

Thorsten Behrens tbehrens at outlook.com
Wed Apr 29 13:32:47 BST 2026


A thought on how to improve the postinst of grub

>grub's postinst runs grub-install. grub-install determines the
>install location. I -think- it just uses /boot/efi, but the grub
>maintainers will know better.

Something along these lines - not this exact script, but in spirit - would update grub on all ESPs

```
#!/usr/bin/env bash
set -euo pipefail

ESP_GUID="c12a7328-f81f-11d2-ba4b-00a0c93ec93b"

lsblk -rno NAME,PARTTYPE,FSTYPE | while read -r name parttype fstype; do
  if [[ "$parttype" == "$ESP_GUID" && "$fstype" == "vfat" ]]; then
    dev="/dev/$name"
    mnt="$(mktemp -d)"

    echo "Installing GRUB to $dev"

    mount "$dev" "$mnt"

    grub-install \
      --target=x86_64-efi \
      --efi-directory="$mnt" \
      --bootloader-id=debian \
      --recheck

    umount "$mnt"
    rmdir "$mnt"
  fi
done
```

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grub-devel/attachments/20260429/88554f67/attachment.htm>


More information about the Pkg-grub-devel mailing list