Fixing a damaged file system
File systems can get corrupted when the i-node or superblock information for the directory structure of the file system gets corrupted.
This corruption can be caused by a hardware-related ailment or by a program that gets corrupted that accesses the i-node or superblock information directly. (Programs written in assembler and C can bypass the operating system and write directly to the hardware.) One symptom of a corrupt file system is that the system cannot locate, read, or write data located in the particular file system.
To fix a damaged file system, you must diagnose the problem and then repair it. The fsck command performs low-level diagnosis and repairs.
The following is the procedure for fixing a damaged file system: