How do I delete a partition without going to Deeper Search?

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
eliotstock
Posts: 2
Joined: 09 May 2013, 01:10

How do I delete a partition without going to Deeper Search?

#1 Post by eliotstock »

It's obvious from the initial search (Analyse) what's wrong with this partition table:

Code: Select all

TestDisk 6.14-WIP, Data Recovery Utility, April 2013
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 512 GB / 476 GiB - CHS 62260 255 63
Current partition structure:
     Partition                  Start        End    Size in sectors

 1 P FAT32 LBA                0  32 33  4863  15 16   78123008 [boot]
 2 P Linux                 4863  47 49  9725 220 31   78118912
 3 * Linux                 9726  63  2 14588 235 47   78118912
 4 E extended LBA         14589   0  1 62260 254 63  765850680
 5 L Linux                14589  78 18 61287 233  2  750213120
   X extended             61288   9  1 62260  88 20   15620177
 6 L Linux Swap           61288  10 35 62260  88 20   15620080
I just need to delete partitions 4 and X, which start at the same point as valid partitions and end at the end of the disk, thus overlapping my valid partitions that I want to keep.

My only options on this screen however, are Quick Search or Backup. Quick Search shows a completely different partition table in green. If I continue from there I get: Quit, Deeper Search, or Write. I want none of these. I want to delete these two partitions, then write. I've also tried doing the Deeper Search and leaving a D next to the problem partitions, but I couldn't write that table because it was invalid. There was no explanation as to what was invalid about it.

Thanks in advance.

User avatar
Fiona
Posts: 2835
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: How do I delete a partition without going to Deeper Sear

#2 Post by Fiona »

I just need to delete partitions 4 and X, which start at the same point as valid partitions and end at the end of the disk, thus overlapping my valid partitions that I want to keep.
Some information about partition 4 and that x extended partition.
An Intel-MBR disk can only contain 4 primary partitions.
That's why they found a solution to create an extended partition which can contain as much logical volumes or logical partitions as drive letters are available.
Mostly, partition utilities from OS are going to create 3 primary partitions and the fourth partition will be created as an extended partition.
Like in your case.
Currently your problem is, you have 5 partitions.
But as I described above, Intel MBR can only manage 4 partitions.
Your 5th partition is your Linux Swap.
So your possibilities are pretty close.
Either to keep it like it is or delete one partition to get them all as primary.
TestDisk normally recognizes logical volumes/partitions and creates the extended partition automatically, if you come to the menu write, where you can write your partitions to your partition table.
You only can change your partitions to primary, if you have max 4 partitions.
It works if you mark a logical partition and using the right or left arrow key on your keyboard to change it from L (for logical) to P (for primary).
You can watch it at the left side of your partition.
If you have only primary partitions, testdisk will not create an extended partition.
Some info about Intel primary and logical partitions;
http://www.cgsecurity.org/wiki/Partitio ... nd_logical
In your case, Intel standard geometry doesn't match anymore, because your partitions are aligned on megabyte boundaries and not Intel standard on cylinder boundaries.
Normally microsoft OS creating partitions aligned on megabyte boundaries since Vista.
So there is nothing wrong.

Hopefully it helps

Fiona

eliotstock
Posts: 2
Joined: 09 May 2013, 01:10

Re: How do I delete a partition without going to Deeper Sear

#3 Post by eliotstock »

Thanks, that was helpful. Have fixed by removing the unused partitions at the front.

Locked