08.Linux system boot and root file system failures forgot password problem

Question: root user password is forgotten when reset the root password, the file system failure occurs, no root password to enter, how to do?

Error:UNEXPECTED INCONSISTENCY;RUN fsck MANUALIY
Give root password for maintenance
(or type Control-D to continue):

Solution:
Use rescue mode to change the password, steps to resolve

1. Prepare a disc, generally corresponding to the operating system;
2. Set from disc to start using cdrom
3. The system installation interface options, select Installed System Rescue
4.choose A Language select default language like (Dictionary Dictionary English)
5.keyboard type select the type of keyboard United States (us) default to
6.set up Networking network settings here to see the situation, then you need to copy the data to set up a network, simply modify the password is not required
7.rescue option selected here continue so put the CD image the system defaults to mount / mnt / sysimage
8. the prompt to select where you ok system has been mounted to / mnt, and prompts the next to be executed CHROOT / mnt / sysimge
9. the entering a shell command line prompt is bash -4.1 #
10. step 8. run command prompt chroot / mnt / sysimage this step is a command to mount the movable mirror system directory under the root directory
11. at this time, the prompt changes to # 4.1-SH
12. the modified password, enter passwd root in the sh-4.1 # prompt
13. enter exit to exit sh-4.1 # returned to the bash-4.1 # input interface and then reboot reboot

磁盘修复解决:
Error:UNEXPECTED INCONSISTENCY;RUN fsck MANUALIY
Give root password for maintenance
(or type Control-D to continue):******

Enter the root password is successfully entered
on the command character enter the following command fsck -y repair
after the repair is completed, enter the restart command reboot

Guess you like

Origin www.cnblogs.com/LuckyHaTech/p/11987357.html