Updating GRUB in Ubuntu Amazon EC2 Instance

Sam RuebyAmazon Web Services 2 Comments

Twice now I’ve updated packages on my Ubuntu Amazon EC2 instance which is based-on the linux-ubuntu-12.04.4-x86_64-hvm-ebs AMI and have been presented with this scary message.

Package configuration Configuring grub-pc

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.

Well that sounds scary. And let me tell you: if you choose wrong, your instance will not boot again. EC2 won’t even display the system log in the AWS interface, it will just sit there and never come back up again. Well I’m here to have made that mistake and can tell you what worked for me. At my screen, these were my choices:

Package configuration GRUB install devices

The correct selection is /dev/xvda. At least it was for me. No guarantees. At least if you choose incorrect, the message afterwards is pretty funny:

GRUB wrong choice

Good luck and don’t make a cloud instance unbootable: it’s cruel.