Instance boot modes

Updated at: 2025-04-15 07:20

A boot mode is the mode in which the system disk is booted 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 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.

Boot modes

The boot mode of an ECS instance determines the mode that is used to boot the system disk of the instance on first instance startup. If you restart an ECS instance, the system uses the boot mode configured during instance creation to boot the system disk. ECS instances support the Basic Input/Output System (BIOS) and Unified Extensible Firmware Interface (UEFI) boot modes.

  • BIOS boot mode: BIOS, which is the basic software layer involved in the system boot process, is responsible for initializing hardware and providing basic hardware services to support the boot of the operating system. BIOS is a traditional firmware interface standard with limited functionality.

  • UEFI boot mode: UEFI, which is a substitute for BIOS, is a more advanced and modular firmware interface standard. UEFI provides a more powerful, flexible, and secure boot environment.

    Advantages of UEFI over BIOS

    • Support for large disk sizes

      BIOS supports only the Legacy boot mode, relies on the Master Boot Record (MBR) partition table, and supports hard disks that are up to 2 TB in size. UEFI uses the GUID Partition Table (GPT) partition table and supports hard disks that are larger than 2 TB in size.

    • High speed and performance

      UEFI uses a parallel initialization mechanism, which typically provides faster startup speeds compared with sequential hardware detection used by BIOS.

    • Security

      UEFI provides the Secure Boot feature. UEFI allows only authentic drivers and services to load at boot time and ensures that ECS instances do not load malware on startup. UEFI requires digital signatures for drivers and the kernel. You can use UEFI to protect against piracy and boot-sector malware.

    • Scalability

      UEFI is an extensible and standardized firmware interface, whereas BIOS is fixed, poorly documented, and entirely based on experience and obscure conventions as a de facto standard.

    • Flexibility

      UEFI is a 32-bit or 64-bit program that is written in the C language. UEFI is not limited to real mode and provides more addressable address space. BIOS is a 16-bit program assembly language that can run only in 16-bit real mode and provides only 1 MB of addressable memory.

Boot modes of ECS instances

When you create an ECS instance in the ECS console, available image versions vary based on the boot mode of the selected instance type. For example, if you select a security-enhanced instance type that supports only the UEFI boot mode to create ECS instances, you can select only a UEFI image. When you create an ECS instance by calling an API operation, familiarize yourself with 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 the boot mode of the instance type and the boot mode of the image. In most cases, the instance boot mode is the boot mode that is supported by both the instance type and the image. If both the instance type and the image support the UEFI boot mode, the instance preferentially uses the UEFI boot mode when it starts.

  • The boot mode of an instance type can be UEFI, BIOS, or both, which is defined by the system and cannot be changed.

  • The boot mode of an image can be UEFI, UEFI-Preferred, or BIOS.

    Note

    UEFI-Preferred indicates that the image supports both UEFI and BIOS boot modes.

Mapping between the boot modes of instance types and images and the boot modes of ECS instances

Boot mode of the instance type

Boot mode of the image

Boot mode of the ECS instance

UEFI

UEFI

UEFI

UEFI

UEFI-Preferred

UEFI

BIOS

BIOS

BIOS

BIOS

UEFI-Preferred

BIOS

Both BIOS and UEFI

UEFI

UEFI

Both BIOS and UEFI

BIOS

BIOS

Both BIOS and UEFI

UEFI-Preferred

UEFI

BIOS

UEFI

The instance cannot start

UEFI

BIOS

The instance cannot start

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.

    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

Specify the boot mode of a custom image
Change 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 other images, you can specify a boot mode based on your business requirements. For more information, see Import a custom image.

    image

  • 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.

    Important
    • 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, 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 attributes and tags of a custom image.

  • Method 2: Call an API operation

    You can change the boot mode of an image by modifying the BootMode parameter 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.

  • On this page (1)
  • Boot modes
  • Boot modes of ECS instances
  • View the boot mode of an instance type
  • Boot mode of images
  • View the boot mode of an image
  • Configure the boot mode of a custom image
  • References
Feedback