My partition table just got screwed up!!!!!

This is how it all happened -
I had recently upgraded my pc. So i formatted my windows drive and installed the stuff again.
I previously had linux also installed (the winxp installation screwed the mbr so i couldnt boot into linux, but thats besides the point).
Anyway today i open up 'disk management' and it shows 1.67gb of free space in my extended partition. So i tell it to create a logical drive there. But as as soon as the wizard finishes and i click on the 'finish' button, the whole system RESTARTS!!!!
Now while booting as soon as the windows logo shows , it restarts again.

I insert a linux installation cd and it tells me that my partitions are screwed and will have to be deleted to install linux on my hdd.

Even if i try to connect my hd to my friend's comp (as secondary master) , win xp shows the blue screen soon after displaying the logo and it wont boot until i take out my drive.

So i read this forum and i found the thread 'table of partitions' lost and i see people suggesting to use 'testdisk' program.
So i dl it on friend's pc and boot using a knoppix cd (which boots os from cd itself).
So i manage to run 'testdisk' on my hd and it shows some error info about 'ending of partition not set correctly' or something ( i dont really remember).

Thing is, it shows my partitions and the files on them. But there is no indicaion in the program as to how to copy the files to my friend's hd.
Can someone pls help me a little and at least tell me how to copy the files from my hd to my friend's hd??
Posted on 2005-02-05 08:46:30 by clippy
did you try mounting the partition? if that succeeds then you can just copy every file and directory (are you talking fat or ntfs here btw?)

freeware
http://www.pcinspector.de/file_recovery/UK/welcome.htm

http://www.salingfamily.net/trav/linux/lost_partition.html may be of help to you :|
Posted on 2005-02-05 15:10:11 by Hiroshimator
clippy,

I recently used TestDisk to recover from ReactOs corrupting my PT.
TestDisk doesnt let you copy the file from the partition. You have to restore the partition entries it found to get the data off.

Also you may want to look at the ultimate recovery cd.
http://www.ubcd4win.com/howto.htm
Has alot of tools to recover and manipulate harddisk.
packetvb
Posted on 2005-02-05 23:00:43 by packetvb
Well actually i did manage to mount some of my partitions and restored all my data. Though one partition could not be mounted and i lost the stuff on it. But well that wasnt too important.

Actually the drive that couldn't be recovered was placed 'after' the so called 'free space' which i tried to convert to a logical drive. The rest of the partitions were placed before that so i could recover stuff from them.

Btw, i would like to know where i can get the info about this partition table thingy in detail. I would like to gain enough knowledge so that the next time stuff like this happens , i can build my partition table back manually.

Also how do i backup my partition table and mbr on winxp?
Posted on 2005-02-06 11:48:56 by clippy
There is a good amount of information here.
http://therdcom.com/asm/mbr/PartTables.htm
Posted on 2005-02-06 18:03:18 by anon
the dos api had system calls to read and write raw sectors
I have used this in an assembly program to to backup and restor
the parttion table it was a simple mater to copy the table to a file
and write it back the whole thing can be done in 260 bytes
( the only time I have ever made money from programming I sould it to computer
shops in the hay day of boot sector viruses that would erase the disk by trashing
the parttion table )
the source code for cfdisk has the info in it for re creating this program
the ralf brown int list also has this info this is where I got the info to do this from
BUT I don't know wether windows has the raw read and write
sys calls in it still so you may have to use a dos boot disk
Posted on 2005-02-09 12:52:53 by rob.rice
NT can read/write disks raw through the use of CreateFile - for win9x it's somewhat more complicated (VxDcall or 16bit thunk dll).
Posted on 2005-02-09 13:14:58 by f0dder
dosen't win 9x use the dos api?
Posted on 2005-02-09 13:21:01 by rob.rice
afaik, you can't use the DOS API directly from a win32 program, even on 9x - you need to call a VxD. DOS programs can, if you use the "lock" command, do direct disk I/O though.
Posted on 2005-02-09 13:24:48 by f0dder
SO we are back to useing a dos boot disk
if the partion table is trashed you wouldent want or be able to boot windows any way

BWT linux kernel has the raw read and write sys calls but you have to be root to use them
as with windows you would want to use a boot disk
Posted on 2005-02-09 13:36:08 by rob.rice