16

I'm running ubuntu 14.04 on an EC2.

After running apt-get upgrade, I'm prompted with a screen that asks me to reinstall GRUB boot loader

The GRUB boot loader was previously installed to a disk that is no longer present, or whose unique identifier has changed for some reason. It is important to make sure that the installed GRUB core image stays in sync with GRUB modules and grub.cfg. Please check again to make sure that GRUB is written to the appropriate boot devices.

  • How do I know which device should I select ?

  • What if I have mounted on my machine some additional EBS, should I select them as well ?

  • Can I avoid this prompt, during the upgrade or supply some defaults to the command ?

The following prompt is

A new version of /boot/grub/menu.lst is available, but the version installed currently has been locally modified.

  1. install the package maintainer's version
  2. keep the local version currently installed
  3. show the differences between the versions
  4. show a side-by-side difference between the versions
  5. show a 3-way difference between available versions
  6. do a 3-way merge between available versions (experimental)
  7. start a new shell to examine the situation

The same questions here:

  • How do I know which one should I select ?

  • Can I avoid this prompt, during the upgrade or supply some defaults to the command ?

Patrick Mevzek
  • 9,273
  • 7
  • 29
  • 42
Ofer Velich
  • 297
  • 1
  • 2
  • 6

2 Answers2

11

There is a current bug opened for this located here and it was also present is 12.02 LTS as seen here. The steps listed in the bottom of the bug report by Anders Hall do work for the 14.04 LTS 64-bit (HVM) AMI (ami-d05e75b8 in US-EAST-1):

$ sudo apt-get update
$ sudo rm /boot/grub/menu.lst
$ sudo update-grub-legacy-ec2 -y
$ sudo apt-get dist-upgrade -qq --force-yes
$ sudo reboot

Upon reboot the 14.04.2 LTS was upgraded to 14.04.3 LTS and sudo apt-get update && sudo apt-get upgrade returned 0 new packages.

gadams999
  • 111
  • 1
  • 5
4

I've gotten this myself a couple of times even though I never did any custom changes to the menu.lst file. I don't know why this happen, but I chose to compare the file and saw that it was mostly comments and references to newer versions of the kernel that had changed. There is an open issue about this in the apt bug tracker.

You should be fine with overwriting the old one with the new one (option 1), as long as you didn't do any manual changes to it. I would recommend you to create a backup AMI of the instance before updating, just to be on the safe side.

Bazze
  • 1,511
  • 9
  • 10