1

I dual booted ubuntu on my windows operating pc, then i deleted the ubuntu partition and restarted my pc. GRUB came up and it says ”minimal BASH-like line editing is supported. For the first word , TAB lists possible command completions.Anywhere else TAB lists possible device or file completions.” So first how do i get into my windows OS and second how do i get rid of this GRUB bootloader?

2 Answers2

1

Ok, I was in the same situation as you when I wanted to go back to Windows 10 after a dual-boot with Ubuntu. The solution is really simple.

First, go into the BIOS (you can do this by pressing a key repeatedly when you begin booting your machine, the key is usually F2, but can vary according to manufacturer), and then using the arrow keys, navigate to the Boot menu. There you'll see that 'ubuntu' is at the top. Find the Windows Boot Manager and put that at the top (you can move boot entries like 'ubuntu' up or down using the instructions on the right side). Go to the Exit menu, save your settings and leave. You'll find that the GRUB bootloader does not appear anymore and that it now boots directly to Windows.

Edit: The above solution works for people who repaired the MBR before restarting Windows but in case you forgot to, this is a possible solution.

Step 1, Create Windows 10 Bootable USB (you can skip this if you already have one):

A Windows 10 Bootable USB is Windows on a external USB (or hard) drive and you can use it to install Windows 10 or repair your PC.

You can use this video to learn how to create one: https://www.youtube.com/watch?v=abpAPQH1RsI. Credits go to EasyTechs.

Step 2, Boot into Windows 10 and fix the bootloader:

By now, you have the Windows 10 bootable USB. Make sure your computer is off before you do any of this. Turn on your computer and go directly into the boot menu where you can choose which device you want to boot from (you can usually get to this boot menu by pressing F12 repeatedly, although the key may differ by manufacturer). Choose the drive you put Windows 10 on.

Now it will take you to this screen (you may have to specify what language you want the installer in and some other preferences): Windows installation screen

Click on Repair your computer and it will take you to a menu with some options. Click on Troubleshoot. Then go to Advanced Options. Go to Command Prompt.

You can use this link for the cmd commands you have to enter (this is also the correct way to reverse a dual-boot, but you may just want to follow the commands below that are also in the video): https://www.youtube.com/watch?v=5Rq4zovHiWk&t=441s. Credits go to EasyTechs.

Here are all the commands you need to execute in the command prompt (you execute these one by one):

bootrec /fixmbr

bootrec /fixboot '(this command may return 'Access denied', fix is below)'

bootrec /scanos '(this may say that it found no Windows installations, continue anyway)'

bootrec /rebuildbcd

exit

(If bootrec /fixboot returns Access denied, type in bootsect /nt60 sys /mbr and try bootrec /fixboot again. It should work now.)

After exiting, click Continue and it should boot to Windows 10 normally.

If you still get the Grub rescue menu when it boots, then type exit and it will boot to Windows 10. To get rid of the menu, go to BIOS (you can do this by pressing a key repeatedly when you begin booting your machine, the key is usually F2, but can vary according to manufacturer), and then using the arrow keys, navigate to the Boot menu and put Windows (it may appear as Windows Boot Manager) at the top using the instructions on the right side of the screen. Go to Exit menu and SAVE YOUR SETTINGS (This is VERY important) and leave.

Windows 10 should now be working and booting normally.

Hope this helps.

  • I dont see any ”windows boot manager”, but i see the name of my computer’s hard disk and i did what u said and gave it the top priority,after i rebooted the system everything changed back and the ubuntu boot loader popped up again – user1174353 Jan 22 '21 at 19:29
  • @user1174353 What do you see when you go into the Boot menu? – Vishal Bagadi Jan 22 '21 at 19:35
  • It says 1.ubuntu 2.SATA SSD(this is my hard disk)3.eMM card 4.SATA HDD 6....., i changed the order and gave my hard disk priority but when it rebooted everything changed back and grub popped up – user1174353 Jan 22 '21 at 19:42
  • @user1174353 When you deleted the Ubuntu partition, did you remember to repair the MBR (Master Boot Manager) by going to cmd and executing some particular commands? In order to reverse the dual-boot, you have to repair the boot loader that Windows used before you dual-booted Ubuntu. – Vishal Bagadi Jan 22 '21 at 19:46
  • I didnt do anything after i deleted the ubuntu partition, i just restarted the pc. – user1174353 Jan 22 '21 at 19:48
  • @user1174353 That explains why you didn't see ubuntu or Windows Boot Manager when you went into the BIOS. As Calum Jackson said, there may be a way to get into your Windows installation from the GRUB rescue shell and repair the bootloader. If not, you'll have to reinstall Ubuntu, make sure GRUB can recognize Windows, and reverse the dual-boot the right way, like Calum Jackson said. I'll research and see if you can get into Windows without having to reinstall Ubuntu. – Vishal Bagadi Jan 22 '21 at 19:54
  • I haven't found how to get to Windows from GRUB rescue yet, but do you have a external usb or hard drive you could use to create Windows 10 installation media (Make sure you don't need the data in the drive, as making the media WILL destroy all data in the drive)? If you are, I think I have a solution for you. Also, have you tried typing 'exit' when you get to GRUB? Can you tell me what happens after that? – Vishal Bagadi Jan 22 '21 at 20:43
  • When you deleted the Ubuntu partition, did you combine it with the Windows partition? – Vishal Bagadi Jan 22 '21 at 20:44
  • I do have a 8 GB usb flash which i have the ubuntu bootable OS inside, when i write exit and press enter it opens boot menu and i can choose between ubuntu and my hard disk, wether i choose the hard disk or ubuntu it won’t matter, i’m gonna end up in GRUB page anyway – user1174353 Jan 22 '21 at 20:57
  • @user1174353 I see. Do you have any other computer with Windows installed? Oh, and MBR actually stands for Master Boot record. I accidentally said that it stood for Master Boot Manager. – Vishal Bagadi Jan 22 '21 at 21:40
  • Yeah i do but my own computer doesn’t have a DVD input, i thought about making a revovery key with USB but that wont work because usb recovery key works only on the computer u made it with. – user1174353 Jan 22 '21 at 21:47
  • @user1174353 You don't need to have a DVD input or a recovery key. You just need to use the Ubuntu bootable usb you already have, and make it a Windows bootable usb. If you don't know how to do that, just tell me and I'll edit my answer to tell you how to make one and how to fix the issue you have on the affected computer with the USB. If you can make one, I'll just give the fix by itself. – Vishal Bagadi Jan 22 '21 at 21:52
  • Windows bootable usb? How? – user1174353 Jan 22 '21 at 22:07
  • @user1174353 I added to my answer how to make a Windows bootable usb and the fix for your issue. You can use your Ubuntu bootable usb for the Windows bootable usb. – Vishal Bagadi Jan 23 '21 at 00:12
0

I would recommend finding a windows install media, and using it in 'rescue mode'.

There may be a technique to cause GRUB to boot into the windows installation from its command line, however, it will not be comfortable for someone who is uncomfortable with a rescue shell.

Alternatively, you can reinstall Ubuntu, ensure that GRUB is aware of your windows installation, and only then uninstall Ubuntu. This would probably make sure your data remains intact.