Incorrect backport range — missing grub fix for issue #14

Description:

Installing the current grub package from the Arch repositories results in a boot failure caused by the Boot Loader Interface script 25_bli.
The system becomes unbootable until /etc/grub.d/25_bli is removed and GRUB is reinstalled/regenerated.

When rebuilding the same PKGBUILD locally with an updated _backports range that includes the actual upstream fix, the package works correctly — the system boots normally.

This indicates that the official package’s _backports range ends too early and misses the upstream fix that resolves the issue.


Additional info:

package version(s):
grub 2:2.12.r418.g6b5c671d-1

config and/or log files:
Affected file: /etc/grub.d/25_bli
Boot failure resolves immediately when it is removed and GRUB is reinstalled:

sudo rm -f /etc/grub.d/25_bli

sudo grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB

sudo grub-mkconfig -o /boot/grub/grub.cfg

link to upstream bug report, if any:

Relevant commits or issue:

See #14 (closed) and commit 0215a7df


Steps to reproduce:

  1. Remove any old grub configuration and ensure no /etc/grub.d leftovers remain:

    sudo pacman -Rsnc grub

  2. sudo rm -rf /etc/grub.d || true

  3. Install the official grub package:

    sudo pacman -Syu grub

  4. Generate GRUB configuration:

    sudo grub-mkconfig -o /boot/grub/grub.cfg

  5. Reboot.
    Expected: System boots normally.
    Observed: Boot fails (stuck during BLI phase). Removing /etc/grub.d/25_bli and reinstalling GRUB resolves it.

  6. Rebuild grub locally from the same PKGBUILD, but include the latest upstream fix:

    `# In PKGBUILD, replace:

    _backports=("grub-${_pkgver}..6b5c671d35b1b84468da1fef2b9bd8e05682f7e6")

    makepkg -Cfs --skippgpcheck

    sudo pacman -U ./grub-*.pkg.tar.zst

    sudo grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB --recheck

    sudo grub-mkconfig -o /boot/grub/grub.cfg reboot

    → System boots correctly.


Diagnosis / root cause:

The _backports range in the official PKGBUILD stops at commit 19c698d123a (July 2025), which predates the upstream fix for issue #14 (closed)
Therefore, the current Arch grub package does not include the necessary commits that fix the 25_bli/BLI boot issue.

Rebuilding locally with _backports updated to include 6b5c671d... integrates the fix and eliminates the problem entirely.


Suggested fixes / mitigation:

  1. Update _backports in PKGBUILD to include the correct upstream fix:

    _backports=("grub-${_pkgver}..6b5c671d35b1b84468da1fef2b9bd8e05682f7e6")

    or at least up to 9a725391f1a70b8a0ae4acde8fbb22a78e52697d.

  2. Optionally add a post_upgrade() step in grub.install to remove an obsolete /etc/grub.d/25_bli for users upgrading from affected versions:

    post_upgrade() { if [[ -e /etc/grub.d/25_bli ]]; then echo "Removing obsolete /etc/grub.d/25_bli (known to cause boot issues)" rm -f /etc/grub.d/25_bli fi }

  3. Once this is merged, the rebuilt package works correctly across all tested environments (UEFI and BIOS).


Summary:
The packaged grub 2:2.12.r418.g6b5c671d-1 still lacks the upstream fix for the 25_bli boot failure because its _backports range stops before the required commits. Extending the range up to 6b5c671d35b1b84468da1fef2b9bd8e05682f7e6 resolves the issue completely.


Edited by Sourav Das