Space conflict between two partitions

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
Message
Author
User avatar
Fiona
Posts: 2835
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: Space conflict between two partitions

#11 Post by Fiona »

Win7 aligns partitions on megabyte boundaries, so they're not Intel standard anymore.
The Extended LBA doesn't matter at all.
If you want to, you can check your fourth partition and set it to P for primary using your your left or right arrow key.
But afterwards, you'd be not able to add more partitions because Intel MBR can only have 4 primary partitions.
If you press enter, you can use write to write this partition structur int your partition table.

Fiona

gemma
Posts: 11
Joined: 26 May 2012, 23:13

Re: Space conflict between two partitions

#12 Post by gemma »

I've taken the drive out and plugged it into another machine. Voila! I can see all 4 partitions, it automatically assigns a drive letter to all of them and I can browse and copy files with no issue.

I've downloaded 6.13 as I couldn't find 6 as you suggested.

Again I'm shown the below:

Code: Select all

     Partition             		Start        			End      			Size in sectors
 1 * HPFS - NTFS         	0  32 33	         	828 194  6   	        13312000 [Recovery]
 2 P HPFS - NTFS          	828 194  7   		867   1 30     		614400 [System]
 3 P HPFS - NTFS          	867   1 31 			13928 112  8  		209831936 [Windows7]
 4 E extended LBA         	13928 112  9  		60801  80 15  		753012736
 5 L HPFS - NTFS          	13928 144 41 	 	60801 254 63  		753021698 [Data]

Space conflict between the following two partitions
 4 E extended LBA         	13928 112  9 		60801  80 15		753012736
 5 L HPFS - NTFS          	13928 144 41 		60801 254 63  		753021698 [Data]
Remy you say in an earlier post that P4 the Ext LBA is what holds my data. When looking at it in Disk Management on this machine I can confirm that it is showing as an Extended Partition.
So, firstly should this be Extended? Or should it be Primary. I know there can only be 4 Primary partitions on any disk so I guess when creating the 4th it creates it Extended so that more than 4 partitions can be created.
Secondly, why is the Logical partition labelled correctly and the Extended one not? I wouldn't imagine I need two partitions sat over the top of one another.
And especially that they're both different sizes and start and end in different sectors to one another, just being slightly offset.

Which partition do I need to get rid of? And how?
When I'm given the option to add and delete partitions I'm only shown the 4 I would expect to see. No 5th!

Code: Select all

     Partition             		Start        			End      			Size in sectors
>* HPFS - NTFS          	0  32 33   			828 194  6   		13312000 [Recovery]
 P HPFS - NTFS          	828 194  7  		867   1 30     		614400 [System]
 P HPFS - NTFS          	1867   1 31 		13928 112  8  		209831936 [Windows7]
 L HPFS - NTFS          	13928 144 41 		60801  47 46  		753008640 [Data]
I don't want to delete the Logical partition listed. Or do I?
FYI after doing a deep search I still get the same list as the one directly above.

When pressing Enter to continue I'm shown that 5th partition again. This is what I'm being asked to write to disk. I've done it anyway on your recommendation and of course, it's still showing the 5th partition.
I'm really not sure where I go from here.

And then there is now the issue of not being able to boot from the disk.
According to the table above I'm booting from the 1st partition, this is the recovery partition. I will one day (this will probably be sooner than I hoped!) need to boot from this partition, but really I need to book from my Windows 7 Primary partition. But is the boot Partition the correct one?

I've tried writing a new copy of the MBR code using TestDisk but I'm still unable to boot it.

I'd be tempted to rebuild the entire thing if I was able to boot to the Recovery partition!!!!

gemma
Posts: 11
Joined: 26 May 2012, 23:13

Re: Space conflict between two partitions

#13 Post by gemma »

Sorry Fiona, I was still typing when you posted.
I'm confused about why you say the Ext LBA doesn't matter. There are two partitions fighting for space over the disk.
One of them needs to be deleted surely?!

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

Re: Space conflict between two partitions

#14 Post by Fiona »

I'm confused about why you say the Ext LBA doesn't matter. There are two partitions fighting for space over the disk.
One of them needs to be deleted surely?!
TestDisk displayed your partition table containing an extended partition overlapping your data-partition.
In Quick Search your partition structur has been ok.
I've no idea why your extended partition overlaps your data partition.
Probably it only occurs on your PC?
In case, if you want to get rid of your extended partition, it'd be pretty easy!
Just higlight your data partition and set it to P for primary!
It's already explayned in my post above.
If you set your data partitionj as primary, then you'll not find an extended partition anymore, because primary partition are not in an extended partition.
I was this description;
If you want to, you can check your fourth partition and set it to P for primary using your your left or right arrow key.
You can watch changing from L for logical partition to p as Primary it at the left side.
If you changed your partition to primary, just press enter to get to the next screen.
Mark Write and confirm with enter and y.
Quit Testdisk and restart your PC.

Fiona

gemma
Posts: 11
Joined: 26 May 2012, 23:13

Re: Space conflict between two partitions

#15 Post by gemma »

I've made the partition primary. This fixed the partition table as expected.
It wasn't really what I wanted to do but at the moment I cannot see me wanting a 5th partition any time soon.

This still hasn't fixed my missing bootmgr.

I'm going to try to rebuild it using my Windows 7 DVD.

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

Re: Space conflict between two partitions

#16 Post by Fiona »

Partition Start End Size in sectors
1 * HPFS - NTFS 0 32 33 828 194 6 13312000 [Recovery]
2 P HPFS - NTFS 828 194 7 867 1 30 614400 [System]
3 P HPFS - NTFS 867 1 31 13928 112 8 209831936 [Windows7]
4 E extended LBA 13928 112 9 60801 80 15 753012736
5 L HPFS - NTFS 13928 144 41 60801 254 63 753021698 [Data]

Space conflict between the following two partitions
4 E extended LBA 13928 112 9 60801 80 15 753012736
5 L HPFS - NTFS 13928 144 41 60801 254 63 753021698 [Data]
Your boot partition looks wrong!

1 P HPFS - NTFS 0 32 33 828 194 6 13312000 [Recovery]

I assume that you don't boot from your recovery-rartition.
That's why its already corrected to P for primary only.
The P means that your Recovery-partition is not bootable.

2 * HPFS - NTFS 828 194 7 867 1 30 614400 [System]

Bootable should be your System partition.
It's already corrected and you can see the Star.
It means active and bootable.
The other partitions are ok.

Fiona


Yes, you can try to boot into your system recovery options and run the startup repair.
If it doesn't help, please let me know

gemma
Posts: 11
Joined: 26 May 2012, 23:13

Re: Space conflict between two partitions

#17 Post by gemma »

I changed the system partition to be the Bootable partition and made the recovery partition Primary.

I'm now able to boot into Windows. And I'm able to see the Data Partition and assign it a drive letter.
Finally! Thank you for your help.

A few questions still though. Just to help me understand a bit more.

I thought I'd start TestDisk just to see how it looks now...

When first looking at the partition table from the Analyse option I see this:

Code: Select all

Disk /dev/sda - 500 GB / 465 GiB - CHS 60801 255 63
Current partition structure:
     Partition          	Start        		End    		Size in sectors
 1 P HPFS - NTFS	0  32 33		828 194  6		13312000 [Recovery]
 2 * HPFS - NTFS	828 194  7		867   1 30		614400 [System]
 3 P HPFS - NTFS	867   1 31		13928 112  8	209831936 [Windows7]
 4 P HPFS - NTFS	13928 144 41	60801  47 46	753008640 [Data]
Perfect - exactly what I changed it to.

Then when I press Enter to search for partitions I'm shown this:

Code: Select all

Disk /dev/sda - 500 GB / 465 GiB - CHS 60801 255 63
     Partition          Start        	End    		Size in sectors
