Hey everyone! I'm setting up Wake On LAN (WOL) for my desktops, which run both Windows and Ubuntu because I have rEFInd installed for dual-booting. I'm curious if there's a way to automatically select which operating system to boot into when using WOL. Sometimes I need to jump into Windows for work, and other times I'm on Ubuntu for development. Is there a solution to this, or will I have to manually choose every time? Thanks for your help!
4 Answers
While it's tough to do this out of the box, you might get creative! There are some hacky ways to set it up mentioned in a blog I found, but none are straightforward. Basically, you’d need a script that adjusts the default boot option in the Windows BCD and then wake it using WOL.
WOL just sends a wake signal without any option to specify the OS. Your system will just boot to the default. A possible but more involved workaround could involve setting up iPXE, which would allow you to boot into different images. But keep in mind, that might be overkill and requires quite a bit of setup.
Actually, I’m already using iPXE for booting images! I’m curious if that can work with the context of rEFInd to select an OS.
If you want better control over your boot options, consider transitioning to a hypervisor setup. This allows you to run both OSes sandboxed, and you could remote into the hypervisor to choose the guest OS as needed. It may streamline your needs a little bit, especially if you need flexibility for student use.
That sounds promising! Do you have any specific hypervisor recommendations that could handle this?
Unfortunately, there's no built-in way to automatically choose the OS with Wake On LAN. When you wake the system, it will just boot into whatever operating system was last active before it went to sleep. So you're pretty much stuck with the current setup unless there's some complex workaround.
That's an interesting idea! But I wish there was a simpler solution because scripting just adds another layer of complexity.