What is the grub-pc? #289

Closed
millisami opened this Issue Jan 28, 2011 · 12 comments

Comments

Projects
None yet

I fired up a new box (vagrant 0.6.8) and I was updating the box with aptitude and I get this visual box asking me where to install it?

What is this thing and which option do I have to choose?

Package configuration                                                                                   
 ┌──────────────────────────────────────────────┤ Configuring grub-pc ├──────────────────────────────────────────────┐  
 │ The GRUB boot loader was previously installed to a disk that is no longer present, or whose normally unique       │  
 │ identifier has changed for some reason. It is important to make sure that the installed GRUB stays in sync with   │  
 │ other components such as grub.cfg or with newer Linux images it will have to load, and so you should check again  │  
 │ to make sure that GRUB is installed to the appropriate boot devices.                                              │  
 │                                                                                                                   │  
 │ If you're unsure which drive is designated as boot drive by your BIOS, it is often a good idea to install GRUB    │  
 │ to all of them.                                                                                                   │  
 │                                                                                                                   │  
 │ Note: It is possible to install GRUB to partition boot records as well, and some appropriate partitions are       │  
 │ offered here.  However, this forces GRUB to use the blocklist mechanism, which makes it less reliable, and        │  
 │ therefore is not recommended.                                                                                     │  
 │                                                                                                                   │  
 │ GRUB install devices:                                                                                             │  
 │                                                                                                                   │  
 │    [ ] /dev/sda (42949 MB, VBOX_HARDDISK)                                                                         │  
 │    [ ] - /dev/sda1 (41420 MB, /)                                                                                  │  
 │                                                                                                                   │  
 │                                                                                                                   │  
 │                                                      <Ok>
Owner

mitchellh commented Jan 29, 2011

This is strange. I haven't seen this before. I would simply update Vagrant (to 0.7.0), redownload the latest box, and try again. I have a feeling this may be a strange issue with version compatibility.

Let me know if this helps. Also ,what OS are you on?

Owner

mitchellh commented Feb 5, 2011

Going to close this due to inactivity. I'll happily reopen with more info. :)

zimbatm commented Feb 6, 2011

Just to answer the questions:

What is this thing ? grub is the bootloader used by most linux distros. It is needed to start the operating system.

Which option do I have to choose ? Use /dev/sda.

(implicit) Why is this happening ? grub needs to install some software at the start of the disk/partition (see /dev/sda). When the package gets an upgrade, dpkg will ask you where to install that upgrade.

Well, that was my stupidity. I was running a RailsReady script published at ChangeLog.com directly in the vagrant VM.

d2kagw commented Oct 7, 2012

Thought I'd let you guys know that i've seen this start to pop up with the Precise64 box.
There's a grub update that gets installed when you do an apt-get upgrade that causes the above mentioned modal to present itself.

Really plays havoc with my Chef bootstrap file :/

vitch commented Oct 8, 2012

I'm seeing this too on the Precise64 box when I apt-get upgrade...

Choosing /dev/sda seems to allow things to work - I've successfully vagrant halt and vagrant up since running it...

cheapRoc commented Dec 6, 2012

The fix I had to use within my chef bootstrap file for Vagrant was...

apt-get -y remove grub-pc
apt-get -y install grub-pc
grub-install /dev/sda # precaution
update-grub 
# now start bootstrapping and upgrading your system packages
apt-get -y upgrade
...

fringd commented Jan 18, 2013

sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade

was the magic words for me... seems to be an ubuntu problem, maybe apt-chef is the proper place to report it?

intval commented Sep 28, 2013

After installing grub to /dev/sda all consequent boots get into Memtest and would never go back to the OS itself.

I just got this same issue after running sudo apt-get update && sudo apt-get upgrade with the vanilla precise64 box. Installing GRUB to /dev/sda (the first option, has VBOX_HARDDISK) worked fine. VM rebooted without issues.

Vagrant version: 1.4.3
Output of uname -a in VM: Linux precise64 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Host machine OS X 10.9.1, uname -a: Darwin <redacted> 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
VirtualBox version: 4.3.6 r91406

JonLevy commented Feb 21, 2014

I am having the same issue with precise64. I am running in gui mode with ubuntu-desktop installed through apt-get, and am updating through the update manager.

The update manager tells me that the disk grub-pc was previously installed on is no longer present, and gives me the option to install it one of three places (/dev/sda VBOX_HARDISK, /dev/sda1, or /dev/dm-0). However, attempts to install in any of those places fail. Update manager gives me the option to continue without installing grub-pc. When I do that, things seem to go through without a problem and restart works.

I don't know what all this means, but it doesn't inspire the greatest confidence . . . that said, it seems to be working. :)

Vagrant version 1.4.3. Host OSX 10.9.1. Virtualbox 4.3.6 r91406.

I had the same problem on a precise64 box after adding apt-get upgrade to the bootstrapping script.
My solution was to use debconf to preconfigure the selection to /dev/sda prior to apt-get update and upgrade.
And after reboot everything worked OK.

echo "set grub-pc/install_devices /dev/sda" | debconf-communicate
apt-get -y -qq update
apt-get -y -qq upgrade

This tutorial was helpful: http://feeding.cloud.geek.nz/posts/manipulating-debconf-settings-on/

Vagrant 1.5.1 VirtualBox 4.3.10 MacOX X 10.9.2

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment