How to Control PC Boot Drive before Power-on (Ventoy, PXE, or Home Assisant?)

Hello,

I have a PC with multiple operating systems on different drives that I would like to boot into without having to manipulate a selection menu (UEFI/GRUB). My idea is to somehow use UEFI, Ventoy, iVentoy, or another PXE-based approach to boot into a minimal environment, connect to my network, and check the last published message to an MQTT topic, and then boot into the intended local drive (SATA/NVMe) based on that topic. In other words, the idea is to boot this system remotely, based on a WOL or USB wake event, connect to the network, connect to the MQTT server, get the last published message, and then choose whether to boot from a SATA drive or an NVMe drive. For example, the MQTT topic’s published message could be “Boot into Arch” on NVMe 1 or “Boot into Windows 10” on NVMe 2, and then proceed with the boot. Another option would be to use MQTT to control the PXE boot server which would have different images which tell the target system which local hard drive to boot off. I don’t want to use any of those hardware-based SATA drive selector solutions, because I want to still be able to access the data on those drives from each operating system.

I’m posting here because I’m hoping someone can guide me as to how they would achieve this. I also am not very familiar with PXE boot, so I don’t know if it’s possible to tell a system to boot off of a local drive.

Background
The target PC has an Erying motherboard. Unfortunately, I cannot passthrough my GPU’s audio component to the host VM. I want to send the HDMI output to another room without a PC and I don’t want to spend the money on another PC, so using sunshine/moonlight is not an option.

More Background
I have created a project which uses a USB numpad and a Raspberry Pi Pico W which integrates with MQTT and Home Assistant. I’ve added more and more automation because I really like having physical buttons which perform actions. The idea is to set these up all around my house to control my automation.

What I’m Missing
I have not used PXE boot much and unfortunately, my google searches asking if this is possible have failed.

I don’t know much about pxe, but I found this during a recent search for a similar question:

So you’d be covered in booting around from Linux at least. You can kind of do a similar thing with advanced restart in Windows.

Not quite what you were asking about but there you go. Maybe you can default into a really small Linux install that is set up to auto reboot based on your MQTT thing.

Thank you, that’s an interesting link. I don’t think it would work in my case, because I want to have the system powered down for the majority of the time, and I want to use a mix of Linux and Windows operating systems. I also don’t think I want to mess with the EFI setting, because that would overwrite the PXE boot setting.

I drew a diagram of my general idea.

edit: fixed error in image

I suppose the questions are:

  1. Can I control which PXE image is sent based on some external variable?
  2. Can I create a minimal PXE image which tells the target system which drive to boot from?