问题
I am dual booting my laptop with Windows 8.1 and Ubuntu, I wanted to remove Ubuntu so i have deleted those drives in disk management and also took recovery of windows on USB. As I restarted I got Minimal bash like line editing is supported and a prompt grub. I want my windows 8.1 back, can anyone please help me?
回答1:
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)
- Run a
cmd.exe
process with administrator privileges - Run
diskpart
- Type:
list disk
thensel disk X
where X is the drive your boot files reside on - Type
list vol
to see all partitions (volumes) on the disk - Select the EFI volume by typing:
sel vol Y
where Y is theSYSTEM
volume (this is almost always the EFI partition) - For convenience, assign a drive letter by typing:
assign letter=Z:
where Z is a free (unused) drive letter - Type
exit
to leave disk part - While still in the
cmd
prompt, type:Z:
and hit enter, where Z was the drive letter you just created. - Type
dir
to list 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
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.
回答2:
This is a dirty workaround to get the windows boot manager up and running over grub. Go to the start menu and run the command prompt
as an administrator
. Make sure the path is set to C:\Windows\System32
. Then type bcdedit /enum all > %userprofile%/Desktop/bcdtxt.txt
.
Now, go to your desktop and open the bcdtxt.txt file. Find the Windows Boot Manager
UEFI firmware settings. Copy the identifier.
Now, go to the command prompt again. Type bcdedit /default {identifier}
. Then, type bcdedit /timeout 0
. You should have your windows boot without having the grub appear.
P.S. Note that the grub has not been removed from the bcd entries. If you want to remove the firmware settings associated with the ubuntu efi
, get the respective identifiers. Go to the command prompt and type bcdedit /delete {identifier}
. That should do.
来源:https://stackoverflow.com/questions/34639609/how-to-get-rid-of-grub-and-restore-my-windows-back