From: Raffaele BELARDI <raffaele.belardi@st.com>
To: gentoo-amd64@lists.gentoo.org
Subject: Re: [gentoo-amd64] Re: not amd64 specific - disk failure
Date: Wed, 21 Nov 2007 10:24:34 +0100 [thread overview]
Message-ID: <4743F952.5000303@st.com> (raw)
In-Reply-To: <47429114.5030102@st.com>
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
next prev parent reply other threads:[~2007-11-21 9:24 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
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 [this message]
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=4743F952.5000303@st.com \
--to=raffaele.belardi@st.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