>* HPFS - NTFS          0  32 33   	828 194  6   	13312000 [Recovery]
 P HPFS - NTFS          828 194  7  	867   1 30     	614400 [System]
 P HPFS - NTFS          1867   1 31 	13928 112  8  	209831936 [Windows7]
 L HPFS - NTFS          13928 144 41 	60801  47 46  	753008640 [Data]
It looks like it did originally. Is this because this is what TestDisk would consider to be the "perfect" table? The first sector being the boot sector, in this case the wrong one, and then a 4th partition to be Logical to allow any future partitions.

Strangely, when I quit this menu section guess what I see?

Code: Select all

     Partition          	Start        		End    		Size in sectors
 1 * HPFS - NTFS    	0  32 33   		828 194  6   	13312000 [Recovery]
 2 P HPFS - NTFS        828 194  7   	867   1 30     	614400 [System]
 3 P HPFS - NTFS        867   1 31 	13928 112  8  	209831936 [Windows7]
 4 E extended LBA       13928 113  1 	60801  254 63  	753023691
 5 L HPFS - NTFS        13928 144 41 	60801  47 46  	753008640 [Data]
Even more strange is that the Ext LBA starts and ends in different sectors than before and is of slightly larger size.

Is this a bug within the software?
Or is it still not right?

User avatar
remy
Posts: 457
Joined: 25 Mar 2012, 10:21
Location: Strasbourg, France.
Contact:

Re: Space conflict between two partitions

#18 Post by remy »

I'm not sure but I think that when you do your Quicksearch testdisk will propose the first partition to be bootable, and after that it will try to maximise the extended partition arround your logical one. Nothing seems a bug for me there.

gemma
Posts: 11
Joined: 26 May 2012, 23:13

Re: Space conflict between two partitions

#19 Post by gemma »

Okay but I no longer have a Logical partition.
I changed the Logical partition to be Primary to solve the issue of the two partitions fighting for space.

This is why I'm confused as to why it's showing up again. Especially when I only see it when I quit out of the menu section to write the partition table to the disk.

I've done a deep search and it shows up correctly. Though when I quit out of the menu I again see the Logical and Extended partitions. But again it's sizing is different to what I've been seeing for the last week.

I'm unsure as to why I'd be seeing this only when I quit, that's why I asked if there was a possible bug.

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

Re: Space conflict between two partitions

#20 Post by Fiona »

TestDisk easily gets all information from the OS.
Win7 standard partitions are 3 primary and 1 extended for logical partitions.
If you want to create partitions different, you've to use diskpart.
It's an old Intel workaround to solve the problem that a disk only can contain 4 partitions.
Also, the results if you were running Quick or Deeper Search the first primary partition is bootable.
Actually a good idea to keep a system bootable and if someone forgets to set a partition up as bootable.
In your case, your first partition is a recovery partition.
That's why you have to set it manually.

Under win7, a logical partitions needs a little bit free space for the extended partition.
TestDisk doesn't display under Quick and Deeper Search an extended partition, because it has no data and would mess up partition list.
If the space or logical partitions are detected, TestDisk creates that extended partition at the screen where you can use the menu Write to register your partitions into your partition table automatically.
Infos about Intel MBR;
http://www.cgsecurity.org/wiki/Partitio ... nd_logical
And an example about Microsoft partitions aligned on megabyte boundary;
2 P HPFS - NTFS 828 194 7 867 1 30 614400 [System]
3 P HPFS - NTFS 867 1 31 13928 112 8[/b] 209831936 [Windows7]
Partitions order are Cylinder - Head - Sector.
The first partitions ends at sector 30.
The next next partition starts at sector 31 (Cylinder and heads are the same).
So there is no space for an extended partition.

3 P HPFS - NTFS 867 1 31 13928 112 8 209831936 [Windows7]
4 E extended LBA 13928 112 9 60801 80 15 753012736
5 L HPFS - NTFS 13928 144 41 60801 254 63 753021698 [Data]
Same situation between the primary and extended partitions.
For a logical volume Data there is more space left between the partitions.
That's the way primary, extended and logical partitions are created.

Normally, such explanations going beyond the scope of support!

Fiona

Locked