Cannot mark a partition logical on testdisk

Using TestDisk to repair the filesystem
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
Message
Author
appiazzolla
Posts: 5
Joined: 21 Mar 2020, 20:55

Cannot mark a partition logical on testdisk

#1 Post by appiazzolla »

My hard disk broke and I am trying to recover all the data I can from the largest of three partitions.

At the moment I have replaced the hard disk for another and I am trying to recover the data from the broken HDD from a case that lets me connect the disk via USB to my laptop, running Debian 10 buster, at /dev/sdb

fdisk gives me Input/Output error e2fsck as well

Testdisk 7.0 is able to see all the data in the partition I am interested in recovering, and also sees all the partitions, as follows

TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Code: Select all

Disk /dev/sdb - 1000 GB / 931 GiB - CHS 953869 64 32
     Partition               Start        End    Size in sectors
>D Linux                    1   0  1 39771  63 32   81451008
 D Linux                36723   0  1 953868  63 32 1878315008
 D Linux Swap           39773   0  1 47878  63 32   16601088

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
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 41 GB / 38 GiB
I am not able to recreate the partition table, the option "Logical" does not appear when using Left/Right arrows. I would like to set the first partition as Primary bootable, the second as Logical and the third is Swap, so I don't know.

Afterwards I plan to use e2fsck and then copy the information somewhere else.

Could anybody help me?

Thanks everybody.

Sponsored links

User avatar
cgrenier
Site Admin
Posts: 5140
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Cannot mark a partition logical on testdisk

#2 Post by cgrenier »

The 3 listed partitions overlap.
As fdisk and fsck repots I/O errors, you should clone the disk to a new empty disk using ddrescue as described in https://www.cgsecurity.org/testdisk.pdf
Once it's done, remove the original disk and try to access your data from the clone.

appiazzolla
Posts: 5
Joined: 21 Mar 2020, 20:55

Re: Cannot mark a partition logical on testdisk

#3 Post by appiazzolla »

Thank you so much! I recovered the data.
If you indulge me with one more thing... How can I fix the overlapping partitions if fdisk, parted and fsck give me input/output error?
Thanks again!

recuperation
Posts: 532
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Cannot mark a partition logical on testdisk

#4 Post by recuperation »

You should only set the partition containing your data as "Primary".

appiazzolla
Posts: 5
Joined: 21 Mar 2020, 20:55

Re: Cannot mark a partition logical on testdisk

#5 Post by appiazzolla »

Thank you. I did that twice, always writing the testdisk changes and then disconnecting the disk and reconnecting it afterwards.
When I connect it again I still get Input/Output in fsck, fdisk, parted... So I can't format the disk :-(
Here's my testdisk output

Code: Select all

TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sdb - 1000 GB / 931 GiB - CHS 953869 64 32
     Partition               Start        End    Size in sectors
>D Linux                    1   0  1 39771  63 32   81451008
 D Linux                36723   0  1 953868  63 32 1878315008
 D Linux Swap           39773   0  1 47878  63 32   16601088

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
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 41 GB / 38 GiB
Is there any way to write the correct partition table?
Thank you!

recuperation
Posts: 532
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Cannot mark a partition logical on testdisk

#6 Post by recuperation »

appiazzolla wrote:
23 Mar 2020, 20:48
Thank you. I did that twice, always writing the testdisk changes and then disconnecting the disk and reconnecting it afterwards.
When I connect it again I still get Input/Output in fsck, fdisk, parted... So I can't format the disk :-(
Here's my testdisk output

Code: Select all

TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sdb - 1000 GB / 931 GiB - CHS 953869 64 32
     Partition               Start        End    Size in sectors
>D Linux                    1   0  1 39771  63 32   81451008
 D Linux                36723   0  1 953868  63 32 1878315008
 D Linux Swap           39773   0  1 47878  63 32   16601088

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
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 41 GB / 38 GiB
Is there any way to write the correct partition table?
Thank you!
Looks like you did not use ddrescue as proposed.

recuperation
Posts: 532
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Cannot mark a partition logical on testdisk

#7 Post by recuperation »

I would ask that question on every forum available:

https://superuser.com/questions/1534625 ... n-testdisk

appiazzolla
Posts: 5
Joined: 21 Mar 2020, 20:55

Re: Cannot mark a partition logical on testdisk

#8 Post by appiazzolla »

As I said before, I could recover the information and is OK.
I just want to be able to format the disk, that is all.
Of course, any forum would do.

recuperation
Posts: 532
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Cannot mark a partition logical on testdisk

#9 Post by recuperation »

Zero out your disk at the expense of loosing its content.
appiazzolla wrote:
24 Mar 2020, 22:40
Of course, any forum would do.
Consider reading about Netiquette.

recuperation
Posts: 532
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Cannot mark a partition logical on testdisk

#10 Post by recuperation »

Zero out your disk at the expense of loosing its content.
Use smartmontools to check for failures.
Further use may probably not be recommended anymore.
appiazzolla wrote:
24 Mar 2020, 22:40
Of course, any forum would do.
Consider reading about Netiquette.

Post Reply