Wednesday, 13 June 2018

linux - Recovering a partition table with testdisk

I'm trying to recover a partition table with testdisk. The disk contains a dual boot Windows 8 along a Linux OS. The Linux install contains four partitions: a swap partition, the / ext4 partition, the /home ext4 partition and a tiny unallocated partition. Here is what Testdisk shows after a quick scan of the Intel/PC partitions:


Testdisk quick scan result


I have no idea which are the primary bootable (*), primary (P), logical (L), extended (E) or deleted (D) partitions. I am supposed to flag the partitions which I would like to recover with one of those letters; I tried flagging all partitions as primary, but Testdisk indicates it's a "bad structure". I suppose it's because a maximum of only 4 primary partition tables is tolerated?


Testdisk bad structure


I guess my problem comes from my ignorance of what are primary partitions, as opposed to logical or extended partitions...


For the record, the partition table was lost at the beginning of a Ubuntu install in which I asked to replace the current Linux partition with an LVM partition. Data was not overwritten (install didn't proceed), but the partition table was lost.


EDIT:


In this question I wrongly assumed that my hard disk was partitioned using MBR instead of GPT. However, when I run Testdisk with "EFI GPT" table type, the Linux partitions are not detected:


Testdisk with EFI GPT table type


What should I do to restore the Linux partition structure in GPT?

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...