A brief summary of the solution to Linux File System damage

Source: Internet
Author: User

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.

  1. Introduction to Linux File System partitions
  2. In-depth introduction to common Linux File Systems
  3. Related Fedora proc file system command Regular Expression
  4. Detailed description of Fedora proc file system recovery
  5. Brief Introduction to Fedora proc file system variables

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.