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 :-).

-D

-- 

The crucible for silver and the furnace for gold,
but the Lord tests the heart.
        Proverbs 17:3
 
http://dman.ddts.net/~dman/

Attachment: pgpOjRt4RCQkQ.pgp
Description: PGP signature

Reply via email to