2

Actually, I have done something terribly wrong. I did not want Ubuntu 13.04 on my PC anymore. I was sick of dual-booting every time the PC starts, and I wanted to return to Windows as well. (My version is Windows XP MCE SP2). The mistake I did is that I simply used EASUS Partition Manager to delete the Ubuntu partitions. But what went wrong here is that, even when I did it, the GRUB keeps trying to load. It says that GRUB could not be found and finally ends up running GRUB Rescue.

I cannot "Repair" my PC using the Recovery Discs (containing Windows XP MCE), it only gives me an option to press "F", which will format the HDD to re-install the OS.

Although, the best part is that I can still log in to Windows. Because, when I boot from the CD's, it does not give me a "Repair" option, but only "Format" and "Quit". By using "Quit", it takes me straight to Windows.

But I do not want to keep doing this same thing every time I start my PC. Neither do I want to Format my Hard Disk. I have tried a few applications, like EasyBCD which do nothing. So I want a good solution for it.

Is their any way to install MBR through Windows or maybe Ubuntu terminal? Even if i can't access Ubuntu again? And what after installing Ubuntu again. Any safe method to uninstall it?

Xavier
  • 127
  • 1
  • 1
  • 11
  • Curious why you would edit and post this since you are actually http://askubuntu.com/a/330244/7035 the other question which has the same problem stated here. In any case this will end up either being a duplicate of a How to repair boot in Win7/Win8 or how to remove Ubuntu and keep Windows (For the repairing MBR through Windows part). Please provide any information that actually makes this question not a duplicate. – Luis Alvarado Aug 10 '13 at 11:05
  • First, the MBR of both Windows 7/8 & XP are much different. Second, I have answered that question myself, but I can't mark this as answered, because it still requires a few more hours. Last, I cannot use any answers on that page apart from my own, as the EasyBCD does not work with WinXP and neither does Recovery Disc.

    And Windows XP is a lot different than Windows 7/8. As soon as I can mark the question [solved], we have to make do with this.

    – Xavier Aug 10 '13 at 12:31

3 Answers3

2

Here are the two solutions that have have worked for me.

Boot Linux from a Live cd or usb and make sure you’ve a working Internet connection and type the following on the terminal.

1. Solution

sudo apt-get install syslinux

If the package got installed, use the following command to write the MBR:

sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda

2. Solution

sudo apt-get install mbr

If the package got installed use following to write the MBR.

sudo install-mbr -i n -p D -t 0 /dev/sda

Common for both

Replace sda if you want to install the MBR to a different drive. Do not put sda1,sda2, or sda3. Just put it as sda for the hard disk. Finally reboot and your Windows should boot.

Stormvirux
  • 4,466
  • Sorry, but I have already used some other code and my MBR is back. I did not need to use such heavy codes, what I did was much easier and user friendly (rather noob-friendly). I booted into Ubuntu using Live USB, and then installed an Application called "Boot Repair" on it. Then I let it run, and then I restarted. No more issue of GRUB. Although, thanks for this code. I will write it down so that it can help in future installations (un-installations) of Ubuntu or Linux Distros. in case my method does not work. – Xavier Aug 08 '13 at 17:13
  • 2
    Thanks for the info. I tried this out too, and it worked fine as well. Added, this method is somewhat more exact and precise, as in this we are installing MBR only. Whereas, we don't know what Boot-Repair is doing, whether it is MBR, or whatever.

    Thanks!

    – Xavier Aug 10 '13 at 10:34
2

I have fixed the problem now. The solution turned out easier than I thought. It was rather a cakewalk, and I did not even need to use Windows Recovery Disc (which were not working in my case). Here is what you need to do:

  1. Burn an Ubuntu ISO image onto a USB Drive or a DVD to make a Live USB/DVD.
  2. Boot into Live mode ("Try Ubuntu" option).
  3. After it boots up, press "Ctrl + Alt + T" to bring up the Terminal.
  4. Put these codes ONE AFTER ANOTHER.

sudo add-apt-repository ppa:yannubuntu/boot-repair

sudo apt-get update

sudo apt-get install boot-repair

  1. After doing this, open the "Dash" (Search menu). It can be accessed by "Alt + F2"

    1. Search for "Boot Repair" (Although just entering Boot will give you the app).

    2. Open it and select the only option (Recommended one).

    3. Reboot. You will no longer get the GRUB Error after this, and will boot straight into Windows.

You can also do it with Ubuntu installed. In case you want to Uninstall ubuntu, first follow the above instructions, then after you are in Windows, install EASUS Partition Manager and delete the Ubuntu partitions (the ones that are NOT ntfs formatted)

Xavier
  • 127
  • 1
  • 1
  • 11
0

Did you see this? I'm assuming that since you're using recovery disks, you haven't tried reparing bootmanager yet.

xyz
  • 1,786
  • 1
  • 12
  • 22
  • Well, no. Actually, I can't. Since I can't access "Repair" function, I can't use Command Prompt through that part either.. – Xavier Aug 08 '13 at 16:36