Skip to content

[Solved][Linux] 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

Today, the area where the server is located suddenly went out of power. After the power supply was normal, I quickly restarted the server that was stopped urgently (without UPS installed...). Basically all the devices are fine, only one host fails to start, and the following error occurs all the time.

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

After inquiring, netizens on the Internet concluded that it was more likely that there was a problem with the automatic mounting of the hard disk, which cause the inability to enter the boot program.

In fact, it was finally confirmed that this was the problem.

To solve this problem, maybe you can try:

  1. If you have the root password, you can enter it directly to start operating Bash
  2. You cannot log in to your ROOT account, so you need to use live usb to solve this problem (I think most people should be like this)

Solution

Whether you can log in to root or not, what we have to do will not change, but if you can not log in to root account, you may have to refer to using live usb and use the Try Ubuntu option (For the method of using Live USB, please refer to [Linux] A simple note to make a Ubuntu 18.04 Live USB).

First of all, we should confirm which hard drive can not be mounted. If you are using Live USB, you can search for disk in the menu and you should see the following screen.

This picture is for reference only

After turning it on, we can try to mount all the hard drives. The one that fails to mount is mostly the problematic hard drive.

Choose hard disk, choose "mount".
This picture is for reference only

Of course, if you are sure which hard drive has the problem, you can skip this step.

Next, we can use the following commands to modify the automatic mounting settings of the hard disk:

sudo vim /etc/fstab

Output:

I will probably see a picture like this

Comment the line of the hard disk that failed to mount automatically, save it, and restart. If it is really a hard disk mounting problem, then the system should be able to boot up smoothly at this time.

I solved the problem of not being able to boot successfully according to this method, so I recorded it as a note here.


References


Read More

Tags:

2 thoughts on “[Solved][Linux] 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”

Leave a Reply