41

I have Windows 10 HOME installed on my system. After I installed Windows 10 HOME, I installed Ubuntu 14.04 LTS on a separate partition so that I could dual boot.

I removed Ubuntu 14.04 LTS by deleting the partition it was installed on. Now I am unable to start my system. At boot, my system stops at the Grub command line.

I want to boot to my Windows 10 installation which I haven't removed from my system.

This is displayed at startup:

GNU GRUB version 2.02 beta2-9ubuntu1.3 <br> 
minimal BASH-like editing is supported.for the first word, TAB lists
possible commands completions.anywhere else TAB lists the possible device or file completion.
grub>

How can I boot my Windows partition from this grub command?

10 Answers 10

45

Just enter the command exit. It should take you to another menu that makes you select the Windows bootloader.

Worked on Lenovo Y50

7
  • 1
    Worked well on HP i5 7th Gen with Win10 after formatting the Ubuntu partition.
    – Elshan
    Jan 18 '18 at 18:16
  • Glad it helped! @Elshan Jan 24 '18 at 22:02
  • Worked in Lenovo ThinkPad, never expected it will work
    – Renjith
    Apr 29 '18 at 3:53
  • Worked in Lenovo IdeaPad
    – nashvent
    Jul 29 '20 at 19:40
  • Works with Dell Inspiron 7559
    – otaku
    Aug 22 '20 at 5:00
36

The following worked for me with a GPT partitioned disk.

insmod part_gpt
insmod chain
set root=(hd0,gpt1)
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot

Note that you can enter a command line from the grub boot menu and just type commands as above to test out different combinations.

You need to enter the id of the EFI boot partition (not the windows partition) for the set root= command.

In the command line grub mode ls will list the hard drive partitions, help lists available commands.

Once you have set the root correctly you can ls / to view files and directories to find the correct path to the windows boot manager if it is not in the default location.

3
  • 3
    Make sure to use the ls command for checking the name of your partition, because it might not be (hd0,gpt1). With using the proper partition name I was able to fix Windows booting, thanks to your answer.
    – gyurix
    May 22 '20 at 0:34
  • This works but I have to run these commands every time I boot the system. It there any way to make it permanent.
    – rupindr
    Jun 10 '20 at 6:15
  • @rupindr You need to edit /etc/grub.d/##_***** where ##_***** is the file containing your configuration, after that remember to do a update-grub Oct 14 '20 at 15:08
9

To boot to Windows, if Windows is installed on first drive/partition, enter in grub command line, then boot:

insmod chain
insmod ntfs
set root=(hd0,1)
chainloader +1
boot

see https://www.gnu.org/software/grub/manual/html_node/Chain_002dloading.html#Chain_002dloading for more details.

1
  • 1
    This applies only if the Windows system disk is using MBR partitioning. For the GPT equivalent, see this answer by @79E09796
    – telcoM
    Dec 8 '18 at 13:36
8

Guesing you have an UEFI device, the windows bootloader is still installed. You can select it back in UEFI setup menu under boot, where you will prbably have two options (GRUB and the old default as the second), delete the first one or switch the order.

2
  • Thank you. This was the easiest way and saved me a headache. Mar 12 '17 at 22:07
  • I had to restart at least one time until this worked. The first time I tried exit, it told me that some file wasn't found. But on the second attempt, it worked
    – Daniel B.
    Aug 31 '20 at 21:04
6

This answer is for those with UEFI who have deleted the Ubuntu partitions before removing grub

You will be doing this from Windows 10. No bootable media required.

Where bootrec /fixmbr, bootsect /nt60 and the Ubuntu live with the boot-repair suggestions have failed, this has worked for me:

(This answer borrowed verbatim from here)

  1. Run a cmd.exe process with administrator privileges
  2. Run diskpart
  3. Type: list disk then sel disk X where X is the drive your boot files reside on
  4. Type list vol to see all partitions (volumes) on the disk
  5. Select the EFI volume by typing: sel vol Y where Y is the SYSTEM volume (this is almost always the EFI partition)
  6. For convenience, assign a drive letter by typing: assign letter=Z: where Z is a free (unused) drive letter
  7. Type exit to leave disk part
  8. While still in the cmd prompt, type: Z: and hit enter, where Z was the drive letter you just created.
  9. Type dir to list directories on this mounted EFI partition
  10. If you are in the right place, you should see a directory called EFI
  11. Type cd EFI and then dir to list the child directories inside EFI
  12. Type rmdir /S ubuntu to delete the ubuntu boot directory

Assuming you only ever had two operating systems (Win 10 & Ubuntu) you should now be able to boot directly to Windows without hitting the black grub screen.

Copied from https://askubuntu.com/questions/429610/uninstall-grub-and-use-windows-bootloader

1

Just exit the grub by typing exit and go to bios setup and restore to default settings and restart the computer.

0
0

I recently bumped into the same problem. (i.e. originally have a a separate partition with Ubuntu installed, dual bootable from a grub menu. I then deleted that Ubuntu partition from Windows disk management, and when I rebooted, just the grub command menu).

What I did to get back to my Windows 10:

  1. Do a Ctrl + Alt + Delete to reboot. While rebooting, hold down the shift button.
  2. My PC then give me to option to press F12 for boot option. I clicked F12, and it gives me back a menu with Windows boot manager on it.
  3. I selected the Windows boot manager and click enter. I'm now back to Windows 10.
0

This worked for me, now I have to find a way to permanently fix the mbr.

I recently bumped into the same problem. (i.e. originally have a a separate partition with Ubuntu installed, dual bootable from a grub menu. I then deleted that Ubuntu partition from Windows disk management, and when I rebooted, just the grub command menu).

What I did to get back to my Windows 10:

Do a Ctrl+Alt+Delete to reboot. While rebooting, hold down the shift button. My PC then give me to option to press F12 for boot option. I clicked F12, and it gives me back a menu with Windows boot manager on it. I selected the Windows boot manager and click enter. I'm now back to Windows 10.

-1

Try this, its worked in my case:

grub> exit

You will get a list of operating systems installed. Select one.

2
-2

Try this:

rootnoverify (hd0,0)
chainloader +1
makeactive
boot

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