Linux common troubleshooting instructions (on)

  

For most users, the ease of use of the Linux operating system is somewhat different from that of the Windows operating system. Under the Windows operating system, if there are some problems or some problems in the system, we often use some remedial measures to eliminate the faults. These methods are many and easy to use. However, this kind of troubleshooting in the Linux operating system is more complicated, and the discovery of faults is not as predictable as in the Windows operating system, and some system and network management commands need to be manually run. Below, the common fault diagnosis of the system and network types in the Linux operating system is explained. 1. System troubleshooting (1) Startup failure. This is a problem that is often encountered in the Linux operating system. The main reason why the system cannot be started is that during the process of installing the Linux operating system, the LILO configuration information is incorrect, and the system cannot be started normally after the installation is completed. Reinstalling other operating systems often causes the original Linux to fail to start. Because these newly installed operating systems default to no other operating system in the computer, thus rewriting the hard disk's master boot record (MBR), covering the LILO system boot program in the Linux operating system, resulting in the inability to start LILO; During the Linux system, an exception occurred when the system was restarted due to a wrong Linux command. If the Linux system's emergency boot disk group is created during or after the Linux operating system installation process, use these rescue disks to boot the system to enter the system, and then configure the corresponding error to solve the problem; Disk group, Linux system can not be started, what should I do? Here are three solutions. 1) Enter the Linux operating system single-user mode. After the boot prompt, type: Linux single. In this mode, start Linux. LILO configuration and network configuration information are not loaded during the boot process. 2) CD-ROM boot, use the first CD-ROM (boot CD) to install the Linux operating system to boot the hard disk Linux system. In the motherboard BIOS, you need to set the CD-ROM boot. After restarting the machine, the boot: prompt prompts: vmlinuz root=/dev /Linuxrootpartition noinitrd where root= is followed by the partition number of the user's Linux root partition, which is the hard disk partition location where the Linux system's root file system is located, for example: vmlinuz root=/dev/hda3 noinitrd. After you press Enter, you can enter the Linux system. If you want to restore the corrupted LILO system bootloader, you can run /sbin/lilo after editing, etc/lilo.conf. This method is also suitable for other reasons caused by the Linux operating system damage (Note: the floppy disk boot operating system process is also the same). 3) Run the loadlin program under DOS to start the system. When using a Linux system on a personal computer, Linux and Windows 9x or Windows 2000 usually coexist. If you know the exact installation partition of the Linux system on the hard disk, and there is a loadlin program (this program is available in the dosutil directory of the Red Hat Linux CD), you can also boot the Linux system. Loadlin is a program under DOS system. It can run Linux system directly from DOS system and quickly enter Linux environment. In addition to the loadlin program, you also need a Linux boot kernel image file vmlinuz, which is available on the Red Hat Linux CD's images directory. For example, if you enter the DOS command mode under Windows 2000, and then run the following loadlin command, you can re-enter the Linux system: loadlin vmlinuz root=/dev/Linuxrootpartition After the command is executed, boot the Linux system. After logging in as root, after editing /etc/lilo.conf, run /sbin/lilo, and then reload the LILO system bootloader into the MBR. (2) File system failure. In the Linux operating system, this is also a common failure. If the system does not shut down properly, or suddenly powers down, etc., the file system will be damaged. The solution is as follows: When the file system is destroyed, you can use the corresponding fsck command to repair the file system. For example, the following command: fsck/dev/hda5 For the usage of the specific parameters of the fsck command, refer to the MAN Reference Manual. If you are using an ext2fs type file system, you can run the e2fsck command from a floppy disk to fix corrupted data in the file system. But one thing to note: If the file system is corrupted, the superblock is corrupted (the superblock is the file system's "header", which contains information about the file system's state, size, and free disk blocks), for example, Be careful to write the data directly to the file system's super block partition, then Linux may not recognize the file system at all, even if you use the fsck or e2fsck command. At this time, only to the installation CD to see if there is a corresponding file system, this file is overwritten by the original operating system corrupted file. If you accidentally delete important files in your system, you can try this method. (3) The function library is faulty. In the Linux operating system, if the function library files in the system are inadvertently destroyed or the symbolic links in the /lib directory are destroyed, the commands that depend on these libraries cannot be executed. This is also a common system failure. The easiest solution is to boot the system with the rescue boot disk set, install the hard disk file system in the /mnt directory, and then repair the libraries in the /mnt/lib directory. (4) The login system is faulty. The system password file was modified because the administrator forgot the password or because the system was compromised by a hacker. This may cause the administrator to be unable to log in to the system with an account. The solution is as follows: Method 1, when the system starts, enter single-user mode (Linux single), and then use the passwd command to reset the password, or modify the password file to restore normal. Method 2, start the system with the emergency boot disk group, then install the hard disk file system to the /mnt directory, edit /mnt/etc, and passwd file to restore. Method three, remove the hard disk of the installation system, put it in another Linux system, and then mount (mount) the system installation area of ​​the hard disk, /etc/passwd, /etc/shadow, /etc in the secondary hard disk partition The /group file is overwritten or modified and can be restored. (5) KDE environment failure. If the Linux system's KDE environment does not start properly, for example, after running the startx command with a normal account, it appears: “……Call not start X server.Perhaps you do not have console ownershiip?” The reason for this prompt is that other users may have run the KDE environment and left a cache file indicating the user in the system. Solution Run the following command: rm -rf/tmp/* Then, run the startx command again to enter the KDE environment. Sometimes after running the startx command with a normal account, the error message "can not start X server" appears, and the English characters of the error prompt are scrolling up, resulting in failure to enter the KDE environment. This situation may be caused by an abnormal shutdown of the Linux system, resulting in the inability to enter the Linux KDE environment. The solution is as follows: Log in as root in the console, type setup command, the system setting menu appears, select the “X window setting”, and then follow the prompts to correctly set the display type, refresh rate, memory size, resolution. Wait. This will reset the X window in the system again. If there is no error, the system will automatically start the KDE environment. One thing to note is that when setting with the setup command, there may be a large number of English characters scrolling on the screen. It doesn't matter at this time, please continue to see the screen, use the TAB key or the arrow keys to configure the above, configure After the error, the KDE environment will be restored immediately.

Copyright © Windows knowledge All Rights Reserved