Another geometry question - deadlock? Topic is solved

How to use TestDisk to recover lost partition
Message
Author
cwimvm
Posts: 6
Joined: 27 Mar 2012, 16:19

Another geometry question - deadlock?  Topic is solved

#1 Postby cwimvm » 27 Mar 2012, 16:58

Hello,

First of all i wanted to say great software and great support, it comes automatically to mind when reading this forum. Unfortunately my problem is not listed yet. Please allow me to explain.

There is this Thinkpad R60 of about 4 years old. It's an XP machine that crashed and lost its bootsector, it came up with "no operating system found". I whipped out the Mepis 8 live CD, a Debian based linux version, and let testdisk analyze the disk. Almost immediately it began to complain about the number of heads, 255 where it should be 240. Please use geometry to adjust. First i let it do a deeper search but no partitions were found. So i did adjust the geometry to 240, and this time it found the partitions. I could list the data too so I presumed this to be ok and wrote the partition table to disk. Then I let it copy the backup bootsector, an all looked fine. But the XP machine wouldn't boot, it just sat there with a black screen and a blinking cursor and nothing happened.

Ok, so i ran testdisk off the linux live CD again. This time it complained it is the other way round, 240 NTFS where HD says 255. Gparted mentions 255 heads too. Taking a look at the bootsector section shows the controversy between 240 and 255 too, where at first (when i copied the backup bootsector) it showed no warnings.

When i do a analysis with a 255 geometry it finds the partitions now, but theyre marked as Deleted. Accessing the data on them works fine though, in Deleted mode. Structure Ok. However the FAT32 Service partition gives a Structure Bad on anything else than the D-flag. Trying to change the D on the XP partition to a * (primary bootable) and save to disk doesn't do a thing because the XP install won't boot. Next time I run testdisk they both show up as Deleted again. Bootsectors are still warned about in terms of 240 and 255 heads that don't match.

So my dillemma is that I cant adjust the heads to 240 because that generates a heads mismatch and I can't adjust any partitions found under 255 heads. Linux will mount the disk, listed as 255 heads, although it must be forced to do so, resetting $logfile. I have copied off the data itself, works fine under linux. But XP just won't boot.

Please advise? It seems I am out of options on this one. I'm sure I'm overlooking something here but I can't think of what it might be. Any help would be greatly appreciated.

Kind regards,

mvm - working on cwi's computer

Sponsored links

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

Re: Another geometry question - deadlock?

#2 Postby Fiona » 27 Mar 2012, 18:45

240 Heads are correct.
I'm sitting in front of an IBM Thinkpad T60.
So I know the ropes about that! ;)

I assume TestDisk wrote your partitions correctly?
There will be no necessity to do anything else.
In case, you can upload a photo (jpg) with low resolution from any camera to check it.

The Thinkpad-MBR is modified to use the blue thinkvantage button to start System and Recovery at startup.
This can cause such behavior.
Might be an idea to start using a Windows XP-CD into your windows recovery console.
To have a try to repair your MBR back to WinXP standard, use fixmbr and fixboot.
This is intended to start into WinXP.
If it works, you should deinstall Rescue and Recovery.
Then just reinstall it and it will modify your MBR again and you should be able to start using your blue thinkvantage button also.

If it doesn't work, there could be a problem about your file system.
If it's possible/necessary backup important data and run chkdsk /r on your boot partition from WinXP recovery console.

cwimvm
Posts: 6
Joined: 27 Mar 2012, 16:19

Re: Another geometry question - deadlock?

#3 Postby cwimvm » 27 Mar 2012, 19:33

Hi,

Thanks for the swift reply. I find the suggestion of a modified Thinkvantage MBR a good one. I have already tried the XP CD recovery console. However, it does not see any disks. Could this be due to a missing ATA diskdriver on the XP CD?

I will include some Testdisk output in a followup post. Wanted to let you know this response first.

Thanks so far, I will check back in later this evening.

Kind regards,
mvm

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

Re: Another geometry question - deadlock?

#4 Postby Fiona » 27 Mar 2012, 20:05

Could this be due to a missing ATA diskdriver on the XP CD?

