boot Windows from GRUB rescue

24

15

This is my situation:

  • installed Ubuntu without a CD (using unetbootin)
  • dual boot installation (Windows XP+Ubuntu)
  • didn't like the installation and decided to boot into Windows and delete the Linux partitions
  • forgot to fix the mbr from within Windows

Now, when I boot, I am stuck in the GRUB rescue limbo.

Simple question: How can I boot into Windows from GRUB rescue?

I cannot boot from CD, therefore the usual solutions (recovery CD etc) do not work. An older question mentions the possibility to boot Windows but doesn't specify details: Ubuntu grub rescue prompt

Any hints?

pruefsumme

Posted 2010-10-11T13:40:49.757

Reputation: 401

Answers

6

As Gilles already pointed out, grub rescue only has a few commands which allow you to load modules (e.g. from a grub rescue disk).

In my case - booting from another source wasn't possible - the only option was to remove the hdd from the computer and use a cheap external hd case to connect the disk to another computer via USB. On that computer, I used MbrFix to fix the mbr.

pruefsumme

Posted 2010-10-11T13:40:49.757

Reputation: 401

22

When GRUB is gone, so is the ability to boot into Windows. You would now need to boot from the Windows CD to restore the Master Boot Record (MBR). You can also use other boot CDs such as the Ultimate Boot CD for Windows, Bart PE or Hiren's Boot CD in case you don't have Windows installation media handy. Here are the steps:

  • Boot from the Windows CD and choose "Repair". Alternatively, boot from one of the other aforementioned boot CDs and run a command prompt.

  • For Windows 8 computers:

    1. Insert disc
    2. set boot order to disc at first priority
    3. reboot, wait for installer to load
    4. select language and keyboard type and click continue
    5. DO NOT CLICK INSTALL, instead click repair my computer in the bottom left corner
    6. click troubleshoot
    7. click advanced
    8. click command prompt and enter the commands below.
    

Add more tutorials for Operating Systems please.

  • Run the the following two commands in a command prompt:

    bootrec /fixmbr
    bootrec /fixboot
    

Ricky Ricardo

Posted 2010-10-11T13:40:49.757

Reputation: 221

You may also boot from a LiveCD of Ubuntu and then move the bootloader to Windows:

sudo apt-get install lilo ; sudo lilo -M /dev/sda mbr

– jevon – 2015-02-08T11:58:16.797

+1 I found this to work too, on Windows 10 32 bit Pro installation media DVD that I created using Media Creation Tool ( http://windows.microsoft.com/en-gb/windows-10/windows-10-recovery-options ). My problem was that had deleted my Linux partition by mistake when wanting to adjust the size of the partitions, in the Windows Partition Manager. This answer here fixed my issue - I can now boot into Windows. I will re-run my Linux install DVD as I wanted dual boot Windows 10 and XUbuntu. Thanks very much.

– therobyouknow – 2016-02-06T16:57:19.667

1

You can use grub rescue to start Windows again.

The command list would be something similar to

rootnoverify (hd0,0)
makeactive
chainloader +1            
boot

NB: this requires the availability of modules that implement all these commands!

From reading over the comments on grub rescue this seems like it'll work then you can get into windows and reinstall the windows bootloader into the MBR. This only works however if your windows partition is the first partition on the drive AND it's on the first drive that the computer sees. If you have several drives or SATA drives instead of PATA drives then you may need to use a different command for rootnoverify (try sd0 instead of hd0)

Update me on if it works.

Kravlin

Posted 2010-10-11T13:40:49.757

Reputation: 1 189

4The grub rescue prompt does not provide the chainloader command (at least not without manually loading the module, and I don't know how to do that). – Gilles 'SO- stop being evil' – 2010-10-11T20:22:13.073

well, if that's the case then there's always the choice to use a flash drive (assuming the computer will boot off it) and to make the flash drive bootable with unetbootin and a copy of super grub disk (or something similar) OR you can put a copy of part of grub onto the flash drive and load it by saying "kernel PATH" – Kravlin – 2010-10-11T20:46:34.973

googling around i found this. http://www.linuxquestions.org/questions/linux-general-1/grub-rescue-815634/

That might provide some help

– Kravlin – 2010-10-11T20:47:11.230

1Unknown command 'rootnoverify(hd0,0)'. So next I need to find which grub-rescue command loads the module for rootnoverify? – Marcos – 2013-09-03T10:02:44.093

1

Another tool to add to what Ricky and preufsumme have to say is boot-repair-disk.

PCoder

Posted 2010-10-11T13:40:49.757

Reputation: 161

-1

I have exactly the same issue, i deleted the ubuntu partition so i could install the new one, but crapped it up and stuck in grub rescue also

I am currently searching for the fix also

Here is how far i have got

- http://www.makeuseof.com/tag/how-to-safely-uninstall-ubuntu-in-windows-dual-boot-environment/

It seems we need to use our windows 7 disks, boot in and delete something called an MBR

Tom

Posted 2010-10-11T13:40:49.757

Reputation: 9

Thanks for your answer. My problem is that I can't boot into any CD. If I somehow managed to boot into Windows, I could use the MbrFix tool (see: http://www.sysint.no/Nedlasting/MbrFix.htm)

– pruefsumme – 2010-10-11T14:42:48.997

Ok it sounds to me like you need to go into your bios and make it look at the CD before booting – Tom – 2010-10-11T14:49:07.517

Unfortunately, this is not possible since I have no cd drive. – pruefsumme – 2010-10-11T14:54:33.713

-1

Boot from the Windows XP/Vista/7 installation CD, and select the Repair (R) option. Select the correct partition, and then enter the Administrator account password. At the command prompt run the following commands:

fixmbr (C:\WINDOWS\fixmbr.exe)

fixboot (C:\WINDOWS\fixboot.exe)

Type 'exit', and the computer will reboot.

Phuqer

Posted 2010-10-11T13:40:49.757

Reputation: 7

The original poster states that they can't boot from CD, so a little unsure how this answers them? – Rowland Shaw – 2012-11-07T12:51:49.940

you have to set the boot sequence to check the CD/DVD Drive before the HDD – Malachi – 2012-12-11T18:52:52.457

-1

I had a similar issue, I had to go into the bios to set the boot up sequence to the CD/DVD Drive first so that it would check for the boot stuff there. I am using a solution from somewhere else that told me to first re-install Ubuntu so that the grub loader is installed then you can get back into windows and remove the partition the right way. hope this helps someone out there

Malachi

Posted 2010-10-11T13:40:49.757

Reputation: 1 069