All Products
Search
Document Center

Elastic Compute Service:Best practices for ECS instance boot modes

最終更新日:May 06, 2024

A boot mode is a mode in which the system disk is booted during Elastic Compute Service (ECS) instance creation. The boot mode of an ECS instance is determined based on the boot modes supported by the instance type and the boot mode of the image that is used to create the instance. This topic describes the boot modes of ECS instances, how to view the boot modes of public images, and how to specify or change the boot modes of custom images.

Introduction

ECS supports the Legacy Basic Input/Output System (BIOS) and Unified Extensible Firmware Interface (UEFI) boot modes:

  • Legacy BIOS boot mode: BIOS, which is the basic software layer involved in the system boot process, is used to initialize hardware. BIOS provides basic hardware services to support the boot of an 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.

    The UEFI boot mode has advantages over the Legacy BIOS boot mode.

    • Support for large disk sizes

      Legacy BIOS uses the Master Boot Record (MBR) partitioning scheme and supports hard disks that are up to 2 TB in size. UEFI uses the GUID Partition Table (GPT) partitioning scheme and supports hard disks that are larger than 2 TB in size.

    • High speed and performance

      In Legacy BIOS boot mode, all devices must be scanned at boot time. In UEFI boot mode, only necessary drivers need to be loaded at boot time, and the boot speed is faster compared with the Legacy BIOS boot mode.

    • Security

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

    • Scalability

      UEFI is an extensible, standard solid-state interface. Legacy BIOS is a rigid, unofficial standard that is developed based on conventions that are no longer relevant and is poorly documented.

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

The boot mode of an ECS instance (the third column in the following table) is determined based on the boot modes supported by the instance type (the first column in the following table) and the boot mode of the image (the second column in the following table).

Boot mode supported by the instance type

Boot mode of the image

Boot mode of the ECS instance

UEFI

UEFI

UEFI

UEFI

UEFI-Preferred

UEFI

Legacy BIOS

Legacy BIOS

Legacy BIOS

Legacy BIOS

UEFI-Preferred

Legacy BIOS

Legacy BIOS and UEFI

UEFI

UEFI

Legacy BIOS and UEFI

Legacy BIOS

Legacy BIOS

Legacy BIOS and UEFI

UEFI-Preferred

UEFI

Note

: If the boot mode of an image is UEFI-Preferred, the image can use the Legacy BIOS or UEFI boot mode. If an instance type supports Legacy BIOS and UEFI boot modes, and the boot mode of an image is UEFI-Preferred, the UEFI boot mode is used when an ECS instance is created.

Boot modes supported by instance types

ECS instance types support UEFI, Legacy BIOS, or both. You cannot change the boot modes supported by ECS instance types. The following table describes the boot modes that are supported by different instance families.

Boot mode

Instance family

Legacy BIOS

  • x86-based enterprise-level computing instance families

    • ecs.i2, ecs.i2g, ecs.i2ne, ecs.i2gne, ecs.d2s, ecs.re6, ecs.d2c, ecs.u1, ecs.d3s, ecs.d3c, ecs.i3g, ecs.i4g, ecs.i4p, and ecs.i4r

    • ecs.hfc5 and ecs.ic5

    • ecs.g6a, ecs.c6a, ecs.r6a, ecs.g6h, and ecs.re6p

    • ecs.g7a, ecs.r7a, ecs.c7a, ecs.re7p, ecs.r7p, ecs.g7nex, and ecs.c7nex

  • Enterprise-level heterogeneous computing instance families

    • ecs.gn5, ecs.gn5i, and ecs.vgn5i

    • ecs.gn6e, ecs.gn6i, ecs.gn6v, and ecs.vgn6i-vws

    • ecs.gn7, ecs.gn7e, ecs.gn7i, ecs.gn7r, ecs.gn7s, ecs.sgn7i-vws, ecs.vgn7i-vws, and ecs.sccgn7ex

  • ECS Bare Metal Instance families and Super Computing Cluster (SCC) instance families

    • ecs.ebmg5, ecs.ebmr5, and ecs.ebmhfg5

    • ecs.ebmg6e, ecs.ebmc6e, ecs.hfr6, ecs.ebmc6, ecs.ebmr6, ecs.ebmgn6i, and ecs.ebmgn6v

    • ecs.ebmr7, ecs.ebmg7, ecs.ebmc7, ecs.ebmhfr7, ecs.ebmhfg7, ecs.ebmhfc7, ecs.ebmgn7e, and ecs.ebmgn7i

