Reboot to Windows on a UEFI system
A watched PC never boots. proverb
I am the sort of person who needs to boil a kettle of water three or four times. I will turn it on, walk away, forget it until it’s cold, and repeat.
I dual boot my desktop computer between Linux and Windows (to play Overwatch). By default, the computer boots into Linux. To boot into windows I need to catch it while it’s displaying the boot menu which has a 3 second timeout. I am terrible at this.
Years ago, I blogged about changing the grub default with a script to reboot into windows. But I’m now using systemd-boot, a UEFI boot manager.
Fortunately, UEFI itself provides a solution. There’s a
BootNext variable, which allows choosing a one-time boot entry.
First I list my boot entries using
Seeing that Windows is
Boot0000 I can make the following
reboot-windows will boot me into Windows, bypassing the
systemd-boot bootloader entirely. Rebooting from windows will take me back to