Recovering partitions from disk image?

Wojciech Puchar wojtek at wojtek.tensor.gdynia.pl
Fri Apr 3 02:40:30 PDT 2009


> Hello FreeBSD gurus,
>
> I recently had the pleasure of trying to recover a failed RAID1 array.  It
> consisted of two 120GB disks in mirrored configuration.  Both drives have a
> ton of bad sectors, so bad that the 3ware RAID card stopped recognizing that
> there was a mirror at all.  Having no other options that I could think of, I

excellent hardware - designed to PROTECT ;)

> pulled the drive with the one with the least read errors, directly connected
> it to ATA bus and used GNU ddrescue to make a disk image with only about 7
> read errors.
>
> Neither fdisk nor bsdlabel can read the disk image.  I wonder if there's
> some funny data at the beginning of the hard drive the 3ware card used for
> RAID configuration?  If this is true, is there a way to search for the
> beginning of the real fdisk data and lop it off to make a possibly valid
> disk image?

do

dd if=image bs=128k count=1|hexdump -C|less

and look for it :)

at MBR sector you'll see probably something at the end like this:


00000190  46 0a d0 e3 00 5e 05 28  46 02 77 88 c3 52 65 61 
|F.##.^.(F.w.#Rea|
000001a0  64 00 42 6f 6f 74 00 20  65 72 72 6f 72 0d 0a 00  |d.Boot. 
error...|

for bsdlabel it's easier it's "WEV" and first 3 bytes.






More information about the freebsd-questions mailing list