## copy -generic to -ec2
$ sudo sh -c 'for i in /boot/*-generic; do n=${i%-generic}-ec2; mv -v $i $n; done'
'/boot/System.map-4.4.0-62-generic' -> '/boot/System.map-4.4.0-62-ec2'
'/boot/abi-4.4.0-62-generic' -> '/boot/abi-4.4.0-62-ec2'
'/boot/config-4.4.0-62-generic' -> '/boot/config-4.4.0-62-ec2'
'/boot/initrd.img-4.4.0-62-generic' -> '/boot/initrd.img-4.4.0-62-ec2'
'/boot/vmlinuz-4.4.0-62-generic' -> '/boot/vmlinuz-4.4.0-62-ec2'
## run update-legacy-grub-ec2
$ 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.4.0-62-generic
Replacing config file /run/grub/menu.lst with new version
Found kernel: /boot/vmlinuz-4.4.0-62-ec2
Replacing config file /run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done
## launched a xenial instance build.info
$ cat /etc/cloud/
build_name: server
serial: 20170207
## Enable proposed sources. list) sources. list.d/ proposed. list
$ 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/
$ echo "$line" | sudo tee /etc/apt/
$ sudo apt-get update -qy
$ sudo apt-get install -qy cloud-init grub-legacy-ec2
## copy -generic to -ec2 generic} -ec2; mv -v $i $n; done' System. map-4.4. 0-62-generic' -> '/boot/ System. map-4.4. 0-62-ec2' abi-4.4. 0-62-generic' -> '/boot/ abi-4.4. 0-62-ec2' config- 4.4.0-62- generic' -> '/boot/ config- 4.4.0-62- ec2' initrd. img-4.4. 0-62-generic' -> '/boot/ initrd. img-4.4. 0-62-ec2' vmlinuz- 4.4.0-62- generic' -> '/boot/ vmlinuz- 4.4.0-62- ec2'
$ sudo sh -c 'for i in /boot/*-generic; do n=${i%-
'/boot/
'/boot/
'/boot/
'/boot/
'/boot/
## run update- legacy- grub-ec2 grub-legacy- ec2
$ sudo update-
Searching for GRUB installation directory ... found: /boot/grub 4.4.0-62- generic 4.4.0-62- ec2
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-
Replacing config file /run/grub/menu.lst with new version
Found kernel: /boot/vmlinuz-
Replacing config file /run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done