CentOS 7 automatically going to emergency mode

General support questions
Post Reply
swastik2004
Posts: 1
Joined: 2019/05/31 09:14:24

CentOS 7 automatically going to emergency mode

Post by swastik2004 » 2019/05/31 09:22:21

I installed CentOS 7 in a virtual machine (VMWare Workstation). Unfortunately, the hard disk that the VM was on detached from my computer and as a result, the computer crashed. After again reattaching the hard disk, the VM continuously entered emergency mode and didn't boot properly (hence, not taking me to the login screen). Here's the following error that it is giving

--------------------------Error--------------------------
Generating "/run/initramfs/rdsosreport.txt"

Entering emergency mode. Exit the shell to continue.
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot after mounting them and attach it to a bug report.
--------------------------Error--------------------------

Is there any way to repair the operating system so that it can boot properly and take me to the login screen as before, without any loss of data.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 7 automatically going to emergency mode

Post by TrevorH » 2019/05/31 13:29:56

You would need to use Shift-PgUp to scroll back up the console output and find the error that it is complaining about so you know what to fix.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Stevenb
Posts: 15
Joined: 2013/12/22 14:41:34

Re: CentOS 7 automatically going to emergency mode

Post by Stevenb » 2019/06/05 09:43:44

Hi,

Maybe a bit late but if you did not find a solution you could try and repair the filesystem in case of a default CentOS 7 install:
xfs_repair -v -L /dev/dm-0 (/dev/dm-0) was in my case, to find out your please run journalctl and find the error.

I had the exact same thing while testing with ZFS + KVM after restoring a snapshot.
The VM was running while I took the snapshot and did not dump the memory state properly, after restoring it was continously rebooting into the emergency mode.

The same thing can happen in case of a power outage or if you pull a disk in your case...

A quick note: If this is a VM you're having this issue on, I advise you to take a backup of the virtual hard disk as it is so if the above solution did not work you could restore the previous situation.

Post Reply