How to select GRUB install device

Solution 1:

Use Spacebar! That's the way to select in ncurses :)

Solution 2:

I've worked on this problem from the angle that I need to be able to run unattended upgrades from a bash script, and this " Grub boot loader was previously installed to a disk" breaks these.'

At first, I tried to follow the guidelines in the answer above, i.e.

sudo grub-install /dev/sda
sudo update-grub

This, unfortunately, does not solve the problem - next time I do an apt-get dist-upgrade I get the same error, and my upgrade script breaks.

The solution seems to be to run

sudo dpkg-reconfigure grub-pc

and select the correct disk (/dev/sda/) when prompted. In that way, the error does not come back next time I do a dist-upgrade.

Solution 3:

sudo grub-install /dev/sda

then

sudo update-grub