defective harddrive data recovery

From: Alexander Linkenbach (alex.linkenbach_at_gmx.net)
Date: 10/26/03


Date: Sun, 26 Oct 2003 19:15:40 +0000 (UTC)

Hi,
one of my harddrives failed me recently taking the partition table into
oblivion. Hitachi is kind enough to offer replacement but before that I
want to recover what can be saved. I was able to recover a table with
testdrive that gave me partition 3 completely back making it possible to
copy all data to the replacement drive. However I still run into
problems with first and second partitons. First is irrelevant because it
was a softraid1 which has been replaced succesfully but No2 contained
approx. 30GB of mp3 copied from old vinyls. I have about 75% of them on
CDs but unsorted and without valid tags so recovery of the ones on the
drive would save me from several months work. Here is what I have done:

TestDisk 4.4, Data Recovery Utility, March 26 2003
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/hdc - CHS 15017 255 63 - 117796 MB
Check current partition structure
      Partition Start End Size
  1 P Linux ext2fs 0 1 1 1030 254 63 16562952
  2 * Linux ext2fs 1032 0 1 7559 254 63 104872320
  3 P Linux ext2fs 7560 0 1 15015 254 63 119780640

hdc3 is as I said mountable and files can easily be copied. hdc1 and
hdc2 however appear to be empty.

I found out that fdisk gives me different values by one sector:

fdisk:
Platte /dev/hdc: 123.5 GByte, 123522416640 Byte
255 Köpfe, 63 Sektoren/Spuren, 15017 Zylinder
Einheiten = Zylinder von 16065 * 512 = 8225280 Bytes

      Gerät boot. Anfang Ende Blöcke Id Dateisystemtyp
/dev/hdc1 1 1031 8281476 83 Linux
/dev/hdc2 * 1033 7560 52436160 83 Linux
/dev/hdc3 7561 15016 59890320 83 Linux

(sorry, I hope you can figure out the translations...)

I assume that fdisk counts the first sector as No1 rather than No0. Is
that so? I get the testdrive values with yast and gpart as well.

Now, why is there a gap between hdc1 and hdc2, if I did not out it in there?

As a comparison here are the values of the replacement drive which was
build up on the mirror partition hdb1 so the boundary values between
first and second partition should be the same but:

Testdrive:
      Partition Start End Size
  1 P Linux RAID 0 1 1 1030 254 63 16562952 [md0]
  2 P Linux ext2fs 1031 0 1 7558 254 63 104872320
  3 P Linux ext2fs 7559 0 1 14591 254 63 112985145

fdisk:
      Gerät boot. Anfang Ende Blöcke Id Dateisystemtyp
/dev/hdb1 1 1031 8281476 fd Linux raid autodetect
/dev/hdb2 1032 7559 52436160 83 Linux
/dev/hdb3 7560 14592 56492572+ 83 Linux

The're not. Now I suspect that maybe all I have to do is move the start
of hdc2 down one sector and that might help. Is that so? Can I just do
that with fdisk (delete partition, create new one, no format)?

gpart is pretty useless here is what it gives me:

dev(/dev/hdc) mss(512) chs(15017/255/63)(LBA) #s(241248105) size(117796mb)
Primary partition(1)
    type: 131(0x83)(Linux ext2 filesystem)
    size: 8087mb #s(16562952) s(63-16563014)
    chs: (0/1/1)-(1023/254/63)d (0/1/1)-(1030/254/63)r
    hex: 00 01 01 00 83 FE FF FF 3F 00 00 00 08 BB FC 00

Primary partition(2)
    type: 131(0x83)(Linux ext2 filesystem) (BOOT)
    size: 51207mb #s(104872320) s(16579080-121451399)
    chs: (1023/254/63)-(1023/254/63)d (1032/0/1)-(7559/254/63)r
    hex: 80 FE FF FF 83 FE FF FF 08 FA FC 00 80 39 40 06

Primary partition(3)
    type: 131(0x83)(Linux ext2 filesystem)
    size: 58486mb #s(119780640) s(121451400-241232039)
    chs: (1023/254/63)-(1023/254/63)d (7560/0/1)-(15015/254/63)r
    hex: 00 FE FF FF 83 FE FF FF 88 33 3D 07 20 B5 23 07

Primary partition(4)
    type: 000(0x00)(unused)
    size: 0mb #s(0) s(0-0)
    chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
    hex: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...
Guessed primary partition table:
Primary partition(1)
    type: 000(0x00)(unused)
    size: 0mb #s(0) s(0-0)
    chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
    hex: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Primary partition(2)
    type: 000(0x00)(unused)
    size: 0mb #s(0) s(0-0)
    chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
    hex: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Primary partition(3)
    type: 000(0x00)(unused)
    size: 0mb #s(0) s(0-0)
    chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
    hex: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Primary partition(4)
    type: 000(0x00)(unused)
    size: 0mb #s(0) s(0-0)
    chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
    hex: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Any comments, experience reports or even help deeply appreciated.
So long

alex



Relevant Pages

  • Oops in do_page_fault
    ... The replacement card arrived, and annoyed by what seemed to be excessive ... corruption on my partition, I used a LiveCD to set one disk in the RAID10 ... In 2.6.13, I get an Oops: ... I also tested "emerge traceroute" on the same partition by booting ...
    (Linux-Kernel)
  • Problem Booting Up, Requires Clicking F1 Key
    ... I have a Dell Dimension 8200 computer with windows XP Pro installed, ... sent me a replacement HD yesterday and I installed it today. ... partition was not included. ... P.S. the noise level for the replacement HD is so much better compared to ...
    (microsoft.public.windowsxp.general)
  • Re: Migrating 13Gb Hdto 8GB hhard disk
    ... on the target or by copying it in place and then twiddling the partition ... A cleaner way to go, IMHO, is to resize then use partimage to ... in the replacement, run a live CD and restore to the replacement drive, ...
    (comp.os.linux.misc)
  • Re: defective harddrive data recovery
    ... I took a look at the first 30 MB if the partition copy in a hexeditor ... > want to recover what can be saved. ... > hdc2 however appear to be empty. ... > I found out that fdisk gives me different values by one sector: ...
    (comp.os.linux.hardware)
  • Re: Insert System Disk
    ... The install went fine, or, the partition creation went fine? ... Means it couldn't find the boot files. ... If too many, will recommend replacement. ... For corporate legal advice regarding the EULA for XP, ...
    (microsoft.public.windowsxp.hardware)