Discussion on common faults and treatment methods in Linux system

Source: Internet
Author: User
Tags file system system log

As with Windows system, Linux operating system will also have many problems and failures, many Linux novice are afraid of failure, face the problems appear helpless, and even, thereby giving up Linux, in fact, we should not fear the problem, learning is a discovery problem and solve the problem of the process , as long as the master of the basic ideas to solve the problem, all failures will be solved, of course, the prerequisite is that we have a problem-solving ideas and a solid knowledge of the foundation.

First, the way to deal with Linux system failure

As a qualified Linux system administrator, must have a clear and clear way to solve the problem, when problems arise, to quickly locate, solve problems, here is a general idea to deal with the problem:

Pay attention to the error message: Every mistake appears, is to give error message, the general situation this hint basically locate the problem, so we must pay attention to this error information, if the wrong information, the problem will never be solved.

Lookup log File: Sometimes the error information is only given the surface of the problem, to more in-depth understanding of the problem, you must view the corresponding log files, and log files are divided into system log files (/var/log) and the application of the log files, combined with these two log files, generally can locate the problem.

Analysis, positioning problem: This process is more complex, according to the error information, combined with the log file, but also to consider other relevant circumstances, and finally find the cause of the problem.

Solve the problem: find the cause of the problem, solve the problem is very simple things.

From this process, we can see that the process of solving the problem is to analyze and find the problem, once the cause of the problem is identified, the fault will be solved.

Second, forget the Linux root password

The probability of this problem is very high, but it is also easy to solve the problem under Linux, just reboot the Linux system, and then boot into the Linux single-user mode (init 1), because Single-user mode is not required to enter a login password, so you can log in directly to the system, Modifying the root password resolves the problem.

Here is the detailed processing method, here we take the Redhat Linux as the benchmark, the following procedures:

(1) Reboot the system, when the Linux system boots to the Grub boot menu, locate the current system boot option (you can expand the hidden menu by the arrow key, only one boot for the single processor, and 3 or 3 more boot items for the multiprocessor, and the general default option is the system's current boot option).

(2) through the arrow keys to place the cursor on the current system boot item, and then press the keyboard letter "E" to enter the editing state.

(3) Then, by clicking the up and down key, select a line with the kernel instruction, continue pressing the keyboard letter "E", edit the row, add a space at the end of the line, and then add a single, similar to this:

Kernel/vmlinuz-2.6.18-8.el5 ro root=label=/rhgb quiet single

(4) Modify complete, press ENTER, return to just the interface.

(5) Finally press the keyboard "B", the system began to boot.

This allows the system to boot into Single-user mode, where the single user root Windows is similar in security mode, in Single-user mode, only to start the most basic system, network and application services are not started. Single user mode started, the system will automatically enter the command line state, similar to the "sh-3.1#", and then directly execute passwd, carriage return, the system will be prompted to enter a new root password two times, and finally see the password to modify the success of the prompt, so that the completion of the root password modification. If you need to start the system normally, you can now enter "Init 3" and enter multiuser mode. Re-log on to the system with the root user to see if the new password setting is in effect.

Three Linux systems can not start the solution

There are a number of reasons why Linux cannot be started, and there are several common causes:

Improper file system configuration, such as/etc/inittab files,/etc/fstab files, such as configuration errors or missing, resulting in system errors, can not start.

Illegal shutdown, causing root file system damage, that is, Linux root partition damage, the system does not start properly

Linux kernel crashes, which fails to start

There was a problem with the system boot, such as grub loss or corruption, which prevented the system from booting.

Hardware failures, such as the motherboard, power supply, hard disk, and other problems, resulting in Linux can not start.

From these common failures know that the system can not start the main two problems, hardware and operating system reasons, for hardware problems, only through the replacement of hardware equipment, can be resolved, and for operating system problems, although the problems may vary, However, in most cases can be a relatively simple and unified some of the methods to restore the system, we have to address the above several issues, combined with the Redhat Linux system environment, give some common, common problem-solving methods.

1. /etc/fstab file is missing, causing the system to fail to start

/etc/fstab file contains information about the file system in the system, if the correct configuration of the file, then the Linux startup, the system will read this file, automatically mount the various Linux partitions, if this file configuration error, or lost, will cause the system can not start, The specific symptom occurs when the Mount partition is detected:

Starting system Logger

After that, the system starts to stop.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.