For scenarios such as migrating to the cloud or importing a custom image, you must check and configure the image boot mode to prevent startup failures caused by incompatibilities between the instance type and the image. This ensures that your ECS instance starts and runs stably.
Boot mode types
ECS instances support two boot modes: BIOS and UEFI.
-
BIOS: A legacy firmware interface for initializing hardware and loading the operating system. It is used mainly for compatibility with older operating systems, such as CentOS 6, Windows XP, and earlier versions.
-
UEFI: A modern replacement for BIOS that supports Secure Boot.
How the boot mode is determined
The final boot mode of an ECS instance depends on the boot modes supported by both its instance type and image. The instance type defines the hardware-level limitations, while the image determines the software-level boot method.
-
Instance type boot mode: Defined by Alibaba Cloud and cannot be changed. Options include
UEFI,BIOS, and support for both modes (UEFI & BIOS). -
Image boot mode: The boot mode of a public image is defined by the system. For a custom image, you can modify the boot mode after creation or during import. Options include
UEFI,BIOS, andUEFI-Preferred(the image supports both modes but prioritizes UEFI mode).
The instance type boot mode and image boot mode must match. If they are incompatible (for example, using a BIOS image with a UEFI-only instance type), the instance may fail to start.
|
Instance type boot mode |
Image boot mode |
Final boot mode |
|
|
|
|
|
|
|
|
|
|
|
Matches the image boot mode. If the image boot mode is If the image boot mode is |
|
|
|
Configure boot mode
When you import a custom image, Alibaba Cloud can only recognize the image's metadata; it cannot inspect or modify the bootloader configuration within the image file. Before you configure the boot mode of a custom image, make sure the image file is correctly configured with the corresponding bootloader, such as an EFI System Partition (ESP) for UEFI or a MBR partition table for BIOS. An incorrect configuration will cause the instance to fail to recognize the system disk, resulting in a startup failure.
Specify boot mode during import
Console
-
Go to the Images page in the ECS console. In the top menu bar, select the region where the target ECS instance is located.
-
In the upper-right corner of the Images page, click Import Image.

-
In the Import Image dialog box, configure the required parameters and then select a Boot Mode.
You cannot set the boot mode to UEFI-Preferred during image import. To enable this mode, modify the setting after the image is successfully imported.

-
Click OK.
API
When you call the ImportImage API to import a custom image, use the BootMode parameter to specify its boot mode.
Modify a custom image's boot mode
To ensure the stability and consistency of existing instances, you cannot modify the boot mode of a custom image once it has been used to create an instance.
Console
-
Go to the Images page in the ECS console. In the top menu bar, select the region where the target ECS instance is located.
-
Click the target image ID to open the image details page.
-
In the Basic Information section, click the
icon next to Boot Mode. -
In the Set Boot Mode dialog box, select a boot mode, and then click OK.
API
Call the ModifyImageAttribute API operation and use the BootMode parameter to modify the image boot mode.
FAQ
Why are some images unavailable during instance creation?
When you create an ECS instance in the console, the boot mode of the selected instance type restricts the available images. For example, if you select a security-enhanced instance type that only supports UEFI, the console filters out images that only support BIOS.
How do I view an instance type's boot modes?
Console
-
Go to the Custom Launch page in the ECS console.
-
On the Instance page, select the All Specifications tab and click View more specification parameters.

-
Select the Supported Boot Mode checkbox and click OK.

-
Enter the target instance type to view its supported boot modes.

API
Call the DescribeInstanceTypes API operation. The SupportedBootModes field in the response indicates the boot modes supported by the instance type.
-
In the
InstanceTypeFamilyorInstanceTypesparameter, enter the instance type or instance family that you want to query. -
Click Initiate Call.
In the response, the
SupportedBootModesfield shows the supported boot modes for the specified instance type.
How do I view an image's boot mode?
Console
-
Go to the Images page in the ECS console. In the top menu bar, select the region where the target ECS instance is located.
-
Click the target image ID to open the image details page.
-
In the Basic Information section, view the image's Boot Mode.

API
Call the DescribeImages API operation. The BootMode field in the response specifies the image's boot mode.
How do I check if an image uses BIOS or UEFI?
Run the check on the source server used to create the image, or on a temporary instance created from the image:
-
Linux systems: Check whether the
/sys/firmware/efidirectory exists. If it exists, the system boots in UEFI mode. -
Windows systems: Check the partition table type of the system disk. Open PowerShell as an administrator and run the
Get-Diskcommand. In the output, check thePartitionStylecolumn. A GPT partition table corresponds to UEFI boot, while an MBR partition table corresponds to BIOS boot.

