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

7

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

Alan

Posted 2011-08-27T19:25:17.320

Reputation: 181

1You can try using TestDisk to recover the partition. – Joe Internet – 2011-08-28T02:01:09.930

People are going to give you better quality answers if you tell them exactly what's on your disc, rather than a reinterpretation of it. Give them the output of (say) the detailed partition listing from gdisk.

– JdeBP – 2011-08-28T02:18:21.633

@Joe Internet: I just tried TestDisk. It found my "STORAGE" partition, along with an old Linux partition of mine, but it wasn't able to find, or repair the NTFS partition. – Alan – 2011-08-28T12:48:04.167

JdeBP: I just looked at the link you provided. It looks a little command-line-ish and quite advanced. There is a walk-through provided but I don't have access to a printer. – Alan – 2011-08-28T12:53:03.677

I updated my original post with another screenshot. – Alan – 2011-08-28T12:57:55.867

@Joe Internet. I didn't realize that TestDisk had an "Advanced Utilities" section. I opened that up and found something related to analyzing the partition table (or maybe it was boot table, something like that) and it told me that it was corrupt. I clicked repair and vola! Problem solved. Thank you!!! If you want to create an answer I will accept it. – Alan – 2011-08-28T15:35:02.113

@Alan - Perhaps you can post an answer describing what you did, and select it. It will be more useful to others in the future. – Joe Internet – 2011-08-29T00:41:24.480

Answers

3

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.

Hello71

Posted 2011-08-27T19:25:17.320

Reputation: 7 636

Thanks for advising to use TestDisk. I successfully recovered a broken partition table in a few minutes. – jnns – 2016-12-21T14:45:49.623

Thanks for the reply! Running that command produces the following output: No such partition. – Alan – 2011-08-28T15:11:13.383

2

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.

Aaron

Posted 2011-08-27T19:25:17.320

Reputation: 183

Thanks for your reply! I tried running the command, but the output tells me that the command was not found. – Alan – 2011-08-27T21:33:48.033

You're welcome. You need to install it first; it doesn't come with the distro. sudo apt-get install ms-sys should do it :) – Aaron – 2011-08-27T22:43:50.810

Very weird. It says "E: Unable to locate package ms-sys". – Alan – 2011-08-27T22:54:59.537

I'm sorry, I forgot that you'll need to enable the Universe repository. After doing that, make sure to run sudo apt-get update first thing. Hope that helps :) – Aaron – 2011-08-27T23:01:45.100

Thanks, I was finally able to install it after doing just that. It doesn't seem to have resolved my main issue though. This one is a tough little bug. – Alan – 2011-08-27T23:47:54.333

Any halfway decent "MBR rewrite" tool doesn't touch the partition table entries within that sector, and those are the things apparently in need of repair here. – JdeBP – 2011-08-28T02:09:47.777

1

To repair your BOOTMBR (building off last answer because I can't comment yet):

  1. Put the Windows Vista or Windows 7 installation disc in the disc drive, and then start the computer.
  2. Press a key when you are prompted.
  3. Select a language, a time, a currency, a keyboard or an input method, and then click Next.
  4. Click Repair your computer.
  5. Click the operating system that you want to repair, and then click Next.
  6. In the System Recovery Options dialog box, click Command Prompt.
  7. Type "Bootrec.exe /FixMbr", and then press ENTER.

I've done this several times after having problems with Grub and linux installation.

A. Hayes

Posted 2011-08-27T19:25:17.320

Reputation: 93

works with any Windows installation CD XP and up. – A. Hayes – 2011-08-27T21:55:05.563

Hmm. I don't seem to have the repair option. If it's of any help though, I was able to repair my MBR by using Partition Magic, sadly it didn't resolve the issue though. – Alan – 2011-08-27T22:02:29.123

In addition to what was said above, if you have a Windows XP CD and can get to the recovery console, you may want to try executing these commands (I'm separating them with a pipe): FIXBOOT C: | FIXMBR | BOOTCFG /rebuild – Aaron – 2011-08-27T22:55:12.343

That's what I originally wanted to do. I couldn't figure out why my Windows XP CD didn't have the Recovery Console though. It's OEM :( – Alan – 2011-08-27T23:48:43.617

1

You can also recover your disk with the "chkdsk" command.

  1. Boot computer with a Windows XP disc.

  2. Go to recovery console

  3. Type the command like

    C:\> chkdsk /r 
    
  4. Wait until process is complete. Restart and see.

prem

Posted 2011-08-27T19:25:17.320

Reputation: 11