Two (or three) different ways
Using network boot via PXE server.
I've used a trick like this for backup windows stations (with
partclone) while users are away, by night.
Create a PXE boot server (dhcpd + tftpd) for booting via network
( You could create specific boot menu for each computer on a network or make group. The network boot menu could point to local hard drive. )
Prepare two different boot menu on this server: one defaulting to ubuntu and the other defaulting to window.
Link boot menu defaulting to window to be served by pxe server.
Prepare a wakeup script for
- ) Link boot menu defaulting to ubuntu to be served by pxe server.
- ) Send wake-on-lan signal to wake the computer up
- ) Wait for boot menu request in TFTP logs (care about timeout and limits, for assuming exception).
- ) Link boot menu defaulting to window to be served by pxe server.
You could even try to run same via crontab to be synchronized by BIOS wakup, but if in crontab, you could simply run script defined at
This will do the job.
(Nota a pxe boot server is light and could be installed even on a raspberry pi, an hacked NAS or on a DD-WRT router, for sample.).
You could use dmidecode to run
grub-reboot windows when boot from power-switch.
Simply create a script containing something like:
dmidecode | grep -q 'Wake-up Type: Power Switch' && echo grub-reboot windows
You can run this script at each boot, by adding them in crontab with
grub-reboot, you may have to edit
This will work but will increase windows boot time a lot!
For avoiding this, you could create a special
initramdisk wich could do this job, but this is not as simple.
I don't know this tool, but I heard good feed-backs.
iPXE is the leading open source network boot firmware. It provides a full PXE implementation enhanced with additional features