Linux usually does not support this, especially because it reinitializes hardware so that BIOS and DOS programs may not be expected. However, there is a certain infrastructure for switching in real mode in specific cases - in particular, for rebooting (see Machine_real_restart in arch / x86 / kernel / reboot.c) - and has code for reinitializing equipment for kexec or pausing. I suspect you can do something with a combination of them, but I donβt know if the result will really match what DOS or Windows expected to see on reboot.
It is much simpler to plan to use a boot loader with a chain that can be configured to boot in a specific configuration once, for example GRUB , you can call grub-set-default, and then reboot. When GRUB comes up, it will take control of Windows. Then, by installing the backup OS on the Linux partition, control will return to Linux at the next boot.
Another option might be to use Coreboot , but I'm not sure if it is ready for release to load windows.
bdonlan
source share