PXE only boot with bios and not UEFI..

  • Hello,
    i wanted to know how to switch automatically from bios to UEFI.
    Fog only works with legacy bios to boot pxe…
    So, when i deploy, i need to boot first with bios.
    But at the first boot of windows, everytime, i need to switch from BIOS to UEFI to boot windows.
    Is there a solution to automate it?
    Thank you a lot

  • thank you so much!you resolved my issue about PXE of windows 10 because i can now boot in uefi mode and also boot on windows 10…!
    I still have a problem with windows 7.
    I can boot pxe with uefi mode but after deploying windows 7, when it boots on windows 7, i have a screen with “refind” (see attached file please)![erreur UEFI win 7.png]. Whe i swith to “bios mode”, windows 7 boots…(/assets/uploads/files/1589268143874-erreur-uefi-win-7.png)

    Thank you for your help
    here is my dhcp configuration:

    class "pxeclient" {
    match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
    if substring (option vendor-class-identifier, 15, 5) = "00000" {
    # BIOS client
    filename "undionly.kpxe";
    elsif substring (option vendor-class-identifier, 15, 5) = "00006" {
    # EFI client 32 bit
    filename   "ipxe32.efi";
    else {
    # default to EFI 64 bit
    filename   "ipxe.efi";
  • Moderator

    @tigervince30 said in PXE only boot with bios and not UEFI..:

    Fog only works with legacy bios to boot pxe…

    This is not an accurate statement. FOG works perfectly with uefi systems. Its the uefi systems that don’t play well sometimes with linux.

    First to support bios and uefi systems transparently you need to have a dhcp server that supports dynamic boot files. This dhcp server will send the proper boot file to the target computer based on the type of pxe booting computer it is. If you have a windows 2012 server (or later) running dhcp server, or a linux dhcp server, or pfsense all of these dhcp servers can support dynamic pxe booting. https://wiki.fogproject.org/wiki/index.php/BIOS_and_UEFI_Co-Existence

    Secondly you need to disable secure boot on the target computer. Secure boot only allows microsoft certified operating systems to boot when enabled.

    Third, if you have a Dell with the disk controller in Raid-On mode, switch the disk mode to ahci mode.

  • Moderator

    @tigervince30 said:

    Is there a solution to automate it?

    There is no general solution. It all depends in the hardware you have. Some manufacturers provide tools to change BIOS/UEFI settings.

    Fog only works with legacy bios to boot pxe…

    I am wondering if we should better try and look into why PXE boot is not working in UEFI mode and fix that. Might be way easier than the automatic BIOS/UEFI switch. Please post a picture of the error in screen that you get when PXE booting in UEFI mode.