public inbox for gentoo-amd64@lists.gentoo.org
 help / color / mirror / Atom feed
From: Beso <givemesugarr@gmail.com>
To: gentoo-amd64@lists.gentoo.org
Subject: Re: [gentoo-amd64] Re: not amd64 specific - disk failure
Date: Tue, 20 Nov 2007 10:01:59 +0100	[thread overview]
Message-ID: <d257c3560711200101k5848c05al5927d2749aabfaca@mail.gmail.com> (raw)
In-Reply-To: <47429114.5030102@st.com>

[-- Attachment #1: Type: text/plain, Size: 2744 bytes --]

2007/11/20, Raffaele BELARDI <raffaele.belardi@st.com>:
>
> Duncan wrote:
> > If you have a spare drive of the same size or larger, you can try dd, or
> > probably better yet, merge dd-rescue and try it.  They copy a file or
> > part of one, in this case an entire block device, from one location to
> > another, "raw".  What you want to do is copy the entire bad device,
> /dev/
> > sdc above, to the new device.  Then you have a copy to play around with
> > without worrying about making the bad device worse before you get
> > whatever you were trying to get off of it, off.
> >
> Duncan,
>
> thanks for the ddrescue explanation, I will surely give it a try.
>
> Yesterday evening I got a new drive double the size of the damaged one,
> created a 250Gb partition on it and tried:
> # dd if=/dev/hdb of=/mnt/disk_500/sdb.img
>
> It stopped after few kb due to read errors. So I modified to
> dd conv=noerror if=/dev/hdb of=/mnt/disk_500/sdb.img
>
> and after some time I got a 250Gb sdb.img on the new drive.
> Then started the fun (it was already past midnight). When I created the
> new partition I noted down the superblock backup locations.
> Unfortunately, every:
> # e2fsck -b xxx -B 4096 /mnt/disk_500/sdb.img
>
> returned 'bad superblock'. After googling for some utility to scan disc
> for superblocks, I ended up with testdisk (it's ~amd64). To my
> understanding this works on real HW only, so I had to reconnect the
> damaged HD and let it do its job. testdisk found the superblocks, but
> according to it they were at the exact locations I had already noted, so
> no help. I also tried to let it search for partitions because I read it
> has an option to parse the directory. It worked, it let me see the list
> of lost files, but that's all, it has no option to recover. But at least
> it told me there is some good superblock somewhere.
>
> Finally I went back to the sdg.img and used "od | less" to look at what
> was present at the superblock location. What I saw was, I believe, a
> part of the superblock (an almost regular patter of numbers, increasing,
> which could be a list of blocks? I need to study ext2) but the point is
> that this pattern began well before the 'theoretical address' of the
> superblock.
>
> 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?


this should tell you what the block size is:
df /dev/sdc




-- 
dott. ing. beso

[-- Attachment #2: Type: text/html, Size: 3205 bytes --]

  reply	other threads:[~2007-11-20  9:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-19 10:05 [gentoo-amd64] not amd64 specific - disk failure Raffaele BELARDI
2007-11-19 11:52 ` Beso
2007-11-19 13:27   ` Raffaele BELARDI
2007-11-19 13:56     ` Beso
2007-11-19 17:14     ` [gentoo-amd64] " Duncan
2007-11-20  7:47       ` Raffaele BELARDI
2007-11-20  9:01         ` Beso [this message]
2007-11-20 10:06           ` Raffaele BELARDI
2007-11-20  9:41         ` Duncan
2007-11-20 10:25           ` Raffaele BELARDI
2007-11-21  9:24         ` Raffaele BELARDI
2007-11-21 10:20           ` Raffaele BELARDI
2007-11-22  9:36             ` [gentoo-amd64] Re: not amd64 specific - disk failure - SUCCESS Raffaele BELARDI
2007-11-23 10:07               ` Duncan
2007-11-21 14:45           ` [gentoo-amd64] Re: not amd64 specific - disk failure Billy Holmes
2007-11-21 15:24             ` Raffaele BELARDI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d257c3560711200101k5848c05al5927d2749aabfaca@mail.gmail.com \
    --to=givemesugarr@gmail.com \
    --cc=gentoo-amd64@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox