May 22, 2021 Linux
Many friends often forget the root password of linux system, linux system forget root password how to do? R einstall the system? O f course not! G o into single-user mode and change the root password.
Here are the steps:
Within 3 seconds to press the return, the following interface appears
Then enter e
Enter single at the end of the second line, with a space. This is by pressing the tip down to move to the second line and pressing "e" to enter edit mode
Add a style to the rear to return
Finally press "b" to start, after starting into single-user mode
Now that you're in single-user mode, you can change your root password. The more password command is passwd
Rescue mode for installing discs using the system
Rescue mode is reescue, which is mainly used in situations where the system cannot be accessed. F or example, grub corruption or a profile modification error. How do I use the reescue mode?
The disc starts and press F5 to enter reescue mode
Enter linux rescue carriage return
Choose a language, the author suggests you choose English
Select the us keyboard
Ask if you want to start the network here, and sometimes you may network debug. Let's choose no
Tell us here that the system will then be mounted in /mnt/sysimage.
There are three options:
Here we choose Continue.
At this point, the system is mounted to /mnt/sysimage. Next, enter chroot /mnt/sysimage into the administrator environment.
Tip: You can actually change root's password in rescue mode. This reescue mode is very similar to the windows PE system.
When chroot/mnt/sysimage/, Ls sees that the directory structure is the same as the directory structure in the original system.
That's right! T he current environment and the original system environment are exactly the same. Y ou can enter exit or exit the environment by pressing Ctrl plus D. And then you take a look
This directory is actually the directory structure in rescue mode, and all our system files are in the /mnt/sysimage directory.