Under dual systems Boot from not default partition

We have in a lot of IT rooms with dual systems, Windows and Ubuntu. By default, we run windows but sometimes is necessary that FOG boots from the Ubuntu partition. For example, we have some IT rooms to do scitific calculation at nights, but during the day the students use Windows.

In our old FOG server, FOG 0.30, we developed a tasks to do this. The tasks wakes up the client, changes the grub order and reboot the machine, in the next boot, the system boot from Ubuntu.

@Fernando-Gietz So lets think about it a bit. in a way you want to tell the pxe booting client (in iPXE) don’t boot of the normal boot loader, but boot from a different partition (lets use /dev/sda6 for discussion). By default sanboot will boot from the first hard drive, and uefi will boot via refind.

Grub can boot uefi. I don’t know if grub distributed with FOG can boot uefi.

If you set the exit mode for a host to Grub first hard drive the iPXE menu is created this way:chain -ar ${boot-url}/service/ipxe/grub.exe --config-file="rootnoverify (hd0);chainloader +1" || goto MENU

@Fernando-Gietz I have done this in my old working place a couple of times. It does work but it’s not easy to include that as a general thing in FOG. It depends on the system you have (legacy BIOS or UEFI) and boot loader you have installed on disk.