Direct boot from Windows to Linux with UEFI

2

1

I'm trying to create scripts on both Linux and Windows allowing direct booting to each other with UEFI.

On linux it looks like:

efibootmgr -n 0001 && sync && reboot

Where "0001" is for Boot0001 - Windows UEFI bootentry. And "efibootmgr -n" sets specified entry to be booted with the first order for the one time.

Is there any way to set the one-time boot order from Windows? Tried using bcdedit, but it cannot modify UEFI settings. Also tried to run efibootmgr from Linux Subsystem, but it (expectedly) wasn't successful.

P.S.: I hate using GRUB on modern machines, only UEFI (maybe with refind).

Ivan Piskunov

Posted 2017-11-05T13:48:32.660

Reputation: 21

bcdedit can alter the EFI boot variables, but I'm not enough of an expert on it to be able to tell you how to reliably do what you want with it. The EasyUEFI tool can also edit EFI boot variables, but it's a GUI tool, so unless you have a way to script it, it won't do what you want. Given the existence of EasyUEFI, there must be a way to do it in a program, but I don't know the relevant Windows APIs. – Rod Smith – 2017-11-06T01:29:14.830

@RodSmith Here I've discribed my issues with bcdedit

– Ivan Piskunov – 2017-11-06T09:44:39.063

Answers

-1

bcdedit.exe /set {fwbootmgr} bootsequence {target_GUID} /addfirst

Works great for this

Ivan Piskunov

Posted 2017-11-05T13:48:32.660

Reputation: 21

Downvoting without arguments :( – m3nda – 2019-07-11T02:42:13.430