Jump to content

[Testdisk] Can't repair bootsector or write a new one


Recommended Posts

First off, I was able to copy the important data to a different hard drive so right now I am just doing this for more brownie points. I'm attempting to make the entire drive readable by Windows again however I am having difficulty.

Here's the story (skip this paragraph if you don't want to read it, it's not too important): my friend's 750GB 7200.11 Seagate drive decided to go into the BSY state one day and became undetectable by the bios. I performed this fix and was successfully able to view the drive in the bios again. Upon booting Windows I noticed that about 350GB of data was RAW and the rest was blank NFTS. This is where testdisk comes in, I was able to perform a deep scan and find the missing partition with all of my friend's data on it and subsequently was able to back up all of the important stuff. I attempted to make the drive readable by windows by writing the new partition table which testdisk recommended, however the write failed.

Partition 1: probably some factory default backup section which I don't care about but it would be nice to keep.

Partition 2: this is the one I care about reading in Windows which unfortunately is the one which is RAW.

Partition 3 extended LBA: I have no idea what this is.

Partition 5 [Data]: empty and I don't care about it.

The only thing I can see which may be causing the problem is the incorrect number of heads/cylinder warning...

Testdisk advanced screen

b68vn7.jpg

Partition 1 menu

2dc7hix.jpg

Partition 2 menu

35jezad.jpg

Partition 2 rebuild BS (list correctly lists files, write fails to write)

24g9f1j.jpg

Any help would be appreciated!

Edited by shoot2thrill
Link to comment
Share on other sites


You have an "added difficulty".

One of the two systems has a "non-standard" 240 heads geometry.

As an example this is typical of a Lenovo laptop (but many "HP" desktops do the same).

If you connect a hard disk internally, the BIOS "assumes" or "forces" the CHS geometry to be n/240/63 (whilst the "real" hd geometry is m/255/63.

Since the disk is originally partitioned/formatted on that motherboard, the partition table and PBR/bootsector BPB will reflect the 240 heads geometry.

When you connect the same hard disk to another "normal" motherboard (or even to the same motherboard but through an USB enclosure/interface) the geometry returns to a 255 heads one and you have problems in:

  • booting
  • running disk utilities

(or viceversa, original was 255 and "current BIOS" reads 240, this seems like the case at hand).

TESTDISK has an option to adjust geometry (perceived by TESTDISK).

Right now it seems like:

  • the current NTFS BPB has a 255 one
  • the partition table (or the hard disk BIOS data) are 240.

Try checking the geometry TESTDISK currently uses and change it to the "other" one, in your case the disk is seen by testdisk as 240 whilst it should be set to 255..

Then re-run the scan for partitions.

For the record:

The partition labeled "PQSERVICE" is usually a recovery partition, typical of most "BIG" OEM's like HP; COmpaq, Dell, etc., if I recall correctly "PQSERVICE" is used by Acer, Gateway and Packard Bell, but many other makers may use it)

The "E" is the Extended partition.

The "L" is the Logical volume inside it (with label "[DATA]).

Since you don't need them, if you don't know what an Extended partiton is, it's allright.

jaclaz

Link to comment
Share on other sites

You have an "added difficulty".

One of the two systems has a "non-standard" 240 heads geometry.

As an example this is typical of a Lenovo laptop (but many "HP" desktops do the same).

If you connect a hard disk internally, the BIOS "assumes" or "forces" the CHS geometry to be n/240/63 (whilst the "real" hd geometry is m/255/63.

Since the disk is originally partitioned/formatted on that motherboard, the partition table and PBR/bootsector BPB will reflect the 240 heads geometry.

When you connect the same hard disk to another "normal" motherboard (or even to the same motherboard but through an USB enclosure/interface) the geometry returns to a 255 heads one and you have problems in:

  • booting
  • running disk utilities

(or viceversa, original was 255 and "current BIOS" reads 240, this seems like the case at hand).

TESTDISK has an option to adjust geometry (perceived by TESTDISK).

Right now it seems like:

  • the current NTFS BPB has a 255 one
  • the partition table (or the hard disk BIOS data) are 240.

Try checking the geometry TESTDISK currently uses and change it to the "other" one, in your case the disk is seen by testdisk as 240 whilst it should be set to 255..

Then re-run the scan for partitions.

For the record:

The partition labeled "PQSERVICE" is usually a recovery partition, typical of most "BIG" OEM's like HP; COmpaq, Dell, etc., if I recall correctly "PQSERVICE" is used by Acer, Gateway and Packard Bell, but many other makers may use it)

The "E" is the Extended partition.

The "L" is the Logical volume inside it (with label "[DATA]).

Since you don't need them, if you don't know what an Extended partiton is, it's allright.

jaclaz

Does this mean I should be attempting the recovery on her computer instead of mine? I'm getting the impression that if I change the geometry to 255 so my computer can read it, hers won't be able to since it requires 240. Thank for your help by the way.

Link to comment
Share on other sites

Does this mean I should be attempting the recovery on her computer instead of mine? I'm getting the impression that if I change the geometry to 255 so my computer can read it, hers won't be able to since it requires 240. Thank for your help by the way.

No, it doesn't matter on which PC you attempt the recovery, as long as you use in TESTDISK the right geometry.

The PHYSICAL geometry of a hard disk (this hard disk particularly) is 255 heads.

From the screenshots you posted TESTDISK has it as 240 heads.

See: CHS 96901 240 63

So, from what I can say from a distance it is "your "computer that has it "wrong" and on "her" computer geometry is 255 allright.

(unless you ALREADY modified data on the disk, if this is the case, cannot say)

Let's take first partition as an example.

it has 31457280 sectors and starts at 0/32/33, so:

(0*240*63)+(32*63)+33-1= 2048 <-start LBA

2048+31457280= 31459328 <- End LBA

31459328/240/63=2081

31459328-(2080*240*63)=9728

9728/63=154

9728-154*63=26

Geometry with 240 heads 2080/154/26

But:

(0*255*63)+(32*63)+33-1= 2048 <-start LBA

2048+31457280= 31459328 <- End LBA

31459328/255/63=1958

31459328-(1958*255*63)=4058

4058/63=64

4058-64*63=26

Geometry with 255heads 1958/64/26

jaclaz

Link to comment
Share on other sites

I changed the geometry to match that of the hard drive and I no longer get the warnings. However, my problem still exists: cannot copy a good backup boot sector over a bad one & cannot write a rebuilt boot sector. I'm thinking this is more effort than it is worth, I already have the important data off it. Thanks for the help!

Link to comment
Share on other sites

I changed the geometry to match that of the hard drive and I no longer get the warnings. However, my problem still exists: cannot copy a good backup boot sector over a bad one & cannot write a rebuilt boot sector.

Sure :), that was expected. (It was you that assumed :ph34r: that the geometry was the problem ;))

I'm thinking this is more effort than it is worth, I already have the important data off it. Thanks for the help!

Too bad :(, you give up just when you were warming up! :whistle:

Anyway, you are welcome :yes: .

jaclaz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...