Centos7 startup prompt: ENTERING EMERGENCY MODE. EXIT THE SHELL TO CONTINUE.

After the virtual machine is forced to start, centos07 is prone to the following problems

Boot prompt: ENTERING EMERGENCY MODE. EXIT THE SHELL TO CONTINUE.

 

Solution:

1. According to the prompt, use the journalctl command to view the log , find the error log information, and confirm which device has the error according to the error information

Failed to open /sysroot/etc/fstab:Input/output error 

2. Enter the command xfs_repair -v -L /dev/xxx to repair the device

I use the following command and the following picture appears successfully

umount /dev/dm-0 

xfs_repair -v -L /dev/dm-0 

3.reboot restarts the virtual machine

Knowledge about xfs_repair

xfs_repair -h
xfs_repair: invalid option -- 'h'
Usage: xfs_repair [options] device

Options:
-f The device is a file
-L Force log zeroing. Do this as a last resort.
-l logdev Specifies the device where the external log resides.
-m maxmem Maximum amount of memory to be used in megabytes.
-n No modify mode, just checks the filesystem for damage.
-P Disables prefetching.
-r rtdev Specifies the device where the realtime section resides.
-v Verbose output.
-c subopts Change filesystem parameters - use xfs_admin.
-o subopts Override default behaviour, refer to man page.
-t interval Reporting interval in minutes.
-d Repair dangerously.
-V Reports version and exits.
 

After the virtual machine is forced to start, centos07 is prone to the following problems

Boot prompt: ENTERING EMERGENCY MODE. EXIT THE SHELL TO CONTINUE.

 

Solution:

1. According to the prompt, use the journalctl command to view the log , find the error log information, and confirm which device has the error according to the error information

Failed to open /sysroot/etc/fstab:Input/output error 

2. Enter the command xfs_repair -v -L /dev/xxx to repair the device

I use the following command and the following picture appears successfully

umount /dev/dm-0 

xfs_repair -v -L /dev/dm-0 

3.reboot restarts the virtual machine

Knowledge about xfs_repair

xfs_repair -h
xfs_repair: invalid option -- 'h'
Usage: xfs_repair [options] device

Options:
-f The device is a file
-L Force log zeroing. Do this as a last resort.
-l logdev Specifies the device where the external log resides.
-m maxmem Maximum amount of memory to be used in megabytes.
-n No modify mode, just checks the filesystem for damage.
-P Disables prefetching.
-r rtdev Specifies the device where the realtime section resides.
-v Verbose output.
-c subopts Change filesystem parameters - use xfs_admin.
-o subopts Override default behaviour, refer to man page.
-t interval Reporting interval in minutes.
-d Repair dangerously.
-V Reports version and exits.
 

Guess you like

Origin blog.csdn.net/Zhuge_Dan/article/details/123200912