During linux execution, the system cannot be started properly due to operation errors. in this article, I used a software installation package to simulate several common small errors. Download this installation package and install it: After the rpm-ivhrhce-ts-5.4.0-3.noarch.rpm installs this package, execute the command...
During linux execution, the system cannot be started properly due to operation errors. in this article, I used a software installation package to simulate several common small errors.
Download the installation package and install it:
Rpm-ivh rhce-ts-5.4.0-3.noarch.rpm
After the software package is installed, run the command to destroy it.
1) executionTsboot breakThe boot page becomes as follows:
In this case, the boot cannot be started. is the system crashed like this? Don't worry, we can use the same version of the system to boot into the rescue mode. (I can't enter the boot disc here. after the correction, I can use the boot disc to boot the boot disc. Note that you need to adjust the startup sequence of the boot disc .)
Enter rescue mode
This picture is also important in the rescue mode:
At this time, you may not be able to know what went wrong with the system, and we need to check whether there are or are damaged with several important files started by the system. the common files include:Files in the/etc/grub. conf and/etc/grub/directories,/etc/rc. d/rc. sysinit,/etc/inittab,/etc/fstab
There are no errors after the check, but there are errors at this time. note:
The/bin/sh command cannot be run, and the sh command points to the bash link. if the problem is found, it indicates that bash has a problem.
At this time, we found that there was another bash. gotcha file. was it renamed? Try it.
You can switch to the root directory. remove the CD and restart it to see if it works properly.
Congratulations!
2) executionTsinit breakCommand.
At this point, I do not know the problem. First, let's try to enter the single-user mode,
After successfully entering the single-user mode, we can check whether the key files mentioned above exist or are damaged. Finally, an error was found in the/etc/inittab file, as shown below:
It should be changed:
Restart the system and log on successfully:
Congratulations, you have succeeded again!
3) executionTslogin breakCommand. after restarting and entering the root account and password of the super user, the logon interface will be flashed back quickly. in this case, we can determine that the root account has a problem. in single-user mode, we can view the account information of the root user, as follows:
The user account has expired. we need to modify the/etc/shadow file:
Change to and force save and exit: wq! :
Restart the system and we find that the super user root can successfully log on to the system.
4) executionTsnetwork breakAfter the command, restart the system and log on to the system to find that the network address has been modified. you can log on to the system as a super user and modify the network configuration command.
5) executionTssudo breakAfter the command is run, modify the sudoers file, and enter the edit mode with the synchronized do command. modify the sudoers file.
Note: In linux, do not execute commands such as rm-f as a Super User. linux management also encounters various problems. we hope you can discuss and make progress together.
Next I will upload the software package for simulated experiments only!
This article is from the "trace long" blog