Help with a little dd damage!
debian at herakles.homelinux.org
Thu Feb 28 01:07:01 UTC 2008
Robert P. J. Day wrote:
> On Wed, 27 Feb 2008, Mikkel L. Ellertson wrote:
>> The first thing I would do is run "fdisk -l 2ndstage.rescue" and
>> make sure you didn't overwrite the partition table of the image. If
>> you did, then you are probably out of luck. If the image is good,
>> you can restore the MBR by using "dd if=2ndstage.rescue of=sda
>> bs=512 count=1" You will still have corrupted data at the start of
>> the drive.
>> If your have a separate /boot partition at the start of the drive,
>> and you have not updated your kernel, then you can restore the
>> entire 2ndstage.rescue file.
> even if you trashed the *physical* partition table on the drive, can't
> you recover that info from the running kernel somehow. if you check
> /proc/partitions, it looks like you can at least get the sizes of the
> partitions. can you not get the rest of that information somewhere
> under /proc? i'm just guessing here.
It looks like he has a good backup of the MBR and so can recover the
root partition table. From there he doesn't need anything until the
first filesystem, and if that's /boot alone, then that can be fixed by
reinstalling grub and kernel(s).
Only partitions containing data that got clobbered are irretrievable
without further backup. the OP can see that by looking at the partition
table in the file, as someone else described.
More information about the fedora-list