All Products
Search
Document Center

Elastic Compute Service:Instance boot modes

Last Updated:Dec 11, 2025

When migrating to the cloud or importing a custom image, you must configure the correct boot mode. Matching the image boot mode with the instance type is essential to prevent startup failures and ensure your Elastic Compute Service (ECS) instance runs reliably.

Boot mode types

An ECS instance supports two boot modes: BIOS and UEFI.

  • BIOS: A traditional firmware interface used to initialize hardware and load the operating system. It is primarily used for compatibility with legacy operating systems, such as CentOS 6, Windows XP, and earlier versions.

  • UEFI: A modern replacement for BIOS that supports features like Secure Boot.

How the boot mode is determined

An ECS instance's final boot mode depends on the modes supported by both its instance type and image. The instance type dictates the hardware constraints, while the image specifies the software's boot method.

  • Instance type boot mode: Defined by Alibaba Cloud and cannot be changed. The options are UEFI, BIOS, or support for both (UEFI & BIOS).

  • Image boot mode: Public images use a default boot mode defined by Alibaba Cloud. You can modify a custom image's boot mode after it is created or during import. The options are UEFI, BIOS, or UEFI-Preferred. UEFI-Preferred indicates that the image supports both modes but attempts to start in UEFI mode first.

The boot modes of the instance type and the image must be compatible. If the instance type's boot mode does not match the image's boot mode (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 instance boot mode

UEFI

UEFI or UEFI-Preferred

UEFI

BIOS

BIOS or UEFI-Preferred

BIOS

UEFI & BIOS

UEFI or BIOS

Follows the image boot mode.

If the image boot mode is UEFI, the final mode is UEFI.
If the image boot mode is BIOS, the final mode is BIOS.

UEFI-Preferred

UEFI

Configure the boot mode

Important

When you import a custom image, Alibaba Cloud can only read the image's metadata. It cannot inspect or modify the bootloader configuration inside the image file. Before you configure the boot mode for a custom image, ensure the image file has the correct bootloader configuration, such as an EFI System Partition (ESP) for UEFI or a Master Boot Record (MBR) for BIOS. An incorrect configuration will prevent the instance from recognizing the system disk and cause a startup failure.

Specify the boot mode when importing a custom image

Console

  1. In the ECS console, go to the Images page. In the top navigation bar, select the target region.

  2. In the upper-right corner of the Images page, click Import Image.

    image.png

  3. In the Import Image dialog box, configure the necessary parameters, then select a Boot Mode.

    You cannot set the boot mode to UEFI-Preferred during image import. To set it to UEFI-Preferred, you must modify the image after it is successfully imported.

    image

  4. Click OK.

API

When you call the ImportImage operation to import a custom image, use the BootMode parameter to specify the image's boot mode.

Modify the boot mode of an existing custom image

Important

To ensure the stability and consistency of running instances, you cannot modify the boot mode of a custom image once it has been used to create an instance.

Console

  1. In the ECS console, go to the Images page. In the top navigation bar, select the region where the target custom image is located.

  2. Click the target image's ID to open its details page.

  3. In the Basic Information section, click the image icon next to Boot Mode.

  4. In the Set Boot Mode dialog box, select a boot mode and click Confirm.

API

Call the ModifyImageAttribute operation and set the BootMode parameter to modify the boot mode of the image.

FAQ

Why can't I see or select certain image versions when creating an ECS instance?

When you create an ECS instance in the console, the boot mode of your selected instance type restricts the available image versions. For example, if you select a security-enhanced instance type that only supports UEFI mode, the console filters out images that only support BIOS mode.

How can I view the boot modes supported by an instance type?

Console

  1. Go to the Custom Launch page in the ECS console.

  2. On the Instance page, select the All Instance Types tab and click View more specification parameters.

    image

  3. Select the Supported Boot Mode checkbox and click OK.

    image

  4. Enter the target instance type in the search box to view its supported boot modes.

    image

API

You can query this information by calling the DescribeInstanceTypes operation. The SupportedBootModes field in the response lists the boot modes supported by the instance type.

How can I view the boot mode of an image?

Console

  1. Go to the Images page in the ECS console. In the top navigation bar, select the target region.

  2. Click the target image's ID to open its details page.

  3. The image's Boot Mode is shown in the Basic Information section.

    image

API

Call the DescribeImages operation. The boot mode of the image is specified in the BootMode parameter of the return value.

How do I check whether my custom image uses a BIOS or UEFI bootloader internally?

You must perform this check on the source server used to create the image or on a temporary instance created from the image.

  • For Linux: Check if the /sys/firmware/efi directory exists. If it exists, the operating system was booted in UEFI mode.

  • For Windows: Check the partition table type of the system disk. Open PowerShell as an administrator and run the Get-Disk command. In the command's output, check the PartitionStyle column. A GPT partition style indicates UEFI boot, while an MBR partition style indicates BIOS boot.

References

Import a custom image