Wake, Boot, Repeat: Remote OS Selection with GRUB and ESP
1 min read
Summary
A developer has detailed a way to choose an operating system (OS) at boot without being physically near the machine.
To do this, a combination of GRUB (Grand Unified Boot Loader), Wake-on-LAN (WOL) and a lightweight ESP8266 running a simple HTTP server is required.
GRUB must be modified to fetch its boot configuration over HTTP, with the ESP8266, or another low-power device, serving a config file that defines which OS should launch.
A custom script tells GRUB to source an external config, while a WOL-enabled ESP button can wake the PC and set the boot parameters remotely.
While the hack opens up possibilities beyond the usual dual-boot selector, it does require a running web server, which could be a Raspberry Pi, another machine or the ESP itself.
Thus, the compromise between convenience and security is highlighted.