This was just brought to my attention so I took a look at the source-code. Thanks to oldfred's comment #20 showing part of the installer log that helps isolate the source-code responsible.
It looks like this is a result of this code - written in 2006 - assuming a debconf entry that is empty and in consequence choosing a default device. Adding some debug prints into the code might confirm that and allow it to be fixed.
See specifically line 45 in grubinstaller.py (Python code)
This was just brought to my attention so I took a look at the source-code. Thanks to oldfred's comment #20 showing part of the installer log that helps isolate the source-code responsible.
It looks like this is a result of this code - written in 2006 - assuming a debconf entry that is empty and in consequence choosing a default device. Adding some debug prints into the code might confirm that and allow it to be fixed.
See specifically line 45 in grubinstaller.py (Python code)
https:/ /git.launchpad. net/ubuntu/ +source/ ubiquity/ tree/ubiquity/ components/ grubinstaller. py#n45
Calling misc.grub_default() from:
https:/ /git.launchpad. net/ubuntu/ +source/ ubiquity/ tree/ubiquity/ misc.py# n370