From: Stephen Samuel <samuel@bcgreen.com>
To: linux-newbie <linux-newbie@vger.kernel.org>
Cc: kaushal <kaushal@rocsys.com>
Subject: Re: mbr dd'd
Date: Mon, 13 Dec 2004 13:19:07 -0800 [thread overview]
Message-ID: <41BE074B.1000904@bcgreen.com> (raw)
In-Reply-To: <1102944601.2248.31.camel@Kaushal>
kaushal wrote:
> hi,
> My friends' system is in a critical situation.
> Hdd. is /dev/hdc.
> CD-WR is /dev/hdd.
> created a bootable linux iso img.
> MISTAKE part:
> dd if=iso.img of=/dev/hdc.Instead of hdd.
The problem here is that you stomped on the hard disk partition
table (which is in the first few sectors of the disk)
zzog you remember exactly where the various partitions started/ended,
then you can repartition the system (just set the partition locations,
don'tformat them) and then continue on. If you're really lucky, your
first partition was a SWAP partition, otherwise you WILL have data
loss.
You might also want to check out things like knoppix (www.knoppix.org
and the systemrescuecd http://www.sysresccd.org ) I'm pretty sure that
at least one of those two can have a tool which can look for signs
of partition boundaries to help you figure out where the partitions used
to be.
Of your first psrtition was an ext[23] filesystem, the ext filesystem
has some capability of recovery under such conditions....
Once you hae recreated the partition table, go something
like (depending on the partition you're trying to recover:)
[root@me html]# mkfs -n -v /dev/hdc2
You will get output like:
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
131616 inodes, 263056 blocks
13152 blocks (5.00%) reserved for the super user
First data block=0
9 block groups
32768 blocks per group, 32768 fragments per group
14624 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
That last set of numbers is the important ones: they are backup
copies of the superblock (critical info about the filesystem
setup). You can recover (parts of) a filesystem that has been
trashed by a waywarddd via (in this case)
fsck -n -f -B 229376 /dev/hdc2
(
-n causes a dry run (does not actualy write to the disk)).If the results
look reasonable (you WILL get at least some errors), then you can remove
the -n to do a real repair attempt.
)
--
Stephen Samuel +1(604)876-0426 samuel@bcgreen.com
http://www.bcgreen.com/~samuel/
Powerful committed communication. Transformation touching
the jewel within each person and bringing it to light.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
parent reply other threads:[~2004-12-13 21:19 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1102944601.2248.31.camel@Kaushal>]
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=41BE074B.1000904@bcgreen.com \
--to=samuel@bcgreen.com \
--cc=kaushal@rocsys.com \
--cc=linux-newbie@vger.kernel.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