The following describes how to deal with Linux File System corruption. Linux is an open-source operating system. Linux itself is the core part of the operating system, that is, the kernel of the operating system.
When the file system is damaged, if the ext2fs file system is used, you can run the e2fsck command from the floppy disk to correct corrupted data in the file system. For other types of Linux file systems, you can use the appropriate fsck command. When checking the file system from a floppy disk, it is best not to mount the installation.
Note: the common cause of file system damage is that the super block is damaged, and the super block is the "Header" of the file system ". It contains the status, size, and idle disk blocks of the file system. If a Linux File System's super block is damaged, such as accidentally writing data directly to the file system's super block partition), the system may not recognize the file system at all, in this way, you cannot install it, even if you use the e2fsck command.
However, the ext2fs File System backs up the contents of the super block and stores the contents in the block group of the driver. You can use the following command to notify e2fsck to use a super block backup:
# E2fsck-B 8193 refers to the partition where the file system is located. The-B 8193 option is used to display the 8193-block super block backup data stored in the file system.
Restore Lost files
If you accidentally delete important system files, you can still copy the files to the hard disk using the First Aid disk. For example, if the file/bin/login is deleted and the system cannot run normally on the logon page, you can use the First Aid disk to start the system and install the hard disk file system in the/mnt directory, run the following command:
# Cp-a/bin/login/mnt/bin
The "-a" option tells cp to retain the access permission of the file system during copy. Of course, this method cannot be used if the basic Linux File System to be deleted is not in the "First Aid disk group. If you have performed a file system backup before, you can also use the previous backup to restore it.
- Introduction to Linux File System partitions
- In-depth introduction to common Linux File Systems
- Related Fedora proc file system command Regular Expression
- Detailed description of Fedora proc file system recovery
- Brief Introduction to Fedora proc file system variables