Fsck fixed the abnormal Linux shutdown of the damaged file system. sometimes the file system is damaged when it is started again. how can I fix the file? First, you will be asked to enter the password of the root user. 1) when an error occurs, if the partition of the hard disk is incorrect, for example,/dev/hda3, run the following command... fsck fixed the abnormal Linux shutdown of the damaged file system. sometimes the file system is damaged when it is started again. how can I fix the file? First, you will be asked to enter the password of the root user. 1) when an error occurs, if you tell you which disk partition is faulty, for example,/dev/hda3, then use the following command to deal with it: # reboot after fsck-y/dev/hda3 is finished. This is OK! 2) If you do not know where the problem occurred. (This method is often used) you can directly # fsck in the subsequent confirmation dialog box, enter: reboot after the end of y. OK. Note: The fsck tool is used to check common file systems in Linux. Function description: check the file system and try to fix the error. Syntax: fsck [-aANPrRsTV] [-t] [file system...] Supplementary Note: When a file system error occurs, use the fsck command to try to fix it. Parameter:-a automatically fixes the file system and does not ask any questions. -A checks all file systems listed in the file according to the/etc/fstab configuration file. -N: if no command is executed, only the actions that will be performed are listed. -P checks all file systems at the same time when used with the "-A" parameter. -R uses the interactive mode to ask questions when performing repair, so that users can confirm and determine the handling method. -R when used with the "-A" parameter, the file system that skips the/directory is not checked. -S executes the check job in sequence rather than simultaneously. -T specifies the file system type to be checked. -T when the fsck command is executed, the title information is not displayed. -V shows the command execution process. Using fsck to check file system integrity is complex and therefore prone to errors. You can run the fsck command to check whether the file system is correct and valid. It can fix small errors found according to instructions and report unrepaired errors to users. Fortunately, the file system code is very effective, so there are very few problems at all, and the problem is usually caused by power failure, hardware failure, or operation errors, such as not shutting down the system properly. Most systems are set to automatically run fsck at startup, so any errors will be detected (and corrected as needed) before use by the system ). Using a wrong file system may make the problem worse: if there is a problem with the data structure, using this file system may make it worse, resulting in more data loss. Of course, running fsck on a large file system will take some time. if the system is shut down normally, there will be almost no errors. Therefore, there are some ways to skip the check. If the file/etc/fastboot exists, do not check. In addition, if the ext2 file system has a specific identifier in the super fast mode, it indicates that the file system has not been properly unmounted after the last mount. if the flag indicates that the unmount operation is normal (assuming that the unmount operation is normal), e2fsck (the ext2 file system version of fsck) does not check the system. Whether/etc/fastboot affects the system depends on your boot manuscript, but the ext2 mark works when you use e2fsck-based on an e2fsck option (see the e2fsck manual page) automatic check only applies to file systems that are automatically mounted at startup. Use fsck to manually check other file systems, such as floppy disks. If fsck finds the problem to be fixed, you need to have a deep understanding of the general working principle of the file system and the details of the problematic file system, or good backup. The last option is easy (though lengthy). If you do not know it, you can arrange it through friends, linux newsgroups, email lists, or other support sources. I would like to tell you more, but I do not have much to learn and practice. Theodore t' so's debugfs program should be useful. Fsck can only run on a file system that is not mounted. do not use it on a mounted file system (except for a read-only root file system at startup ). This is because it accesses the original disk and modifies the file system without knowing the operating system. There will be trouble, if the operating system is confused.
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.