Hi Dude, today I faced a problem running my linux server. The linux distro that I use is Centos 7. Suddenly server went down, after I logged in via the console the monitor show Welcome to Emergency Mode. Looked like this.
If we face like this, don’t panic. Calm down so you can think. Ha ha. :D. I write this to remember if in the future it happens again to me or my blog readers who experience the same thing.
Why Emergency Mode Happen
Usually this happens for two reasons.
- There is an additional partition in /etc/fstab that is not permanently mounted.
- There is a corrupted partition, and it is necessary to do a file system check with the
In my case, I don’t have any additional partitions, so what I checked is the existing partition, I’m afraid the partition is corrupt.
Lets Dig Problem Linux Emergency Mode
Enter password root to login to root mode. And then type “
journalctl -xb” to view system logs. Read the logs carefully and pay attention to the red log lines. When the log shown, I see an error in the mounting partition sda2 and sda3.
Boot with Live CD
Then, I try to run
fsck on the server. And it can’t. Because /etc/sda2 and /etc/sda3 are still mounted. Finally I used “Linux Live CD Gparted” to run
Running gparted with default mode. And then go to terminal. Type this.
root@debian:~# fsck /etc/sda2
We just enter “y” only.
After finished, repeat the same steps in /etc/sda3.
root@debian:~# fsck /etc/sda3
After all finish, reboot server. And now the problem is gone.
That’s it. Easiest way linux solve eelcome emergency mode. May be it’s helpful, please feel free to leave a comment if you have any questions and I’ll appreciate it.