How can I manually boot Windows from the Grub2 terminal?
21,213
In grub2 run the following commands one at a time
insmod ntfs
set root=(hdX,gptX)
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
boot
Where hdX
is the hard drive Windows is on (hd0 is the first drive) and gptX is the partition number of the Windows EFI partition, so if Windows was the very first partition on the first drive set root=(hd0,gpt0)
.
Related videos on Youtube
Author by
Alex Meuer
Updated on September 18, 2022Comments
-
Alex Meuer over 1 year
I have both Windows 10 and Ubuntu Desktop on separate partitions on a gpt disk. Windows is trying to reboot to finish off its update but it's causing me to be presented with the grub terminal prompt. I know i can boot ubuntu manually via
linux vmlinuz-..., initrd init..., boot
commands, but I can't figure out how to do similar for Windows.-
oldfred over 7 yearsGrub only boots working Windows, so you maybe cannot. Standard Windows entry otherwise would work. Is Ubuntu in UEFI boot mode. UEFI & BIOS are not compatible and once you start booting in one mode, you cannot switch. But you should be able to directly boot Windows from UEFI 's one time boot key often f10 or f12, check your manual. You may need to cold boot, to have time to press a key.
-
mook765 over 7 yearsBoot from live-USB and check if your Ubuntu-partition still exists.
-
Alex Meuer over 7 yearsTried chainloader: "not a valid filename" . Going to back up and reinstall everything.
-
Mark Kirby over 7 yearsPlease see my new answer.
-
-
WinEunuuchs2Unix over 7 yearsNot at my computer but I think I had to use 'chainloader +1'. That was legacy mode though with Windows as first partition following grub. This may or may not be helpful here.
-
Mark Kirby over 7 years@WinEunuuchs2Unix You are right, on legacy grub it would be
chainload (hd0,0)+1
IDK if it is valid forgrub2
though, once OP gets back on this, we can see about some adjustments :)