How can I restore my "Unknown" partition type, back to NTFS?

Lately I've been having trouble restoring my PC after uninstalling GRUB, and an Ubuntu install from it. Usually I don't encounter any problems when doing this, but this time is different. My Windows XP (NTFS) partition is listed as "Other" in Partition Magic, and "Unknown" in GParted rather than "NTFS".

How can I gain access to Windows partition once again? I am more than willing to provide any information, and run any tests necessary to produce said information in order to find out what's going on here. My apologies if this is the wrong place to ask such a question. I have heard nothing but good about Superuser, and decided to give it a shot. Thanks!


enter image description here

enter image description here


sfdisk should be able to "fix" this problem easily; something like this should "work":

sfdisk /dev/sda -i -c 1 07

However, it's possible that in addition to the partition type being changed, the partition positions (start, end) were also corrupted. TestDisk should detect these issues and write a new, somewhat proper partition table.

The thing is that considering the partition table was corrupted, it's possible, no, likely that the data is too.


From what I understand, it seems as if your MBR (master boot record) was either overwritten or corrupted. Have you tried restoring it from within Linux? You can do so with the ms-sys tool by running this command:

ms-sys -m /dev/sda

The -m switch is for Windows 2000/XP/2003 so make sure you use that switch if you have Windows XP.