Actually, it shouldn't be a problem because drivers should be already loaded/insalled in your current WinXP install.
But if the driver is defective or not available, it could cause exactly your symptoms.
If you have WinXP so you will have the oppertunity to do a repair installation.
Have a look for an external floppy drive.
Create a floppy containing your sata driver.
Start Repair installation.
At the start youll get a message to press F6 to load drivers.
Drivers will be loaded using your floppy.
It's a bit crappy about WinXP that's not possible not to load it using a CD or USB drive.
To have a repeair installation you will be prompted twice to press R.
The first one starts the reparatur console and the second one your repair install.
Also Infos;
http://www.techspot.com/vb/topic8356.html

cwimvm
Posts: 6
Joined: 27 Mar 2012, 16:19

Re: Another geometry question - deadlock?

#5 Postby cwimvm » 27 Mar 2012, 20:25

Hello again,

I took a few output dumps. I set the geometry to 240 again and it found the partitions, with a warning. This error disappeared after i wrote the partition table again.

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 160 GB / 149 GiB - CHS 20675 240 63
Current partition structure:
Partition Start End Size in sectors

1 * HPFS - NTFS 0 1 1 19963 74 63 301845222 [Preload]

Warning: Bad ending head (CHS and LBA don't match)

*=Primary bootable P=Primary L=Logical E=Extended D=Deleted
>[Quick Search] [ Backup ]
Try to locate partition

Then I let it do a discovery:

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 160 GB / 149 GiB - CHS 20675 240 63
Partition Start End Size in sectors
>* HPFS - NTFS 0 1 1 19962 239 63 301840497 [Preload]
P FAT32 LBA 19963 0 1 20672 239 63 10735200 [SERVICEV001]


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, 154 GB / 143 GiB

Wrote the partition table:

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 160 GB / 149 GiB - CHS 20675 240 63

Partition Start End Size in sectors

1 * HPFS - NTFS 0 1 1 19962 239 63 301840497 [Preload]
2 P FAT32 LBA 19963 0 1 20672 239 63 10735200 [SERVICEV001]


[ Quit ] [Deeper Search] >[ Write ]
Write partition structure to disk

And confirmed....

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Write partition table, confirm ? (Y/N)

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org


You will have to reboot for the change to take effect.

>[Ok]

Then i checked the boot sectors:

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 160 GB / 149 GiB - CHS 20675 240 63
Partition Start End Size in sectors
1 * HPFS - NTFS 0 1 1 19962 239 63 301840497 [Preload]

Boot sector
Status: OK

Backup boot sector
Status: OK

Sectors are identical.

A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.

>[ Quit ] [ List ] [Rebuild BS] [Repair MFT] [ Dump ]
Return to Advanced menu

The CHS/LBA mismatch warning has disappeared now:

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sda - 160 GB / 149 GiB - CHS 20675 240 63
Partition Start End Size in sectors
>* HPFS - NTFS 0 1 1 19962 239 63 301840497 [Preload]
P FAT32 LBA 19963 0 1 20672 239 63 10735200 [SERVICEV001]

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, 154 GB / 143 GiB

Then booted off the the XP CD. But, like before it says "Setup did not find any hard disk drives installed in your computer. (omitted some) Setup cannot continue" .

May be a matter of feeding the correct disk driver to setup when it asks for third party deice drivers? Disk is a conventional ATA disk. So if this doesn't work, how do i run fixboot and fixmbr to reset the boot sector to XP standard? There must be a drive and a partition to connect to but none are detected.

Thanks in advance for your time and thoughts.

mvm

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

Re: Another geometry question - deadlock?

#6 Postby Fiona » 27 Mar 2012, 20:47

Disk /dev/sda - 160 GB / 149 GiB - CHS 20675 240 63
Partition Start End Size in sectors
>* HPFS - NTFS 0 1 1 19962 239 63 301840497 [Preload]
P FAT32 LBA 19963 0 1 20672 239 63 10735200 [SERVICEV001]

Your geometry fits absolutely!
There is nothing to do if you are able to list your files.

It's unusual if you have an IDE-disk.
IDE-Disks are normally recognized.
Are you absolutely sure that you have an IDE disk and not sata?
Also have a look here;
http://forum.notebookreview.com/lenovo- ... 461-a.html
And here;
http://forums.lenovo.com/t5/R-and-L-Ser ... td-p/11941
If you want to get into your BIOS,
Press the blue ThinkVantage button when the message "To interrupt normal startup, press the blue ThinkVantage button " is displayed to enter the ThinkVantage Productivity Center, then select Start setup utility to open the BIOS Setup Utility.

cwimvm
Posts: 6
Joined: 27 Mar 2012, 16:19

Re: Another geometry question - deadlock?

#7 Postby cwimvm » 27 Mar 2012, 21:02

Hi again,

No it's not an IDE drive, it's a Serial ATA drive. One can press F1 too at startup to get into the BIOS of this Stinkpad (just kidding). My PC is a 4 yr old T61 and the XP CD doesn't see the hard disk there too, also a SATA drive.

I guess I have no better option than to find some USB CDROM device or USB floppy and load the SATA driver from there while the XP CD boots. Hopefully it loads USB CDROM support before one must press F6 or there is no way to load the driver. I'm crossing my fingers. Otherwise I may have to make a customized XP CD with the SATA driver onboard. If that is ever gonna work.

Will try to find something to load the driver from tomorrow and will get back to the forum with the results. For now thanks a million for your great idea about Thinkvantage Rescue and Rrecovery modifying the MBR. I think this will prove to be the solution, now it has only to work out. Quite inapt that R&R doesnt provide some MBR fixing tools by the way. I guess I found another reason not to value R&R too much.

Will check back in when I found a USB device. Will read the links you provided. Thanks a lot for now.

Kind regards,

mvm
Last edited by cwimvm on 27 Mar 2012, 23:45, edited 1 time in total.

cwimvm
Posts: 6
Joined: 27 Mar 2012, 16:19

Re: Another geometry question - deadlock?

#8 Postby cwimvm » 27 Mar 2012, 22:55

Hi and good evening,

Of course I couldn't wait til tomorrow so i set the drive to compatibility mode in the BIOS, as your link provided suggested. Guess what, now the XP CD sees the drive! I can logon to it and browse the directory structure. This is fixable now.

I'll just have to read around a bit for the alarming messages fixmbr gives (may lose all partitions) and the to fixboot, looking from the recovery console, seemingly switched target drives (the windows installation is now on D: and the rescue and recovery partition is C:). Could be the MBR modification by R&R, but I will have to look up what I can enter to point fixboot to D: Might be just D: for all i know now : )

With regards,

mvm

cwimvm
Posts: 6
Joined: 27 Mar 2012, 16:19

Re: Another geometry question - deadlock?

#9 Postby cwimvm » 28 Mar 2012, 18:21

Well that proved to be a piece of cake. I decided not to run fixmbr from the recovery console since TestDisk already fixed that. Why mess up a perfect boot sector with MS boot stuff? No thanks unless I have to. And thanks to TestDisk I didn't have to.

So I just ran fixboot D: off the XP recovery console. Type exit to reboot, when the machine start screen comes on press F1 to enter the BIOS, set the SATA drive back from compatibility mode to AHCI and it booted right into XP. Piece of cake!

By the way, to run chkdsk /F /R from XP is not a bad idea after all this disktampering.

Machine runs smoothly, very satisfactory. Thanks to TestDisk and Fiona on this forum. The Thinkvantage service partition indeed proved to be the culprit, but it's fixed now. Like the machine has never been dead at all : ) Cwi is still thinking if she will remove and reinstall rescue and recovery or not. It's usefulness has once more proven to be somewhat limited.

Anyway, let's hope other folks will find the solution for their similar problems in this thread. Thanks again cgsecurity!

With sincere respects,
also on behalf of cwi, the owner of the thoroughly fixed R61 Thinkpad,

mvm

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

Re: Another geometry question - deadlock?

#10 Postby Fiona » 28 Mar 2012, 19:54

As far as I know, ThinkVantage System and Recovery-Partition uses another partition type.
Should be Windows RE(estore).
Code for Windows RE is 27.
Windows doesn't recognize this partition type.
So you'll have only one partition (your NTFS) and it gets automatically drive letter C:
The Thinkvantage Rescue and Recovery-Partition will be hidden.
It's on purpose that nobody can change something!
TestDisk can change a partition type using the menu Type!

Thanks for your Feedback.
I'll set your topic as solved.


Return to “Partition Recovery”

Who is online

Users browsing this forum: No registered users and 0 guests