> Reaching in the dark, here, but I imagine it would have failed after
> overwriting the section where /dev/zero was kept?  If so, then you may
> be able to get to everything after there.
> Now.  Just so I know, in case I do it again, is there a relatively easy
> way to recover a partition table?
> 
        I don't think it would be that clear cut when it would stop.  There
are many other processes running, and dd is probably sleeping a lot while it
waits for the disk to catch up trashing itself.  

        "easy way to recover" and "partition table" is unfortunately, in my
experience, a oxymoron.  though you could copy the first 512 bytes of your
disk to a floppy every now and then to keep a backup.   you'd only need to
update it when you changed your partitions, which would not be very often.

        Now I'm just thinking, but if you have stopped this before it got to
your last partition, maybe this type of procedure *might* work.  You told me
it was all in a FAT16 partition at the end of the disk where all the
relevant stuff is kept.  your partition table is gone for sure, but chances
are that things near the end of the disk are ok.

        1) put the drive into another working computer.
        2) use dd again to copy the entire drive to a file; e.g. dd
if=/dev/hda2 of=/tmp/drive.file bs=1k
        3) use a hex dump program such as xxd to look through this file you
just copied.  
        4) search for the *string* FAT16.  hopefully, this will be the
filesystem id type of your boot block on that partition
        5) note how far in this is.  this starts of offset 0x36, so go back
54 bytes.  this should be the start of your fat partition.  note this (i.e.
where FAT16 is - 54 bytes)
        6) now use dd again or write a small program to cut out the start of
that file (sorry for being vague but i'd have to think about this part more)
up to the start of your previously noted fat partition.  hopefully, that
will now be a completely valid fat16 partition.  whatever is after it
shouldn't matter.
        7) attempt to loopback mount this file as a fat16 file system.  

        good luck
        -i
**********************************************************************
CAUTION: This message may contain confidential information intended only for the use 
of the addressee named above. If you are not the intended recipient of this message, 
any use or disclosure of this message is prohibited.  If you received this message in 
error please notify Mail Administrators immediately.  You must obtain all necessary 
intellectual property clearances before doing anything other than displaying this 
message on your monitor.  There is no intellectual property licence.  Any views 
expressed in this message are those of the individual sender and may not necessarily 
reflect the views of Woolworths Ltd.
**********************************************************************
-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to