Repair FileSystem Mode Repair method under Linux

Source: Internet
Author: User

First case: The disk partition problem caused by abnormal shutdown does not enter the system properly


The following questions are generally how to cause and how to solve it?
Finding module dependencies;
Modprobe:modprobe:can ' t locate module block-major-3
fsck.ext3possibly non-existent or swap device?
Such device or address while trying to open/dev/hdb1
/boot:clena, 41/26104 files. 12679/104391 blocks[failed]
An error occurred during the file system check
dropping to a shell; The systm would reboot
When you leave the shell
Give Root password for maintenance
(or type control-d to continue):
Login incorrect.
(Repair filesystem) 1 #
Abnormal shutdown caused, with Fsck/dev/hdax after reboot enter, or only with fsck to repair, just y return (you can also use fsck-y/)


Second case: Unable to enter the system properly due to/etc/fstab file editing errors
The workaround is to modify the/etc/fstab file to the original normal format to delete the wrong or nonexistent mount directory.


1, according to the prompt to enter the repair mode Login incorrect.
Repair mode (read-only system) file is protected cannot be modified, run the following command to change the system file permissions to read and write.
(Repair filesystem) 1 # mount-o REMOUNT,RW/
The root directory is now ready to read and write.

2, repair/etc/fstab files,
(Repair filesystem) 1 # Vim/etc/fstab
Save Wq
(Repair filesystem) 1 #reboot
OK, the normal interface is out again.
--------------------------------------------------------------------------------------------------------------- ------------------

The fsck command, referred to as file system check, is used to check and maintain inconsistent file systems. The fsck command can be used to check the file system if the system is out of power or has a disk problem

Linux tips: Repairing damaged partitions with the fsck command

Enter root password after login: fsck–t ext3-r/usr/local Repair

Several instructions for how to use fsck commands: fsck

Usage rights: Super User Root

How to use: fsck [-SACVRP] [-t fstype] [–] [fsck-options] filesys [...]

Description: Check and repair Linux file system, can check one or more Linux file system at the same time

Parameters: Filesys:device Name (EG./DEV/SDA1), mount point (eg.///usr)

-T: Given the form of a file system, this parameter is not required if it is already defined in the/etc/fstab

-S: Execute the fsck command one by one to check

-A: Check all listed partition in/etc/fstab

-C: Show complete Check progress

-D: Print e2fsck debug Results

-P: Simultaneously with the-a condition, multiple fsck checks are performed together

-R: Omit/No check when there is a-a condition at the same time

-V: Verbose display mode

-A: Automatically fix if check is wrong

-R: If the check is wrong, the user answers whether the repair


This article is from the "King" blog, be sure to keep this source http://liyanxin.blog.51cto.com/6384195/1537329

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.