Comment 26 for bug 580408

Revision history for this message
Richard Laager (rlaager) wrote :

I have grub-pc version 1.98-1ubuntu9 installed and this is still a problem (on multiple servers). It seems that grub-pc/install_devices is set to the empty set.

This fixes it for me, without changing anything on systems that are not affected:
if sudo debconf-show grub-pc | grep -q "install_devices:$" ; then echo SET grub-pc/install_devices `mount | grep "on / " | cut -d' ' -f1 | sed "s|[0-9]\+$||"` | sudo debconf-communicate && sudo dpkg-reconfigure -fnoninteractive grub-pc ; fi

TO THOSE LOOKING FOR A MAGICAL FIX: THIS COMMAND IS ONLY SAFE IF YOU WANT TO INSTALL GRUB ON THE DEVICE THAT HOLDS THE PARTITION FOR / AND EVEN THEN, IT MAY BE UNSAFE IN VARIOUS CIRCUMSTANCES. IF YOU ARE GOING TO BLINDLY COPY-AND-PASTE, DON'T BLAME ME FOR BREAKAGE.