centos7 into the rescue

CentOS 7 single-user mode + rescue mode. Sometimes you may forget your root password, or error (command input errors, mistyped command position, etc.) to edit the core files in a / etc directory cause the system fails to boot! How to do? Reinstall the system that is really no way to move it! Then we enter the following two ways to incorrect configuration file to change over to reboot the system

 

After the virtual machine because I had to mount the disk space 500G is not enough, so remount the one 2T hard up, and then copy the data to the new drive letter, trying to delete the original letter of make 500G space restart time can not enter the system, judgments are automatically mount a problem so you have to enter safe mode to change the configuration

 

1, restart the system

2, after entering to find the beginning of the line linux16! Press the right arrow key, and then modify the targeting ro ro to RW ( "the init = RW / sysroot / bin / SH" ), and add the following command line red box!

3, use the following tips to use "Ctrl-x"

After entering the system, in fact, just the memory into the system in a safe mode, it is not really normal use linux system

Then enter chroot / sysroot / into our normal system files inside

 

4, attention must be after modifying the password, enter

touch /.autorelabel 

 

5, then forced shutdown restart

Published 447 original articles · won praise 71 · Views 400,000 +

Guess you like

Origin blog.csdn.net/w892824196/article/details/104047617