The system can not start

A, root file system is damaged, the system can not boot failure cases

1, the cause

More due to an unexpected power failure, abnormal shutdown, causing the file system structure caused by the inconsistency.

2, Symptom

Such accidents will be displayed on the screen:

checking root filesystem

/dev/sdb5 contains a file system with errors, check forced

/dev/sdb5: UNEXPECTED INCONSISTENCY; RUN fsckMANUALLY

(i.e., without -a or -p options) FAILED

Press enter for maintenance

(or type Control-D to continue):

give root password for maintenance

As can be seen from this error, the system root filesystem there is a problem, repair the system can not automatically at startup, and then entered into an interactive interface, the user is prompted to repair the system.

Now enter Ctrl + D will restart; root password will enter recovery mode manually repair;

3, the repair process

1, first find out the error of the partition, umount unmount the partition;

2, using fsck to repair the partition.

Note: For ext4 file system, fsck.ext4 repair;

About xfs file system, xfs_repair repair.

Example: seen from the above tips / mismatch dev / sda5 document;

[Root @ localhost /] # fsck.ext4 -y / dev / sdb5 later access the file system type #fsck

Two, / etc / fstab file is missing, the system can not boot Case

1, the cause

/ Etc / fstab file system to store the information in the file system, boot in linux, the system reads this file automatically mount each partition of linux, if this file is misconfigured or missing, it will cause the system to not start .

2, Symptom

The system starts to a half, can not go on

3, repair ideas

Use linuxrescue repair mode login system, then obtain the partition and mount point information, reconstruction / etc / fstab file.

4, Linux system can not boot a generic solution

(1) single-user mode or rescue mode (Rescue), backup data error or repair the partition, and repair or re-install the system.

(2) if the boot program linux problem, it may be entered by way of the optical disc repair mode linux guided, a corresponding boot program then modify or reinstall the boot program.

(3) If the linux kernel crashes or is lost, the same can first enter linuxrescue mode, and then load the root partition, and finally recompile the kernel.

5, Centos7 enter rescue mode

(1) First, there is a CD image, and associate it with the system startup items, so that the system used to boot start the optical disc medium;

NOTE: The first line, the mounting system;

The second line, the test medium;

The third line, to solve the problem.

(2) choice to solve the problem, go to the next screen, and select the second option;

Note: The first line, enter a simple graphical interface;

The second line, enter rescue mode.

(3) After selecting rescue mode, enter the function selection page;

NOTE: The first line, read-write mode

Second row, read-only mode

Third row, skip the shell

The fourth line, exit

(4) selecting a write mode;

We will mount the root partition / mnt / sysimage.

Press any key to enter the shell.

(5) using df to view the partition mounted case, identify problem directory partition

Enter / mnt / sysimage / etc / fstab to automatically mount the partition information to be modified

reboot restart

6, Centos6 into rescue mode

1, using the mirror so that the mirror system is activated by

The third rescue behavior patterns;

2, the mode selection entered

Continue to enter write mode select

Select the shell, click ok to enter the shell.

3, in the case of / etc / fstab file completely missing, the system will not operate automatically mount the partition can be manually mount;

Use tune2fs -l partition name

Found in the display information: last mount on this column can get the last mount point of the partition information

Click to view each partition to mount last case;

Fstab file copy by other systems, to reconstruct fstab file according to the format of this file.

Guess you like

Origin www.cnblogs.com/yxf-/p/11441737.html