grub-pc's postinst decides whether to ask this question. In my case, I've tracked it down to the following condition:
elif test -z "$2" || test -e /boot/grub/core.img || \
test -e /boot/grub/i386-pc/core.img || \
test "$UPGRADE_FROM_GRUB_LEGACY" || test "$wubi_device"; then
So if /boot/grub/i386-pc/core.img exists, it will always show the prompt. If it doesn't, it'll (practically) never show it.
/boot/grub/i386-pc/core.img should exist under normal circumstances, so chances are, something went wrong in the past to cause this issue. To resolve the situation, run the following command:
upgrade-from-grub-legacy
This should create the required core.img and reset the installed devices debconf configuration, and afterwards dpkg-reconfigure grub-pc should work as expected.
You might be getting the following error, which is caused by a bug:
dpkg-maintscript-helper: error: environment variable DPKG_MAINTSCRIPT_NAME is required
In this case, the following command should work:
DPKG_MAINTSCRIPT_NAME=postinst DPKG_MAINTSCRIPT_PACKAGE=grub-pc upgrade-from-grub-legacy
grub-install, but your start of description asking for reconfigure (which won't do what you appear to want) has me a little confused of what you want;grub-installinstalls to different devices/drives – guiverc Feb 23 '20 at 21:36man grub-install. https://askubuntu.com/questions/617045/how-do-i-install-two-independent-ubuntu-installations-on-a-single-hard-drive-wit – oldfred Feb 23 '20 at 21:49dpkg-reconfigure grub-pcshould be the right thing to do here.grub-installwill install GRUB once manually, and never update it again.dpkg-reconfigure grub-pcon the other hand will store the devices you've chosen in debconf, and then rungrub-installon these devices on every GRUB/kernel update. Why it sometimes just won't ask I haven't been able to figure out myself yet, debconf sometimes is just super finicky :( – Martin von Wittich Jul 06 '20 at 16:22upgrade-from-grub-legacyand then runningdpkg-reconfigure grub-pc; the former resets the configuration stored in debconf, and should forcedpkg-reconfigureto ask again. No idea though why it won't just work. – Martin von Wittich Jul 06 '20 at 16:24/boot/grub/i386-pc/core.imgexists, and never if it does not./boot/grub/i386-pc/core.imgshould normally exist, and if it doesn't, something went wrong in the past.upgrade-from-grub-legacyis in fact the correct solution, because it will create the requiredcore.img. – Martin von Wittich Jul 06 '20 at 17:18