So basically I had Windows 10 and Ubuntu 14.04 installed on a dual boot using grub. I decided I didn't want ubuntu any more so I deleted the Linux hard drive partitions out of my disk manger on windows 10. Now I rebooted my pc hoping to skip grub and go straight to windows but I'm stuck on this error. I have an HP Pavilion Desktop. I've tried booting into the HP system recovery and startup manager but it goes straight to this error on grub. The error is "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." Also whenever I type into the grub thing I get random letters instead of the ones I press. PLEASE HELP ME!!
2 Answers
I had the exact same problem. Stuck on the GRUB screen. No Windows, no Ubuntu! How I reached there? I wanted to remove Ubuntu, so I logged into Windows, deleted the Ubuntu partitions using Disk Management
, then restarted my PC and got stuck at the GRUB screen.
All solutions that involve a Windows Recovery Disk (bootrec.exe
and bootsect.exe
) and those involving an Ubuntu live CD (boot-repair
and grub-install
) did not work. Should I have run bootrec
or bootsect
before I had deleted the partitions and restarted? I don't know. But it was too late now! Not until I found this hidden comment that saved my day.
I simply typed exit
at the GRUB command prompt and was finally booted into Windows 10. As simple as that! If you want a "clean" boot into Windows, directly without having to type exit
each time, then this is the procedure to follow. Once logged into Windows (after the exit
from the grub loader), run cmd.exe
with administrator privileges and use the DISKPART
utility. No recovery disk needed. The procedure is detailed here, which is copied from here. I also copy it briefly down here in case any links are lost in the future.
- Run
cmd.exe
with administrator privileges. - Run
diskpart
utility. - At the
DISKPART>
prompt, type:list disk
thensel disk X
whereX
is the drive your boot files reside on. To make sure which drive to choose, you can open theDisk Management
GUI tool in Windows (since we are running full Windows version) not a rescue disk. InDisk Management
, you will find Disk 0 is usually the boot C drive, and hence the one to choose. You can also recognize it from within the command lineDISKPART>
from its size. In modern systems, it is usually the smaller (or the only) drive, the SSD one. - Type
list vol
to see all partitions (volumes) on the disk. - Type
sel vol Y
whereY
is theSystem
volume (you findSystem
written in theInfo
column in the previous listing). There is very good chance it is the onlyFAT32
partition. InDisk Management
, it is clearly marked asEFI System Partition
. You can match the size with the one that appears inDISKPART>
. - Assign a drive letter by typing:
assign letter=Z:
whereZ
is a free (unused) drive letter. This is all what we needDISKPART>
for. - Type exit to leave
DISKPART>
. Now we're back to the Windows (DOS) prompt. - At the
cmd
prompt, type:Z:
and hit enter, where Z was the drive letter you just created. - Type
dir
to list the directories on this mounted EFI partition. - If you are in the right place, you should see a directory called
EFI
. - Type
cd EFI
and thendir
to list the child directories insideEFI
. - Type
rmdir /S ubuntu
to delete the Ubuntu boot directory. - Done! Restart and see for yourself a clean Windows boot.
-
1
It sounds like what you've done is left the grub stage-1 bootloader on the drive, but when you deleted the linux system you likely destroyed the /boot file hierarchy which contained stage 2 and the linux kernel. Thus, you're left with the minimal command line. The /boot partition normally contains a folder /boot/grub which has a file grub.cfg which lists the Operating Systems on the systems and the options used to boot them. Without that, grub is lost, and grub wrote over the Windows bootloader, so windows can't do a direct boot.
I've usually only heard of people deleting Windows, not Linux after coming off a dual-boot system so I don't have an official fix for this. You could attempt using boot-repair from a live-cd to see if it could repair the Windows portion of the bootloader. Failing that, I believe your best option is to get ahold of a Windows Recovery Disk or Installation Disk. Of course, before doing any of that, I would recommend backing up any important data to a different drive, if at all possible.
If for some reason reinstalling windows is not an option, you may just want to install a linux system on a very tiny partition just so you can use the boot system. Unfortunately the only way that I'm aware of to get rid of GRUB entirely at this point and go back to just the windows bootloader would be to have the windows installation or recovery dvd/cd. For that process, you can follow the steps in this answer.