Bug#1052690: grub2: post-install script overrides manual changes to GRUB_DISABLE_OS_PROBER

Bertram Felgenhauer bertram.felgenhauer at googlemail.com
Tue Sep 26 08:38:22 BST 2023


Package: grub2
Version: 2.12~rc1-10

Dear Maintainer,

   * What led up to the situation?

An update of grub a while ago changed the default os-prober behavior;
see also #1038974.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

I edited /etc/default/grub to reenable os-prober.

   * What was the outcome of this action?

While at first effective, subsequent updates of grub reset the
default each time. (It took me a while to realize this.)

   * What outcome did you expect instead?

I expected the setting to stick when grub is updated.

Additional information: It turns out that the post-install script
patches /etc/default/grub here:

    https://git.launchpad.net/ubuntu/+source/grub2/tree/debian/postinst.in?h=debian/sid&id=f85ded33219dc350d3ef96caa9d1ce118247b086#n398

It's also worth noting that `update-grub` does not appear to pick up
files from `/etc/default/grub.d` so putting the setting there is
ineffective. (I put the setting into `/etc/default/grub.d/99-osprober`
and update-grub didn't pick it up in my test.)

The proper solution for now appears to be to run
`dpkg-reconfigure grub-efi-amd64`

(Would other grub packages work too? This is the package that owns the
corresponding debconf setting `grub2/enable_os_prober` for me)

Ideally, I'd prefer the manual edits to be recognized and kept. But at
the very least, please add a comment in /etc/default/grub to point
towards a reliable way of changing this setting. And maybe add a hint
to the warning messages that update-grub prints about os-prober?



More information about the Pkg-grub-devel mailing list