ECS instance enters rescue mode after upgrading Systemd to systemd-219-71.el7

更新时间:
复制 MD 格式

Problem description

If an ECS instance has a single CPU and runs CentOS 7 or Red Hat 7, it enters rescue mode (maintenance mode) after you upgrade Systemd to systemd-219-71.el7 and restart the instance. The following message appears.

Give root password for maintenance
(or press Control-D to continue): 

This causes system network services and general application services to fail.

Problem cause

On systems that run CentOS 7 or Red Hat 7, upgrading the Systemd package to systemd-219-71.el7 triggers a bug in an older package, which causes the ECS instance to enter rescue mode after a restart. An ECS instance is affected if it meets the following conditions:

  • The ECS instance runs a CentOS 7 or Red Hat 7 operating system.

  • Systemd is upgraded to systemd-219-71.el7, and the instance is restarted. The upgrade may be triggered in the following scenarios:

    • You upgrade Systemd manually. For example, you run the yum update command to upgrade all packages or the Systemd package.

    • Security Center is used to fix vulnerabilities. This service may upgrade the Systemd package when fixing vulnerabilities.

  • The ECS instance has a single-CPU instance type. The single-CPU ECS instance types are as follows:

    • ecs.s6-c1m1.small

    • ecs.s6-c1m2.small

    • ecs.s6-c1m4.small

    • ecs.xn4.small

    • ecs.n1.small

    • ecs.n4.small

    • ecs.e4.small

    • ecs.e3.small

    • ecs.mn4.small

    • ecs.n1.tiny

    • ecs.n2.small

    • ecs.t5-lc2m1.nano

    • ecs.t5-lc1m1.small

    • ecs.t5-lc1m2.small

For more information about this issue, see the official Red Hat documentation.

Solutions

If your ECS instance runs CentOS 7 or Red Hat 7 and has a single-CPU instance type, choose the solution that matches your scenario:

  • If the Systemd program has been upgraded and the ECS instance is in rescue mode, perform the following steps:

    1. Create a snapshot backup for the system disk of the ECS instance. For more information, see Create a snapshot.

    2. Log on to the ECS instance as the root user using a VNC connection. For more information, see Connect to a Linux instance using a VNC connection.

    3. Run the following command to regenerate the grub configuration.

      dracut --force --regenerate-all
    4. Restart the ECS instance.

  • If the ECS instance is stable and you plan to upgrade the Systemd program, create a system snapshot backup before you perform any operation that might trigger the upgrade or install updated software.

Applies to

  • Elastic Compute Service