search
HomeSystem TutorialLINUXSteps to enter CentOS 7 emergency repair mode

Steps to enter CentOS 7 emergency repair mode

Jan 13, 2024 am 09:36 AM
centos7emergency fix

Open the centos7 page and appear:

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:

Execute runlevel and display unknown

Modify the default startup level

a. Delete first: mv /etc/systemd/system/default.target /etc/systemd/system/default.target.back #Rename the file

b. Create a soft link file: ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

or

ln -sf /lib/systemd/system/runlevel3.target /etc/systemd/system/default.target

You can also use the systemctl command:

systemctl set-default graphical.target

systemctl isolate multi-user.target

Error reported during execution: Error getting authority: Error initializing authority: Could not connect: Resource temporarily unavailable (g-io-error-quark, 1)

View log journalctl -xb

Found a mounting error in the log:

Steps to enter CentOS 7 emergency repair mode

It can be seen that it is a mounting problem, the /home file is not mounted

Edit automatically mounted files vi /etc/fstab

Comment out the line that mounts /home (backup first)

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

Restart the server reboot

After the startup is successful, the page is stuck on the white bar. You can press the esc key to view the startup details. It is stuck on /etc/rc.d/rc.local. Restart into single-user mode:

(1). Select e

as the default option when booting up.

Steps to enter CentOS 7 emergency repair mode

(2).Find the line of ro

Steps to enter CentOS 7 emergency repair mode

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

Steps to enter CentOS 7 emergency repair mode

(4) After entering the single-user page, execute chroot /sysroot to obtain root permissions

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

After the restart is successful, it will enter the normal mode. At this time, you can check the /home mounting problem

(1).lvs -a -o devices Check the disk details and you can see that the attr parameter of home does not have a (activated) inactive status

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

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

(4). Mount successfully, change the original comments in fstab and rc.local back

Steps to enter CentOS 7 emergency repair mode

Restart successful, problem solved

The above is the detailed content of Steps to enter CentOS 7 emergency repair mode. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:脚本之家. If there is any infringement, please contact admin@php.cn delete
Jellyfin: The Ultimate Free Media Server for Linux UsersJellyfin: The Ultimate Free Media Server for Linux UsersMay 07, 2025 am 09:23 AM

If you’re looking for a free, open-source way to manage and stream your media files on Linux, Jellyfin is the answer, which is an open-source media server that lets you organize your movies, TV shows, music, and photos in one place and stream them to

4 Ways to Convert (.MD) Files to PDF on Linux4 Ways to Convert (.MD) Files to PDF on LinuxMay 07, 2025 am 09:20 AM

Markdown (.MD) files are a favorite among developers, writers, and content creators due to their simplicity and flexibility, but what happens when you need to share your beautifully formatted Markdown file with someone who prefers a more universally

How to List Groups in Linux Like a ProHow to List Groups in Linux Like a ProMay 07, 2025 am 09:19 AM

In Linux, groups play a central role in managing user permissions and access control. Whether you're an experienced system administrator or a curious new user, understanding how to list and analyze group information is a fund

What are the differences in software availability between Linux and Windows?What are the differences in software availability between Linux and Windows?May 07, 2025 am 12:03 AM

Linuxoffersextensiveopen-sourcesoftwareandcustomization,butlackssomecommercialapplications;Windowsexcelsincommercialsoftwareandgaming,buthaslesscustomization.Linuxusespackagemanagersforeasysoftwareinstallationandprovidescommunity-drivenrepositories,w

Explain the architectural differences between Linux and Windows.Explain the architectural differences between Linux and Windows.May 06, 2025 am 12:01 AM

The main differences in architecture between Linux and Windows include: 1) Design philosophy and kernel structure: Linux uses a modular kernel, Windows uses a single kernel; 2) File system: Linux supports multiple file systems, Windows mainly uses NTFS; 3) Security: Linux is known for its permission management and open source features. Windows has a unique security mechanism but lags in repair; 4) Usage experience: Linux command line operation is more efficient, and Windows graphical interface is more intuitive.

What are some common security threats targeting Linux versus Windows?What are some common security threats targeting Linux versus Windows?May 05, 2025 am 12:03 AM

Linux and Windows systems face different security threats. Common Linux threats include Rootkit, DDoS attacks, exploits, and permission escalation; common Windows threats include malware, ransomware, phishing attacks, and zero-day attacks.

How does process management differ between Linux and Windows?How does process management differ between Linux and Windows?May 04, 2025 am 12:04 AM

The main difference between Linux and Windows in process management lies in the implementation and concept of tools and APIs. Linux is known for its flexibility and power, relying on kernel and command line tools; while Windows is known for its user-friendliness and integration, mainly managing processes through graphical interfaces and system services.

What are the typical use cases for Linux versus Windows?What are the typical use cases for Linux versus Windows?May 03, 2025 am 12:01 AM

Linuxisidealforcustomization,development,andservermanagement,whileWindowsexcelsineaseofuse,softwarecompatibility,andgaming.Linuxoffershighconfigurabilityfordevelopersandserversetups,whereasWindowsprovidesauser-friendlyinterfaceandbroadsoftwaresupport

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software