2

Ubuntu only has HVM images for Amazon (https://cloud-images.ubuntu.com/locator/ec2/)

According to Amazon, you cannot create AMI's at all if you're using grub v2, and starting with an HVM:

"GRUB Legacy (version 0.9x or less) must be installed on your instance." (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-instance-store-ami.html#ubuntu_instructions)

But Ubuntu current versions no longer have grub less than v2 (starting with bionic, I believe?).

This seems to be a catch-22, Amazon's insistence on very old grub (which bemuses me) combined with Ubuntu only supporting HVM base-images (which seems a poor decision while Amazon is blocking them). How do I escape from this? :)

UPDATE: Response from Amazon support is that they don't support AMI without EBS any more, so no-one should be using it (and, I guess, they need to update/remove their docs that explain how to do it!)

Adam
  • 81
  • 7

2 Answers2

0

Per the documentation, the way forward in this situation is to start with an Ubuntu instance store backed AMI, and install the compatible version of grub, as detailed here:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-instance-store-ami.html#ubuntu_instructions

Once you install the grub package and verify that you are utilizing GRUB legacy via grub --version you can continue with the remaining steps for creating Instance Store AMIs.

You can find a list of instance backed Ubuntu AMIs by region(and point release) here to base yours on: https://cloud-images.ubuntu.com/locator/ec2/

  • As per the question: the legacy version of grub does not exist in Ubuntu any more (it was removed a couple of versions ago, and there is no replacement package). I wish I could install the package, but since it doesn't exist... – Adam Feb 19 '20 at 00:29
  • Ah, I took 'versions no longer have grub less than v2' to mean that it wasn't installed, not that the repository no longer has Grub Legacy in it. Perhaps a dist-upgrade from an older version with Grub Legacy installed might do the trick. – ofperfection Feb 19 '20 at 01:01
0

Response from Amazon support is that they don't support AMI without EBS any more, so no-one should be using it (and, I guess, they need to update/remove their docs that explain how to do it!).

On further research ... Amazon has also deleted a lot of the EC2 hardware that they used to provide, so that you cannot realistically use instance-store AMIs without paying a large increased minimum cost (This is a bit sneaky of them...).

So, net result: if you used to use instance-stores, and liked them: don't. Amazon doesn't want people using that any more, and they're hiking prices to preven it, while killing it by not updating their tools and scripts, so that maintenance becomes severely difficult.

This is fine, it's just ... it would have been better if they'd mentioned that up-front in the documentation :).

Adam
  • 81
  • 7