Comment 7 for bug 1655934

Revision history for this message
Scott Moser (smoser) wrote :

## launched a yakkety instance
$ cat /etc/cloud/build.info
build_name: server
serial: 20170207

$ lsb_release -sc
yakkety

## Enable proposed
$ rel=$(lsb_release -sc)
$ line=$(awk '$1 == "deb" && $2 ~ /ubuntu.com/ {
    printf("%s %s %s-proposed main universe\n", $1, $2, rel); exit(0) };
    ' "rel=$rel" /etc/apt/sources.list)
$ echo "$line" | sudo tee /etc/apt/sources.list.d/proposed.list
deb http://nova.clouds.archive.ubuntu.com/ubuntu/ yakkety-proposed main universe

$ sudo apt-get update -qy
$ sudo apt-get install -qy grub-legacy-ec2

$ dpkg-query show grub-legacy-ec2
grub-legacy-ec2 0.7.9-0ubuntu1~16.10.1

## copy -generic to -aws to simulate a '-aws' kernel being installed.
$ sudo sh -c 'for i in /boot/*-generic; do n=${i%-generic}-ec2; mv -v $i $n; done'
'/boot/System.map-4.8.0-37-generic' -> '/boot/System.map-4.8.0-37-ec2'
'/boot/abi-4.8.0-37-generic' -> '/boot/abi-4.8.0-37-ec2'
'/boot/config-4.8.0-37-generic' -> '/boot/config-4.8.0-37-ec2'
'/boot/initrd.img-4.8.0-37-generic' -> '/boot/initrd.img-4.8.0-37-ec2'
'/boot/vmlinuz-4.8.0-37-generic' -> '/boot/vmlinuz-4.8.0-37-ec2'

## run update-legacy-grub-ec2
## Note that we see the '-aws' kernels, before this change they
## wouldn't be considered (the.
$ sudo update-grub-legacy-ec2
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-4.8.0-37-generic
Replacing config file /run/grub/menu.lst with new version
Found kernel: /boot/vmlinuz-4.8.0-37-generic
Found kernel: /boot/vmlinuz-4.8.0-37-aws
Replacing config file /run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done