Windows – repair Win XP MBR using WIn 7 CD

mbrmulti-bootwindows

I have a dual boot machine (ubuntu 12.04 and xp sp3) and now I want to get rid of ubuntu.
After searching over the internet I found that I should first remove the grub (by fixing the MBR) so that the system directly boots into windows and then the ubuntu partitions can be deleted/formatted without trouble.

The problem is that I have a Windows 7 installation CD. I was wondering if I could use it for this purpose? Is is mandatory to use a win xp CD?

Best Answer

Yes.

Boot into the Windows 7 installation CD, and when you reach the screen with a "Start Install" button, press Shift + F10 and a command prompt should show up.

Now you should identify the drive that boots Windows (see below). Let's say it's X:, for example. You would execute the following command(s):

bootsect.exe /nt52 X:
bootsect.exe /nt52 X: /mbr

Now, the MBR should be restored to a Windows XP-compatible (NTLDR) format.


To identify the drive that boots Windows, you would type the following command first:

notepad.exe

After that, a Notepad window should appear. Now click "File"->"Open" to show an Open File dialog. Go to "Computer" and you should be able to identify the drive letter of the boot drive according to the size and/or drive label.

If you still can't identify the drive, you can first select to show All Files, then look for NTLDR and boot.ini on the root of the drives.

I myself had done this a few times before.


DISCLAIMER: The content contained in this answer is for reference only. I am NOT responsible if this answer causes any hard drive failures, data loss, loss of property, injuries, or even deaths. Remember, all actions involving hard drives are extremely dangerous. For every single (nano)second the drive is powered, it is one step closer to its own death and data might be lost from it. So if you are absolutely worried, do NOT use a hard drive at all.

Related Question