Boot mode refers to the method used to start the system disk during the creation of an Elastic Compute Service (ECS) instance. The boot mode affects the startup efficiency, security, and operating system compatibility of the ECS instance. The boot mode of an ECS instance is determined by both the boot mode of the selected instance type and the boot mode of the image. This topic describes the boot modes of ECS instances, how to view the boot mode of a public image, and how to specify or change the boot mode of a custom image.
Introduction to boot modes
The boot mode determines which mode is used to start the system disk when an ECS instance is started for the first time. The boot mode configured when the instance is created is inherited when the instance is restarted. ECS instances support two boot modes: BIOS and UEFI.
BIOS mode: BIOS is the basic software layer in the system startup process. It is responsible for initializing hardware and providing basic hardware services to support the startup of the operating system. BIOS is a traditional firmware interface standard with limited functionality.
UEFI mode: UEFI is a more advanced and modular firmware interface standard that provides a more powerful, flexible, and secure boot environment. UEFI mode has several advantages over BIOS mode, as described in the following section.
Boot mode mechanism of ECS instances
When you create an ECS instance in the console, the boot mode of the selected instance type constrains the available image versions. For example, if you select a security-enhanced instance type that supports only the Unified Extensible Firmware Interface (UEFI) boot mode to create ECS instances, you can select only a UEFI image. When you create an instance by calling an API operation, you need to understand the factors that affect the boot mode of an ECS instance and select an appropriate combination to ensure that the instance loads the system disk in the expected mode.
The boot mode of an ECS instance is determined by both the instance type and the image boot mode. The instance boot mode is typically the boot mode that is supported by both the instance type and the image. If both support the UEFI boot mode, the instance preferentially uses the UEFI mode when it starts.
The boot mode of an instance type can be UEFI, BIOS, or both UEFI and BIOS as defined by the system. The boot mode cannot be modified.
The boot mode of an image can be UEFI, UEFI-Preferred, or BIOS.
UEFI-Preferred indicates that the image supports both UEFI mode and BIOS mode.
Public image: The boot mode is defined by the system and cannot be modified.
Custom image: You can configure the boot mode of a custom image when you import or create the custom image.
View the boot mode of an instance type
You can query the boot mode of an instance type only by calling an API operation. You can view the boot mode in the SupportedBootModes
parameter value returned by the DescribeInstanceTypes operation.
Boot mode of images
View the boot mode of an image
Method 1: Use the ECS console
In the ECS console, go to the details page of an image to view the boot mode of the image.
Method 2: Call an API operation
You can determine the boot mode of an image based on the
BootMode
parameter value returned by the DescribeImages operation.
Configure the boot mode of a custom image
You can specify a boot mode for a custom image in the ECS console or by calling an API operation.
Method 1: Use the ECS console
In the ECS console, you can specify a boot mode for a custom image only when you import the image. By default, Arm images use the UEFI boot mode, as shown in the following figure. For non-Arm images, you can specify a boot mode based on your business requirements. For more information, see Import custom images.
Method 2: Call an API operation
You can specify the boot mode of a custom image by setting the
BootMode
parameter when you call the ImportImage operation to import a custom image or call the CreateImage operation to create a custom image.
You may need to change the boot mode of a custom image in the following scenarios:
You changed the boot partition configuration of the system disk on an ECS instance and want the custom images that are created from the instance to use a different boot mode.
You selected an incorrect boot mode when you created or imported a custom image.
When you use a custom image to create an ECS instance, the boot modes of the image and the selected instance type do not match. You can change the boot mode of the custom image.
If the custom image is associated with ECS instances, you cannot change the boot mode of the image.
To ensure that the instances created from the image can start up, make sure that the new boot mode is supported by both the image and the instance type.
You can change the boot mode of a custom image in the ECS console or by calling an API operation.
Method 1: Use the ECS console
In the ECS console, go to the details page of a custom image to change the boot mode of the image. For more information, see Modify the properties of a custom image.
Method 2: Call an API operation
You can change the boot mode of an image by modifying the
BootMode
parameter value when you call the ModifyImageAttribute operation.
References
If you enable the image check feature when you create or import a custom image, the image check feature checks the boot mode of the image. For more information, see Overview of image check.