UEFI

  • x86-based enterprise-level computing instance families

    • ecs.c6t and ecs.g6t

    • ecs.c7t, ecs.g7t, and ecs.r7t

  • Arm-based enterprise-level computing instance families

    • ecs.c6r and ecs.g6r

    • ecs.g8y, ecs.c8y, and ecs.r8y

  • ECS Bare Metal Instance families and SCC instance families

    • ecs.ebmg6a, ecs.ebmr6a, ecs.ebmc6a, and ecs.ebmgn6ia

    • ecs.ebmg7a, ecs.sccc7, ecs.sccg7, ecs.ebmc7a, ecs.ebmr7a, ecs.ebmgn7ex, ecs.ebmgn7ix, and ecs.ebmgn7vx

Legacy BIOS and UEFI

  • x86-based enterprise-level computing instance families

    • ecs.g5, ecs.c5, ecs.g5ne, ecs.hfg5, and ecs.r5

    • ecs.g6, ecs.c6, ecs.c6e, ecs.hfg6, ecs.g6e, ecs.r6e, ecs.hfc6, and ecs.r6

    • ecs.g7, ecs.c7, ecs.r7, ecs.hfg7, ecs.g7ne, ecs.hfc7, ecs.hfr7, ecs.g7nex, and ecs.c7nex

    • ecs.g8i, ecs.c8i, ecs.g8a, ecs.c8a, ecs.r8a, ecs.g8ae, ecs.c8ae, ecs.r8ae, ecs.hfg8i, ecs.hfc8i, and ecs.hfr8i

  • x86-based shared computing instance families

    • ecs.n4

    • ecs.t5

    • ecs.s6 and ecs.t6

When you create an ECS instance, the image versions that you can select may be affected by the boot modes supported by the instance type that you select. For example, if you select a security-enhanced instance type that supports only UEFI, you can select only UEFI images, as shown in the following figure.

image..png

Boot modes of images

Boot modes of public images

The following section describes the default boot modes that are supported by different versions of public images:

  • UEFI public images: support only the UEFI boot mode.

    For example, the UEFI boot mode is used by the public images whose operating system names contain UEFI, such as Alibaba Cloud Linux 2.1903 64-bit (UEFI), Ubuntu 18.04 64-bit (UEFI), and Debian 11.6 64-bit (UEFI).

  • Arm public images: support the UEFI boot mode by default.

    For example, the UEFI boot mode is used by the public images whose operating system names contain ARM, such as Ubuntu 20.04 64-bit for ARM and CentOS 8.4 64-bit for ARM.

  • Other public images: support the Legacy BIOS or UEFI-Preferred boot mode by default.

Boot modes of custom images

Specify a boot mode for 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.

    image

  • Method 2: Call an API operation

    When you call the ImportImage operation to import a custom image or call the CreateImage operation to create a custom image, configure the BootMode parameter to specify a boot mode for the custom image.

    • If the value of the BootMode parameter is BIOS, the image uses the Legacy BIOS boot mode.

    • If the value of the BootMode parameter is UEFI, the image uses the UEFI boot mode.

    • If the value of the BootMode parameter is UEFI-Preferred, the image can use the Legacy BIOS or UEFI boot mode.

      Note

      You cannot specify the UEFI-Preferred boot mode for imported custom images.

Change the boot mode of a custom image

You cannot change the boot mode of a public image. You can 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.

    Important
    • If the 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 an image to change the boot mode of the image. For more information, see Modify the attributes and tags of an image.

  • Method 2: Call an API operation

    You can change the boot mode of an image by calling the ModifyImageAttribute operation and changing the value of the BootMode parameter.

    If the value of the BootMode parameter is BIOS, the image uses the Legacy BIOS boot mode.

    If the value of the BootMode parameter is UEFI, the image uses the UEFI boot mode.

    If the value of the BootMode parameter is UEFI-Preferred, the image can use the Legacy BIOS or UEFI boot mode.

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

    Call the DescribeImages operation to query the image and check the boot mode of the image in the BootMode response parameter.

    • If the value of the BootMode parameter is BIOS, the image uses the Legacy BIOS boot mode.

    • If the value of the BootMode parameter is UEFI, the image uses the UEFI boot mode.

    • If the value of the BootMode parameter is UEFI-Preferred, the image can use the Legacy BIOS or UEFI boot mode.

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.

  • When you create an image file on your on-premises computer, you can specify the Legacy BIOS or UEFI boot mode for the operating system. For more information, see Create Linux image files and Create Windows image files.