121

After running Update Manager, a debconf window (titled "Configuring grub-pc"), popped up, requiring me to select the appropriateGRUB install devices for my system. I've made no changes to grub or the filesystem recently, and I don't remember what options I selected last time I did make a change.

How do I know what to select? I'm assuming the wrong answer could render my system unable to boot.

Here's the debconf dialog:

Debconf window, configuring grub-pc, containing check-boxes for /dev/sda and /dev/sda1

Here's the window and text that is displayed when selecting "help" :

Grub was previously installed to a disk that is no longer present

6
  • 9
    This dialog also crops up when upgrading a virtualbox vm's ubuntu version (in my case, 10.10 -> 11.04).
    – Noel
    Commented Jun 7, 2011 at 13:33
  • 4
    As far as my experience with this, it looks like a usability bug. I have run updates countless times and whenever this dialog pops up, I click nothing in the first dialog and then confirm that I want to continue without installing grub. Never had a problem so far. I guess it is because grub is already installed in the proper MBR otherwise the machine would not have booted in the first place.
    – luv2learn
    Commented Mar 22, 2015 at 18:48
  • 2
    wtf is that ? I just wanted to update a few package as it was suggesting, now I need to make a choice that might kill my system... such bad bad bad stuff !!
    – nicolas
    Commented Mar 3, 2016 at 8:24
  • 5
    This is a terrifying experience! I just had it while simply doing an apt upgrade on Ubuntu 16.04.3 LTS (running inside a VirtualBox VM on a Windows 10 host which just got restarted due to updates, I thought it messed everything up) -- nevertheless it worked after choosing /dev/sda
    – Daniel F
    Commented Nov 6, 2017 at 22:52
  • Ran into this. Google sent me here. My Linux guru said: run lsblk, the drive that has the / mountpoint (root) is the boot disk. It may be a partition (ending in a number like sda1). Use this partition's disk (by removing the number, /dev/sda in this case). If you left the menus and are unsure if you wrecked your system, run dpkg-reconfigure grub-pc. I took all the defaults and selected the disk that had the root-partition on. The system rebooted okay.
    – Chris
    Commented Mar 17, 2023 at 10:49

2 Answers 2

98

In your case, the correct selection is /dev/sda, the first one. It's the first and only hard disk in your system, whereas /dev/sda1 is a partition on that hard disk. You can install grub on a partition, but it's a "BAD idea".

If you had multiple hard drives and partitions, first find out where your root partition is:

lsblk

(See also: How do I find out what hard disks are in the system?)

You can then install grub on that hard drive. Look for devices labeled "disk" (e.g. "sda", meaning /dev/sda) to install grub into the master boot record (every physical disk device has only one MBR, no matter the partitions).

10
  • 30
    To finish off the story (which has ended well enough): I selected /dev/sda as suggested. On the next window, I was asked if I wanted to continue without installing grub. Odd, of course, since I had just asked to install it. There was a checkbox to mark to continue without installing, or, if I pressed the "Forward" button, it went back to the previous screen, asking where I wanted to install grub. Instead of looping forever, I checked the box, told it not to install grub and crossed my fingers. On reboot, there were no problems. It remains perplexing why this interaction was required.
    – belacqua
    Commented Jan 27, 2011 at 6:01
  • 2
    @StefanoPalazzo So what causes the install/don't install loop? I just had the same experience in 12.04.
    – Wes Miller
    Commented Dec 30, 2013 at 13:55
  • 2
    I just had the same issue on 14.04. I would say this was a bug, if not in code then in usability.
    – sevis127
    Commented Oct 14, 2014 at 1:18
  • 3
    Just got the same thing on 14.04. I think the purpose of the dialog was to ask you whether you would like to install Grub on any other drive, other than the one it is currently installed on, and thus showed you the "Continue without install" option. I am not totally sure about this, though.
    – Mo2
    Commented May 16, 2015 at 2:54
  • 4
    In my case, the install/don't install loop was caused by me not actually selecting a drive. I would move the selection bar to what I'd want, and then hit Enter. I was supposed to hit space bar first, making an asterisk appear in front of the selection. After I'd done that, it counted as 'selected' and would let me out of the loop.
    – spoorlezer
    Commented Nov 17, 2016 at 13:47
37

This issue was still present when I upgraded Ubuntu 16.04 after a fresh install. To fix it, do this:

  • The selection of /dev/sda is correct, so press Spacebar for the first option.
  • An asterisk appears for the /dev/sda option, signifying successful selection.
  • Then press Tab key to highlight the 'OK' button and then press Spacebar key to select the OK action.

After this, the installation should proceed smoothly.

2
  • 1
    This is only if it shows a "Bash menu" or dialog not in the example of the question with Ubuntu DE where you have a GUI and can click the checkbox with the mouse pointer.
    – Azteca
    Commented Nov 13, 2018 at 23:11
  • 2
    yeah ... this grub bug is still happening today even on Amazon EC2 Ubuntu 20.04 and on my Ubuntu 20.04 laptop ... here is a writeup on the current security grub bug "Grub2 security update renders system unbootable - news.ycombinator.com/item?id=23999212 " Commented Jul 31, 2020 at 10:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .