From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Iulor-00044e-AI for garchives@archives.gentoo.org; Wed, 21 Nov 2007 09:24:29 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.2/8.14.0) with SMTP id lAL9Mkba015699; Wed, 21 Nov 2007 09:22:46 GMT Received: from s200aog16.obsmtp.com (s200aog16.obsmtp.com [207.126.144.130]) by robin.gentoo.org (8.14.2/8.14.0) with ESMTP id lAL9MiVb015694 for ; Wed, 21 Nov 2007 09:22:45 GMT Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob016.postini.com ([207.126.147.11]) with SMTP; Wed, 21 Nov 2007 09:22:44 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7718DDB18 for ; Wed, 21 Nov 2007 09:22:43 +0000 (GMT) Received: from mail1.agr.st.com (mail1.agr.st.com [164.130.4.71]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 12C164BE83 for ; Wed, 21 Nov 2007 09:22:42 +0000 (GMT) Received: from [164.130.17.81] (ws2912.agr.st.com [164.130.17.81]) by mail1.agr.st.com (MOS 3.7.5a-GA) with ESMTP id COH12071 (AUTH "raffaele belardi"); Wed, 21 Nov 2007 10:22:40 +0100 (CET) Message-ID: <4743F952.5000303@st.com> Date: Wed, 21 Nov 2007 10:24:34 +0100 From: Raffaele BELARDI User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.9) Gecko/20071113 SeaMonkey/1.1.6 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-amd64@gentoo.org Reply-to: gentoo-amd64@lists.gentoo.org MIME-Version: 1.0 To: gentoo-amd64@lists.gentoo.org Subject: Re: [gentoo-amd64] Re: not amd64 specific - disk failure References: <47415FCD.300@st.com> <47418F30.6050607@st.com> <47429114.5030102@st.com> In-Reply-To: <47429114.5030102@st.com> X-Enigmail-Version: 0.95.3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: 2fc1b90c-73bb-4ad9-b545-73291ba22c02 X-Archives-Hash: 4474824873e7003bede30fb056993268 Raffaele Belardi wrote: > So my hypothesis is that the bad blocks or sectors at the beginning of > the partition were not copied, or only partly copied, by dd, and due to > this the superblocks are all shifted down. Although I don't like to > access again the hw, maybe I should try: > # dd conv=noerror,sync bs=4096 if=/dev/hdb of=/mnt/disk_500/sdb.img > > to get an aligned image. Problem is I don't know what bs= should be. > Block size, so 4k? > So, I re-created an image of the disk with the above. The first 512 bytes contain an MBR (I recognize the aa55 signature), then lots of nulls until what seems a part of the first superblock, obviously unusable. I manually searched for another superblock looking for the magic number and found one at 0x8007e00. According to mkfs the first sb backup should be at block 32768, so byte 0x8000000. Thus the image is shifted up of 0x7e00 bytes (probably the sum of MBR+Grub stage 1.5, although the numbers do not correspond with another drive I used to check). Now the problem is how to tell e2fsck to use sb at 0x8007e00? This is not divisible by block size (0x1000), I tried to specify a different block size with -B 512 but it complains that it's not legal size. Should I trim the first 0x7e00 bytes of the image and use e2fsck normally (with -b 32768)? If so, how can I remove the first 0x7e00 bytes without re-reading the whole image from damaged disc? Other options I may have? Is it possible to fake the kernel into using the sdb.img as a disk image, so mount it as a disk (not as a partition) so maybe it automatically skips the first 0x7e00 bytes and gives me an aligned first partition? thanks, raffaele -- gentoo-amd64@gentoo.org mailing list