I need help.
Last night, I believe I dd'ed to /dev/hda instead of /dev/hda1,
overwriting (part of?) my partition map, instead of overwriting
LILO with the NT boot loader.
Now, I figure if I could remember exactly my partitioning, I could
just recreate it (is the partition map totally at the start of the
disk, or do extended partitions have their own maps "later" in the disk?)
I know my setup was roughly
/dev/hda1 primary, 100 meg, DOS (recovered by repartitioning, and
installed Windows 95 so I could network)
/dev/hda2 extended 1.1 gig
/dev/hda5 logical ~500 meg, NT
/dev/hda6 logical ~500 meg, Linux
perhaps some swap volume (not necessary)
The key, I think, is to remeber those ~500 meg.
I have a few ideas for recovery approaches, but they are based in
ignorance. I'm hoping someone here might have file system/partition map
expertise and/or software to help me.
My main idea is I could probably start with the NT partition small,
cutting off its tail, and increase it till I get errors, but, actually,
I'm not sure it'd notice if it consumed the start of Linux, nor am I
sure it won't write to it, so that leads me to, well, the same thing,
but booting Linux instead of NT - keep changing the start of the Linux
partition till it boots. I'm hoping to od | grep /dev/hda or /dev/hda6
to help me locate the start. Like "LILO" should be near the start.
In fact, I have a copy of the first 512 bytes of /dev/hda6 in
c:\bootsect.lin, so I can scan for that. Is that at the exact start
of the partition, or would there be stuff before it?
Might something like this work:
I can't compile C from Linux boot floppies, so get GNU-WIN32.
Get rawwrite to learn how to "raw read".
Read in file bootsect.lin.
Keep reading 512 byte blocks from "/dev/hda" (hopefully can get to it
from Windows 95/DOS) and comparing to bootsect.lin (memcmp).
When it matches, print the offset, convert to MB, and that's the
start of my Linux partition???
Any help is greatly appreciated; thanks,
--