Boot windows from grub rescue command prompt
Previously I had installed the Ubuntu 10.04 and Windows 7.
Now i logged on to windows opened the partition editor and deleted the volume containing the ubuntu - i thought it would delete the ubuntu and it might help me install another os - and i restarted the system
The rescue prompt is here
I'd like to log on to windows How can I do that?
In grub rescue, i tried the following.
ls (hd0) (hd0,3) (hd0,2) (hd0,1) (hd1) (hda1,1)
Tried all combinations of
ls (hdax)/ , which threw out.
error: Unknown Filesystem.
I tried this:
rootnoverify (hd0,0) chainloader +1 makeactive boot
It threw out.
I installed ubuntu via usb Now when i restarted the system i got a grub that showed old windows and newly installed ubuntu I've logged in to windows Then i used the standard procedure to remove ubuntu so that grub rescue could not be triggered
You can't boot windows from a grub rescue prompt if the partition with grub modules is not 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.
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
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: lilo-doc The following NEW packages will be installed: lilo 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. bcbc@neptune:~$
You'll see a warning that looks like this - it can be ignored when you use
lilo as a windows-style bootloader.