All Products
Search
Document Center

:What do I do if the Linux operating system of an ECS instance fails to start and the UEFI-Interactive-Shell error is reported?

Last Updated:Jul 30, 2024

This topic describes the causes of and solutions to the issue that the Linux operating system of an Elastic Compute Service (ECS) instance fails to start and the UEFI-Interactive-Shell error is reported.

Problem description

When you start a Linux ECS instance, the operating system of the instance fails to start. When you connect to the instance by using Virtual Network Computing (VNC), the UEFI-Interactive-Shell error is reported.

UEFI Interactive Shell

Causes

The UEFI-Interactive-Shell error occurs because the Linux ECS instance fails to start in Unified Extensible Firmware Interface (UEFI) mode. The issue may be caused by the following reasons:

  • The image of the Linux ECS instance does not support the UEFI boot mode. However, the boot mode of the image is set to UEFI. The configuration error may exist in a custom image. To resolve the issue, set the boot mode of the image to BIOS. For more information, see the Set the boot mode of the image to BIOS section of this topic.

  • The image of the instance supports UEFI. However, the UEFI firmware of the image is corrupted. To resolve the issue, repair the UEFI firmware. For more information, see the Repair the UEFI firmware section of this topic.

Solutions

To resolve the preceding issue, change the boot mode of the image or repair the UEFI firmware.

Set the boot mode of the image to BIOS

If you do not want to use the UEFI boot mode or the image does not support the UEFI boot mode, set the boot mode of the image to BIOS and then create a new instance from the image.

  1. Release the faulty Linux ECS instance.

    For more information, see Release an instance.

  2. Set the boot mode of the image to BIOS.

    For more information, see Best practices for ECS instance boot modes.

  3. Create a Linux ECS instance from the image.

    For more information, see Create an instance by using a custom image.

  4. Connect to the Linux ECS instance. If you can connect to the Linux ECS instance and the UEFI-Interactive-Shell error does not occur, the preceding issue is resolved.

    For more information, see Connection method overview.

Repair the UEFI firmware

If the instance type and image support the UEFI boot mode and you want to start the Linux ECS instance in UEFI mode, perform the following steps to repair the UEFI firmware:

  1. Detach the system disk from the faulty Linux ECS instance and attach the disk as a data disk to a healthy Linux ECS instance.

    Perform Step 1 to Step 3 described in the How do I restore system disk data? topic.

  2. Check whether all required Extensible Firmware Interface (EFI) packages are installed on the faulty Linux ECS instance and all required EFI firmware packages exist in the /boot/efi/EFI/centos directory.

    1. Run the following command to check whether all required EFI packages are installed on the faulty Linux ECS instance:

      rpm -qa |grep -i efi

      The following command output is displayed.

      rpm包

      Find a healthy Linux ECS instance that runs the same distribution as the faulty Linux ECS instance, and check the command output against the EFI packages that are installed on the healthy Linux ECS instance.

      • If the EFI packages included in the command output are the same as the EFI packages installed on the healthy Linux ECS instances, proceed to Step 2.b.

      • If an EFI package installed on the healthy Linux ECS instance is not included in the command output, run the sudo yum install command to install the EFI package on the faulty Linux ECS instance.

        For example, run the following command to install the grub2-efi-x64 package:

        sudo yum install grub2-efi-x64-2.02-0.87.el7.centos.6.x86_64
    2. Run the following command to check whether all required EFI firmware packages exist in the /boot/efi/EFI/centos directory:

      cd /boot/efi/EFI/centos && ll

      The following command output is displayed.

      efi固件

      Find a healthy Linux ECS instance that runs the same distribution as the faulty Linux ECS instance, and check the command output against the EFI firmware packages that are installed on the healthy Linux ECS instance.

      • If the EFI firmware packages included in the command output are the same as the EFI firmware packages installed on the healthy Linux ECS instances, proceed to Step 3.

      • If an EFI firmware package installed on the healthy Linux ECS instance is not included in the command output, run the sudo yum install command to install the EFI firmware package on the faulty Linux ECS instance.

        We recommend that you run the following command to re-install the grub2-efi-x64 package:

        sudo yum install grub2-efi-x64-2.02-0.87.el7.centos.6.x86_64
  3. Re-attach the system disk to the faulty Linux ECS instance.

    Perform Step 5 described in the How do I restore system disk data? topic.

  4. Connect to the Linux ECS instance. If you can connect to the Linux ECS instance and the UEFI-Interactive-Shell error does not occur, the preceding issue is resolved.

    For more information, see Connection method overview.