Restore the accidentally deleted Linux partition table

Source: Internet
Author: User
Restore the accidentally deleted Linux partition table-general Linux technology-Linux technology and application information. For more information, see the following. In an accidental operation, the Linux extended partition table is deleted. The extended partition has three logical partitions and one is mounted to the root directory.

Fortunately, the machine was not restarted. If the machine was restarted, everything on the machine would be lost.

After consulting with relevant persons, someone provided that fdisk can be used to reconstruct the partition according to the previous size and the partition can be retrieved. After careful analysis, if the size of the previous partition is unknown after the partition is re-created, the file allocation table will be lost. This is definitely not the result I want,

After logging on to the machine, cat/proc/partitions finds that the previous partition information is still there. At this time, if you want to use parted to restore the partition table, after creating the partition table, parted cannot correctly identify the original Partition Table type, you have to delete the newly created partition table. At this time, I am sure I am dead.

With the last hope, I searched for linux parted and found a glimmer of hope. I found someone suggested using testdisk to restore the partition table. After downloading the binary code of testdisk in Linux, testdisk prompts: kernel too old, thinking, is the testdisk linux version compiled on the kernel of the high version? Fortunately, testdisk is released based on the gpl protocol. After downloading the linux source code, make and make install. Run again, OK! It can run normally!

After starting testdisk, follow the menu prompts to use the restoration function. After several minutes, testdisk finds all the partition tables that have been deleted.

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.