Re: recovering hard disk partition info after boo-boo with using dd
hi ya paolo
i dont think things is as bad as it coulda been ???
( no such device as /dev/hd0
-- which means that dd just created a copy of "someimage" as a
file called /dev/hd0 .. or at least that's what it was supposed
to do
-- since there is no such device... who knows what it tries to
do... ( screwing up your mbr and booting???
- or your mbr coulda been messed up before your dd copying
-- get the rescue floppy or cdrom ... boot from it...
- run lilo or grub to restore your mbr
- run e2fsck or whatever fs check you need to verify the rest of
the fs
- than rm /dev/hd0
c ya
alvin
On Sat, 22 Jun 2002, Derrick 'dman' Hudson wrote:
> On Sat, Jun 22, 2002 at 11:01:07PM +0800, Paolo Alexis Falcone wrote:
> | I made a real booboo... I issued as root (really stupid of me, after
> | almost blasting my system away some 8 months ago) dd if=someimage
> | of=/dev/hd0 instead of /dev/fd0. So now the partition table is fouled up
> | (as cfdisk reports "bad primary partition 0; the partition ends before
> | sector 0") I fear that rebooting the box would make me unable to get its
> | contents again... is there a way to salvage the partition information
> | and clean it up?
> |
> | I only have 1 IDE disk on this machine that I fouled up though... any
> | ideas how to go with this?
>
> Grab a copy of gpart and dump it to an ext2 format floppy. Then boot
> with the resuce disk (installer). Switch to terminal 2, mount the
> floppy with gpart, run it, and record (on paper) the values it gives
> you. Manually perform a sanity check on them (IOW make sure they
> sound like what you originally partitioned the disk as). Then run
> fdisk and re-create your partition table. It worked for me when I
> screwed up my partition once before. After that, keep a hard copy of
> your partition table somewhere so you can refer back to it next time
> something happens :-).
>
--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: