Booting to FOG from EFI shell (for imaging windows tablets, intel compute sticks, Intel Atom SoC devices, USB ethernet adapters, and other UEFI based computers that don't boot to the network standard)

  • Testers

    Assuming your DHCP or dnsmasq is already setup properly, copy the ipxe.efi file to a usb or local drive on the host, then run it from an efi shell.
    For usb ethernet adapters load the the efi driver first.
    If you don’t have a efi shell, but have a efi bios, use rEFInd to boot to a efi shell.

    @JJ-Fullmer said in UEFI-PXE-Boot (Asus t100 Tablet):

    There is a way to image these with fog.
    Supposedly you should be able to just enable the network stack in bios and then if it’s a ethernet adapter that’s recognized you can set it as a boot option or select it by hitting esc to bring up the boot menu.
    However since that didn’t work for me, I found a different method.
    It’s a little bit abstract, but not too hard, I promise, give it a chance.

    What I used (I did 64 bit efi, substitute 32 bit versions of .efi files if you wanted to do 32 bit)

    Now plug the usb ethernet adapter, and the flash drives into the usb hub and plug the usb hub into the asus t100 usb port (well technically I have a T100H, but this method also worked on a Fusion5 chinese tablet, RCA Cambio tablet, and the atom and core M versions of the intel compute stick).

    Now boot to the bios to make sure the secure boot setting is off and the network stack is enabled. It will probably work regardless of the network stack setting, but better safe than sorry. (Note: I always seem to have to hold shift and hit restart from windows to force it to boot to uefi firmware)

    Save changes and exit and start tapping esc

    tapping esc on boot should bring up a boot menu. Select the refind EFI usb drive.
    On the ReFInd gui boot screen select one of the efi shell options.

    at the efi shell find which fs (file system) your efi files are on (the ones put on either the second flash drive or the C drive) by running these commands


    keep incrementing fs# (fs0: fs1: fs3: etc.) until you see your ipxe.efi and usb driver files.
    When you find them run these two commands to start the pxe boot

    #replace usb.efi with whatever you named the driver file
    load usb.efi

    It should start at ipxe initializing devices

    If you use the 32bit versions, don’t forget to set your kernel and init in the fog gui for that host.
    Another caveat to this method is you have to remember to change the mac address from the usb ethernet adapter to the wifi mac of the device in the fog gui.

    Sure it’s not as smooth a system as wake on lan to network boot, but as daunting as it looks it all takes less than a minute to get it booted to pxe.

    If you have problems with this, you may try setting a static ip address for your adapter in dhcp and make sure it’s pointed to fog. I have the uefi/bios coexistence setup with the policies found in the fog wiki in my windows dhcp and it works perfect.

    If you read all that and think, that’s too much work for so many devices. Well than get a few of these usb setups. I used this method on about 30 intel compute sticks (didn’t require the refind usb, they have a built in efi shell) and it didn’t take all that long.

    In theory, I imagine it’s possible to image these with wifi, but that’s a challenge for another day.

    I am bookmarking this to come back and make this nicer. But for now, this is good.

    NOTE: most efi shells I’ve seen search for a startup.nsh or similar file at their start. So it is theoretically possibly to put a script with the efi shell commands along with the needed files in the root of a boot partition, so that by setting a computer to default boot to the efi shell would boot straight to the network. I got this to work once in testing but never reliably.

    I wrote this in a bit of a rush. So if you try it and it doesn’t work or feel like I skipped a important step please ask and I’ll get back to you as soon as I can.

  • @JJ-Fullmer That was 6 days ago, I have no idea what I was thinking lol.

  • Testers

    @Wayne-Workman I’m not sure I understand the question. I imagine if the fog server is down you get the same problems as you would with normal pxe boot.

  • What happens when the network or the fog server isn’t available?

  • Hi,

    thank you for your documentation ;) since i did the same today we may should also link what i have done:
    [SOLVED] UEFI PXE Boot how to do it?

    Regards X23

  • Testers

    For the UEFI DHCP setup (which may not be completely neccessary for this since you start with the ipxe.efi file) I used this guide

    I believe that the important part after the ipxe.efi file starts ipxe is that the DHCP points it to the fog server. So as long as the next-server or option 66 is set to your fog server hostname or ip, it should work.