In the previous article, we talked about how to maintain the first-aid disk group in Linux emergency response, how to deal with the file system being damaged, and how to recover lost files, there are also methods to deal with function library damage, linux emergency response that cannot be logged on to the system using the root account, and Linux system cannot be started.
How to deal with function library damage
If the system function library file is accidentally damaged or the symbolic link in the/lib directory is broken, the commands dependent on these libraries cannot be executed. The simplest solution is to start the system with an emergency disk group, install the hard disk file system in the/mnt directory, and fix the library in the/mnt/lib directory.
Unable to log on to the system with the root account
Due to System Administrator negligence or hacker intrusion, the system administrator may not be able to log on to the system using the root account.
In 1st cases, the system administrator may have forgotten the root password. The problem can be solved by using an emergency disk group.
In 2nd cases, the system administrator is unable to access the system because the password may have been modified by a hacker. That is to say, the linux system is completely out of control, so the system control should be obtained as soon as possible. After obtaining the & nbsp; root permission, check if the system is damaged to prevent further hacker intrusion.
The main task to be done is to reset the root password to gain control of the linux operating system. First, start the system with an emergency disk group, then install the hard disk file system in the/mnt directory, and edit the/mnt/etc/passwd file, leave the field of the encrypted password corresponding to the root account empty, as shown below:
Root: 0: 0: root:/root: bin/bash
Note: & nbsp; if the system uses the & nbsp; shadow tool, you need to perform the above operations on the file/etc/shadow so that the root user does not need a password to log on to the system.
In this way, the root account has no password. When you restart the linux system from the hard disk, you can use the root account to log on to the system without requiring a password ). After entering the system, run passwd to set a new password.
Linux cannot start
Generally, if the system administrator cannot access the system normally, you need to consider using the First Aid disk group to enter the first aid mode to eliminate system faults. But the linux system cannot be started without an emergency disk group. What should I do?
When using the & nbsp; linux system on a personal computer, it usually coexist in linux and ms & nbsp; windows & nbsp; 9x or ms & nbsp; windows & nbsp; nt. Because you reinstall other operating systems, the original linux cannot be started. This is mainly because, by default, these operating systems are no other operating systems in the computer, so the Master Boot Record mbr of the hard disk is rewritten), and the linux lilo system boot program is washed out.
If there is an emergency disk group, it is very simple. Use the first boot disk to start the linux System of the hard disk and run the lilo command again to write the lilo system boot program back to the Master Boot Record of the hard disk. Start the instance again.
If there is no system boot disk, how can I recover linux on the hard disk? In this case, if you know the exact installation partition of linux on the hard disk and there is a loadlin program, you can return to linux again. & Nbsp; loadlin is a dos program. You can run it to directly start linux from dos and quickly enter the linux environment. This program is available in the & nbsp; red & nbsp; hat & nbsp; linux & nbsp; 6.0 & nbsp; dosutil/directory. In addition, an & nbsp; linux kernel startup image file is required. This file is available in the & nbsp; red & nbsp; hat & nbsp; linux & nbsp; 6.0 & nbsp; images/directory-vmlinuz.
For example, in windows & nbsp; 98, enter the dos single-user mode, and then run the following loadlin command to re-enter the linux system:
Loadlin & nbsp; vmlinuz & nbsp; root =/dev/hda8
/Dev/hda8 is the hard disk partition location of the linux root file system. After the command is executed, the linux system is guided. After you log on with the root user and run the lilo command, reload lilo into the mbr and return to the state where multiple operating systems were used in the past.
Now we can solve six common problems in Linux emergency response.
- Summary of Linux emergency response method 1)
- Detailed analysis of Linux password cracking Problems
- How to Use the find command in Linux
- Summary: how to install Oracle in Linux
- Describes how to manage Linux User Accounts