2

I need to reconfigure grub to use a different install device. Other threads indicate that there will be a screen that prompts me to select a device:

However, no such screen exists. It exits after the 2nd one.

How do I select the boot device?

Screen 1 enter image description here

Screen 2

enter image description here

After Screen 2

enter image description here

2 Answers2

3

This appears to be due to a change introduced to avoid potential corrupted systems. I've filed a bug report about this as this just bit me during a RAID failure.

Update: The bug has been confirmed and triaged as high priority against basically all supported versions of Ubuntu.

Update #2: Fix has been released for Focal and Groovy! I'm hoping someone on the Ubuntu team is tracking Bionic.

Update #3: Fix has been released for Bionic!

Brian Turek
  • 1,866
0

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