All Products
Search
Document Center

Elastic Compute Service:Instance boot mode

Last Updated:May 15, 2026

Configure the correct boot mode when importing a custom image to prevent startup failures.

Boot mode types

ECS supports two boot modes:

Mode Description Typical use
BIOS Traditional firmware interface that initializes hardware and loads the OS Legacy OSs such as CentOS 6 and Windows XP
UEFI Modern firmware standard with Secure Boot support Modern OSs and security-enhanced instance types

How the boot mode is determined

The final boot mode depends on the instance type's supported boot mode and the image's configured boot mode.

Instance type boot mode — set by Alibaba Cloud, not changeable. Options: UEFI, BIOS, or UEFI & BIOS.

Image boot mode — public images use a default mode. For custom images, set the mode during import or modify it later. Options: UEFI, BIOS, or UEFI-Preferred.

UEFI-Preferred means the image supports both modes but boots in UEFI when the instance type allows it.

The following table shows how the final boot mode is determined:

Instance type boot mode Image boot mode Final boot mode
UEFI UEFI or UEFI-Preferred UEFI
BIOS BIOS or UEFI-Preferred BIOS
UEFI & BIOS UEFI UEFI
UEFI & BIOS BIOS BIOS
UEFI & BIOS UEFI-Preferred UEFI

If the instance type and image boot modes are incompatible — for example, a BIOS image on a UEFI-only instance type — the instance fails to start.

Configure the boot mode

Prerequisites

Before configuring the boot mode for a custom image, verify:

  • The image has the correct bootloader configuration:

    • UEFI: The image has an EFI System Partition (ESP)

    • BIOS: The image has a Master Boot Record (MBR)

  • The intended boot mode is compatible with the target instance type (see the table above)

Important

Alibaba Cloud can only read image metadata during import — it cannot inspect or modify the internal bootloader configuration. An incorrect bootloader causes the instance to fail to recognize the system disk.

Specify the boot mode when importing a custom image

Console

  1. In the ECS console, go to the Images page and 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 parameters and select a Boot Mode.

    UEFI-Preferred cannot be set during import. To use UEFI-Preferred, import the image first, then modify the boot mode.

    image

  4. Click OK.

API

Call ImportImage and set BootMode to the desired boot mode.

Modify the boot mode of an existing custom image

Important

After a custom image is used to create an instance, its boot mode cannot be modified.

Console

  1. In the ECS console, go to the Images page and select the region of the target custom image.

  2. Click the image ID to open its details page.

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

  4. Select a boot mode and click Confirm.

API

Call ModifyImageAttribute and set BootMode to the desired mode.

FAQ

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

The instance type's boot mode filters available images. If you select a security-enhanced instance type that only supports UEFI, BIOS-only images are hidden. Select a different instance type or use a UEFI-compatible image.

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

Console

  1. Go to the Custom Launch page.

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

    image

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

    image

  4. Search for the target instance type to view its supported boot modes.

    image

API

Call DescribeInstanceTypes. The SupportedBootModes field in the response lists the supported boot modes.

How can I view the boot mode of an image?

Console

  1. Go to the Images page and select the target region.

  2. Click the image ID to open its details page.

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

    image

API

Call DescribeImages. The boot mode is returned in BootMode.

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

Run this check on the source server or on a temporary instance created from the image.

  • Linux: Check if /sys/firmware/efi exists. If yes, the system booted in UEFI mode.

  • Windows: Open PowerShell as administrator and run Get-Disk. Check PartitionStyle: GPT indicates UEFI, MBR indicates BIOS.

Next steps

Import a custom image