testdisk can see my partitions but cannot recover them all

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
boranblok
Posts: 1
Joined: 03 Jan 2015, 11:06

testdisk can see my partitions but cannot recover them all

#1 Post by boranblok »

Hi, my NAS got a corrupted partition table yesterday (I don't know the cause)

Now I run testdisk and I get this in the first analyze step:

Code: Select all

    Partition sector doesn't have the endmark 0xAA55
However when I run quick scan it clearly sees my partitions:

Code: Select all

    Disk /dev/sdf - 15 GB / 14 GiB - CHS 15072 64 32
         Partition               Start        End    Size in sectors
    >  Linux                    0  63 31   243  63 30     497664
       Linux                    1   0  1 15070  63 32   30863360
     
     
    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
    ext2 blocksize=1024 Sparse superblock Backup superblock, 254 MB / 243 MiB
partition 1 is also correctly seen as:

Code: Select all

    ext4 blocksize=4096 Large file Sparse superblock Backup superblock, 15 GB / 14 G
So far everything is OK. However I cannot seem to recover both partitions.

If I select 0 as primary bootable (I think it is the /boot partition) I cannot make any valid selection for 1 (It does not allow me to chose either Logical or Extended and selecting Primary for that partition is apparently bad?)

On another (Debian) system I have this structure:

Code: Select all

    Disk /dev/sda - 1000 GB / 931 GiB - CHS 121602 255 63
         Partition               Start        End    Size in sectors
    >* Linux                    0  65  2  2549 196 15   40957952
     P Linux                 2549 196 16 121535 178 51 1911508992
     P Linux Swap           121535 178 52 121600 215  7    1046512
But if I try to set this on the corrupted disk I get an error:

Code: Select all

    Disk /dev/sdf - 15 GB / 14 GiB - CHS 15072 64 32
         Partition               Start        End    Size in sectors
     * Linux                    0  63 31   243  63 30     497664
    >P Linux                    1   0  1 15070  63 32   30863360

     
    Structure: Bad. Use Up/Down Arrow keys to select partition.
if I set one as primary boot (all I can do apparently) I get this on the next screen:

Code: Select all

    Disk /dev/sdf - 15 GB / 14 GiB - CHS 15072 64 32
     
         Partition                  Start        End    Size in sectors
     
     1 * Linux                    0  63 31   243  63 30     497664

     
     [  Quit  ] >[Deeper Search]  [ Write  ]
I am very afraid to write only one partition to the device with the knowledge that it actually has two (/boot and /). How can I ensure that that second partition gets recovered as well?

Locked