tencent cloud

Feedback

Login Failure Due to /etc/fstab Configuration Errors

Last updated: 2022-08-12 15:06:28

    Error Description

    Error: Unable to remotely log in to the Linux CVM via SSH. After logging in to the CVM via VNC, you can check the system start-up failure and view the prompt message "Welcome to emergency mode".

    Possible Causes

    The /etc/fstab is not properly configured.
    For example, you've configured the auto-attaching of disk based on device name in the /etc/fstab file. If the device name is changed when the CVM restarts, this configuration will cause the system to fail to start up normally.

    Solutions

    See Steps to repair the /etc/fstab configuration file. Then, restart the CVM to verify the repaired file.

    Steps

    You can access the instance in the following 2 methods for troubleshooting:

    1. Log in to Linux Instances (VNC).
    2. After entering the VNC interface, you see the interface shown in Error Description. Enter the root account password and press Enter to log in to the server.
    • The entered password is not displayed by default.
    • If you do not have or forgot the root account password, see Method 2 for troubleshooting.
    1. Run the following command to back up the /etc/fstab file to the /home directory, for example:
      cp /etc/fstab /home
      
    2. Run the following command to use VI editor to open the /etc/fstab file.
      vi /etc/fstab
      
    3. Press i to enter the edit mode. Move the cursor to the beginning of the error line and enter # to comment out this configuration.
      Note

      If you cannot determine the error, it is recommended that you comment out the configurations of all attached disks except the system disks, and then configure the file as instructed in Step 8 after the server recovers.

    4. Press Esc, enter :wq, and press Enter to save the configuration and exit the editor.
    5. Restart the instance in the CVM console to see if it can be started and logged in properly.
      Note

      Restart the instance through the console. For more information, see Restarting Instances.

    6. After successful login, if you need to configure the auto-attaching of the disk, see Cloud Disk Automount Failed upon Linux CVM Restart.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support