I changed my Linux instance type to C5 or M5 and now it won't boot. How do I fix that? 

Your Linux instance might not boot after you change its type to C5 or M5 for the following reasons:

1.    The enhanced networking adapter (ENA) enaSupport attribute is disabled for the instance.

2.    The Elastic Network Adapter module is not installed on the instance.

3.    The NVMe module is not installed on the instance, or, if installed, the NVMe module is not loaded in the initramfs image of the instance.

4.    You are trying to mount the file systems at boot time in the "/etc/fstab" file using a device name. EBS volumes are exposed as NVme devices to these instance types, and the device names are changed. To avoid this, mount the file systems using UUID/Label. For more information, see Amazon EBS and NVMe.

You can remedy these issues by taking steps to be sure that ENA is enabled, and that your Linux instance meets the C5 or M5 module and file system mounting requirements.

Be sure that ENA is enabled

To be sure that ENA is enabled, see Instance Attribute (enaSupport) under Testing Whether Enhanced Networking with ENA is Enabled. If ENA is disabled, use the modify-instance-attribute action to enable ENA support. For detailed steps, see To enable enhanced networking with ENA (EBS-backed instances) under Enabling Enhanced Networking with ENA on Amazon Linux.

Run the c5_m5_checks_script

The c5_m5_checks_script checks your instance and provides a pass/fail status of these requirements:

  • Verifies if the NVMe module is installed on your instance. If yes, then the script verifies that the module is loaded in the intiramfs image.
  • Verifies if ENA module is installed on your instance
  • Analyzes the "/etc/fstab" and looks for block devices being mounted using device names.

This script is supported on the following OS versions:

  • Red Hat derivatives: Red Hat Linux, Red Hat Enterprise Linux, CentOS
  • Amazon Linux, Amazon Linux 2
  • Debian derivatives: Debian, Ubuntu

To run the c5_m5_checks_script:

1.    Take a snapshot of your volume or create an AMI of an instance before making any changes so that you have a backup.

2.    Change your instance type to its original type.

3.    Place the script on your instance and make it executable:

# chmod +x c5_m5_checks_script.sh

4.    Run the script as a "root" user or "sudo":

# sudo ./c5_m5_checks_script.sh

5.    At the prompt, type y or n (or No) to regenerate and modify your current "/etc/fstab" file to replace the device name of each partition with its UUID.
Type y if you want the script to rewrite the current "/etc/fstab" file. The original fstab file is saved as /etc/fstab.backup.$(date +%F-%H:%M:%S) For example, /etc/fstab.backup.2018-05-01-22:06:05
Type n or No to print the correct /etc/fstab file in the output, but not replace it.

If everything is fine, you will receive the following output:

------------------------------------------------
OK  NVMe Module is installed and available on your instance
OK  ENA Module is installed and available on your instance
OK  fstab file looks fine and does not contain any device names.
------------------------------------------------

6.    After all the requirements are met, change the instance type to C5 or M5.


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2018-05-30