Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Previously I had installed the Ubuntu 10.04 and Windows 7.

Now I logged on to Windows, opened thepartition editor and deleted the volume containing the Ubuntu (Thought it will delete the Ubuntu and it might help me install another OS)and I restarted the system.

Grub rescue prompt is there.

I want to logon to Windows. How can I do that?

In Grub rescue, I tried the following:

(hd0) (hd0,3) (hd0,2) (hd0,1) (hd1) (hda1,1)

Tried all combination of the ls (hdax)/, which threw me error: Unknown Filesystem.

I tried this: 1) rootnoverify (hd0,0) 2) chainloader +1 3) makeactive 4) boot. It threw me Unknown command.


I installed Ubuntu from the USB. Now when I restarted the system, I got the grub, showing old Windows and the newly installed Ubuntu. I happily logged onto windows. Then I used standard procedure to remove ubuntu, so as not to have grub rescue.

share|improve this question

2 Answers 2

You can't boot Windows from a grub rescue prompt, unless the partition with the grub modules is available. That's why you get the unknown command error. Your best solution is to reinstall the Windows bootloader. To do this boot from a Windows 7 repair CD or the Windows Installation DVD to a repair prompt and run:

bootrec /fixmbr

If you don't have a Windows repair CD or Installation DVD, it's also possible to install a Windows-like bootloader from an Ubuntu CD/USB if you have one of those:

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

Note that lilo will popup a large warning screen, but it's safe to ignore it as this refers to when it's used to boot linux.

This is what it looks like to use lilo (note the command is case-sensitive):

bcbc@neptune:~$ sudo apt-get install lilo
[sudo] password for bcbc: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 275 kB of archives.
After this operation, 807 kB of additional disk space will be used.
Get:1 http://mirror.csclub.uwaterloo.ca/ubuntu/ precise/main lilo amd64 1:23.2-2 [275 kB]
Fetched 275 kB in 1s (198 kB/s)
Preconfiguring packages ...
Selecting previously unselected package lilo.
(Reading database ... 505850 files and directories currently installed.)
Unpacking lilo (from .../lilo_1%3a23.2-2_amd64.deb) ...
Processing triggers for man-db ...
Setting up lilo (1:23.2-2) ...
bcbc@neptune:~$ sudo lilo -M /dev/sda mbr
Backup copy of /dev/sda in /boot/boot.0800
The Master Boot Record of  /dev/sda  has been updated.

You'll see a warning that looks like this - it can be ignored when you use lilo as a windows-style bootloader:

enter image description here

share|improve this answer
How do you boot from a Windows 7 install CD to a repair prompt? If I boot from the install CD, my only option is to install Windows. –  AlxVallejo Jan 17 '14 at 0:50
@AlxVallejo Try this: bleepingcomputer.com/tutorials/… –  bcbc Jan 17 '14 at 6:24
Ah, I got it. Once you hit 'Next' like you're about to install Windows, the next screen has the option to repair Windows and then enter the command prompt. –  AlxVallejo Jan 17 '14 at 15:18
Sorry, I have the same problem. I do not have the Windows installation DVD and I do not know why I can't boot from USB, even if I force the boot order from BIOS I still get the grub rescue prompt... What could you advise me to do? –  user3019105 Jul 27 '14 at 10:22
Thank you man, you saved my day!!! I was able to resolve using lilo. Thanks for such a great tool! –  user3019105 Jul 27 '14 at 11:30
  • If the linux partition holding the grub files was deleted, you should be able to boot into Windows using a linux liveCd or liveUSB, using the option Boot existing OS (or Boot from Local Drive - most liveUSBs have a similar option).

    E.g.: using Archlinux USB, select the option to boot an existing OS:

    enter image description here

    then hit Tab and point the chain-loader to the windows partition:

    enter image description here

    Description of comboot/chain.c32 usage on Syslinux page

share|improve this answer
Unknown command 'chainloader'. –  user7543 Nov 11 '14 at 22:39
@user7543 - that means you're at grub rescue prompt (the linux partition holding the grub files was probably deleted). You'll have to try my second method (via arch liveUSB) or follow bcbc instructions in the other post. –  don_crissti Nov 11 '14 at 22:44
The grub rescue prompt has a very limited and unique set of commands not are not at all intuitive to figure out. More details on working at the grub rescue prompt can be found here. –  DocSalvager Dec 26 '14 at 12:52

protected by Community Jan 29 '14 at 15:06

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.