Centos7 enters Emergency Repair Mode

Source: Internet
Author: User

Centos7 enters Emergency Repair Mode

On the centos7 page, the following error occurs:

Welcome to emergency mode! After logging in, type "journalctl-xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" to try again to boot into default mode.
Give root password for maintenance
(?? Control-D ???) :

Solution:

  1. Run runlevel to display unknown

  2. Modify the default startup level

    A. Delete: mv/etc/systemd/system/default.tar get. back # rename the file.
    B. Create a soft connection file: ln-sf/lib/systemd/system/multi-user.target/etc/systemd/system/default.tar get
    Or
    Ln-sf/lib/systemd/system/runlevel3.target/etc/systemd/system/default.tar get
    You can also use the systemctl command:
    Systemctl set-default graphical.tar get
    Systemctl isolate multi-user.target

    Error: Error getting authority: error initializing authority: cocould not connect: Resource temporarily unavailable (g-io-Error-quark, 1)

  3. View the journalctl-xb log

    An error occurred while mounting the log:

    It can be seen that the Mount problem is that the/home file is not mounted.

  4. Edit the automatically mounted file vi/etc/fstab

    Comment out the line of Mount/home (back up first)

    #/Dev/mapper/centos-home/home xfs default 0 0

  5. Restart server reboot

  6. After the startup is successful, the page is stuck in white bars. You can press esc to view the startup details. It is stuck in/etc/rc. d/rc. local. Restart to enter the single-user mode:

    (1). Select e as the default option when starting the instance.

    (2) Find ro's line

    (3) Change ro to rw init =/sysroot/bin/sh and press ctrl + x to start

    (4) After Entering the single-user page, execute chroot/sysroot to obtain the root permission.

  7. After entering the single user mode, edit the rc. local file, comment out the startup items related to/home, and restart the server.

  8. After the restart is successful, the system enters the normal mode. You can check the/home mounting problem.

    (1). lvs-a-o + devices view disk details. You can see that the attr parameter of home is not a (activated) inactive.

    (2). lvchange-a y/dev/mapper/centos-home to activate home

    (3) mount home, mount/dev/mapper/centos-home/home

    (4) The mounting is successful, and the comments in fstab and rc. local are modified.

  9. Reboot successful, problem solved

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.