1

Unfortunately the Disk Management tool from Windows 7 corrupted my partition table on one of my disk, when I tried to set the active (boot) flag on a partition.

The original structure of the partitions was something like:

/dev/sdc1      100M     System Reserved (Windows 7)
/dev/sdc2      69,9G    Windows 7
/dev/sdc3      146,5G   NTFS data partition
/dev/sdc4      (extended)
  /dev/sdc5    711G     ext4 data partition
  /dev/sdc6    4G       swap partition

Apparently the ext4 data partition is missing. All the other partitions are mountable/readable.

fdisk's output:

~$ sudo fdisk -l
...
Disk /dev/sdc: 931,5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000e0e89

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sdc1             2048     206847     204800   100M  7 HPFS/NTFS/exFAT
/dev/sdc2  *        206848  146800639  146593792  69,9G  7 HPFS/NTFS/exFAT
/dev/sdc3        146801970  454002687  307200718 146,5G  7 HPFS/NTFS/exFAT
/dev/sdc4        454002688 1953523711 1499521024   715G  5 Extended
/dev/sdc5       1945137152 1953523711    8386560     4G 82 Linux swap / Solaris

Currently I'm trying the restore the partition table with TestDisk, running from Ubuntu installed on an other disk.

Apparently the TestDisk founds the missing partitions, but when I'm trying to fix the missing partitions, the program shows Structure: Bad.

TestDisk after running Analyze:

TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <[email protected]>
http://www.cgsecurity.org

Disk /dev/sdc - 1000 GB / 931 GiB - CHS 121601 255 63
Current partition structure:
     Partition                  Start        End    Size in sectors

 1 P HPFS - NTFS              0  32 33    12 223 19     204800

Bad relative sector.
 2 * HPFS - NTFS             12 223 20  9137 233 56  146593792

Bad relative sector.
 3 P HPFS - NTFS           9138   0  1 28260  91 55  307200718
 4 E extended             28260  91 56 121601  57 56 1499521024
 5 L Linux Swap           121079  47 57 121601  57 56    8386560


>[Quick Search]  [ Backup ]
                            Try to locate partition

after running a Quick Search the missing partitions are found:

TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <[email protected]>
http://www.cgsecurity.org

Disk /dev/sdc - 1000 GB / 931 GiB - CHS 121601 255 63
     Partition               Start        End    Size in sectors
>* HPFS - NTFS              0  32 33    12 223 19     204800
 P HPFS - NTFS             12 223 20  9137 233 56  146593792
 D HPFS - NTFS           9138   0  1 28260 254 63  307210995
 D Linux                28260 124 25 121079  47 56 1491132416 [Data]
 P Linux Swap           121079  47 57 121601  57 56    8386560 


Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
*=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
     Enter: to continue
NTFS, blocksize=4096, 104 MB / 100 MiB

P: list files works as expected on all partitions. The NTFS data partition is shown as D (deleted) for some reason.

The problem is that when I change the partition characteristics to match the original structure, it complains that the structure is bad

TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <[email protected]>
http://www.cgsecurity.org

Disk /dev/sdc - 1000 GB / 931 GiB - CHS 121601 255 63
     Partition               Start        End    Size in sectors
 * HPFS - NTFS              0  32 33    12 223 19     204800
 P HPFS - NTFS             12 223 20  9137 233 56  146593792
 P HPFS - NTFS           9138   0  1 28260 254 63  307210995
 L Linux                28260 124 25 121079  47 56 1491132416 [Data]
>L Linux Swap           121079  47 57 121601  57 56    8386560


Structure: Bad. Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
*=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
Keys A: add partition, L: load backup, T: change type,
     Enter: to continue
SWAP2 version 1, pagesize=4096, 4293 MB / 4095 MiB

and I cant figure out what exactly the problem is.

An idea what I'm doing wrong?

1 Answer 1

0

You've added the Linux partition as a Logical partition. You should have an extended partition in which you have the Linux partition and the swap.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .