Just thinking out loud here and hoping for a second opinion.
I just got a RPi3 that I am loving. I was looking at using it as a remotely accessible WOL server. The PC I am trying to reach is dual-booted with Windows 10 and Ubuntu 17.10 in which I have configured VNC access to each. I got to thinking that even if I configure the WOL server and I send the magic packet, I still won't be able to choose what OS will be loaded (because AFAIK the magic packet isn't capable of relaying this sort of information).
So, Option 1) Write a python script that can change the grub configuration file to specify the preferred default boot option. Assuming the Ubuntu drive/filesystem is accessible from Windows, a python script would be written accordingly. More easily, a different python script would be made to run in Ubuntu (to make it easier than plainly editing the grub conf file).
Option 2) Not sure if this is even possible but what if I hosted a symlinked (via some intermediate cloud service) grub conf file on the RPi? This way, I wouldn't have to worry about changing the grub conf file from Windows OR Ubuntu, I could just do it on the RPi. What I'm not sure about here is when the change made on the RPi will be accessible to grub in relation to a boot sequence.
I'd appreciate any feedback regarding a more efficient way of accomplishing the above, issues/feasibility regarding the above, miscellaneous ideas, etc. Thanks!
man efibootmgr
and efibootmgr -n XXXX. Windows must have similar way to access UEFI, but do not know it. – oldfred Apr 06 '18 at 13:22