From owner-freebsd-questions@FreeBSD.ORG Fri Apr 3 09:40:30 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51CA01065670 for ; Fri, 3 Apr 2009 09:40:30 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 5911D8FC17 for ; Fri, 3 Apr 2009 09:40:28 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n339eBBX049772; Fri, 3 Apr 2009 11:40:11 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id n339e993049769; Fri, 3 Apr 2009 11:40:10 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Fri, 3 Apr 2009 11:40:09 +0200 (CEST) From: Wojciech Puchar To: snott In-Reply-To: <22862006.post@talk.nabble.com> Message-ID: References: <22862006.post@talk.nabble.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-questions@freebsd.org Subject: Re: Recovering partitions from disk image? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2009 09:40:30 -0000 > 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.