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

    TL;DR
    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):

    Ahem
    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

    fs0:
    ls
    

    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
    ipxe.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.


  • Moderator

    @andrewg78 What I want you to do is start a new thread.

    I want you to pxe boot the target computer using FOG 1.5.4 and the post a clear screen shot of the exact error. Lets work through why its not working on your hardware there.



  • @george1421
    Yes it supports both USB and PXE.
    I have docking station with USB -LAN SMC 7500, but it is recognized as network card in BIOS and I can select it to boot through the PXE.
    It even connects to FOG server, but then I got EFI PXe boot error.
    I was trying a few different efi kernels, and even downloaded
    http://ww1.microchip.com/downloads/en//softwarelibrary/obj-lan95xx-uefi/lan95xx_7500_uefi_driver_0.10.zip
    to test SmscUsbNetDriver.efi

    logs:
    Aug 20 10:55:28 localhost dnsmasq-dhcp[9463]: 2705516733 available DHCP subnet: 172.18.147.206/255.255.255.0
    Aug 20 10:55:28 localhost dnsmasq-dhcp[9463]: 2705516733 vendor class: PXEClient:Arch:00006:UNDI:003001
    Aug 20 10:55:28 localhost dnsmasq-dhcp[9463]: 2705516733 PXE(ens160) 70… proxy
    Aug 20 10:55:28 localhost dnsmasq-dhcp[9463]: 2705516733 tags: UEFI32, ens160
    Aug 20 10:55:28 localhost dnsmasq-dhcp[9463]: 2705516733 bootfile name: i386-efi/ipxe.efi
    Aug 20 10:55:28 localhost dnsmasq-dhcp[9463]: 2705516733 next server: 172.18.147.206
    Aug 20 10:55:28 localhost dnsmasq-dhcp[9463]: 2705516733 broadcast response
    Aug 20 10:55:28 localhost dnsmasq-dhcp[9463]: 2705516733 sent size: 1 option: 53 message-type 2
    Aug 20 10:55:28 localhost dnsmasq-dhcp[9463]: 2705516733 sent size: 4 option: 54 server-identifier 172.18.147.206
    Aug 20 10:55:28 localhost dnsmasq-dhcp[9463]: 2705516733 sent size: 9 option: 60 vendor-class 50:58:45:43:6c:69:65:6e:74
    Aug 20 10:55:28 localhost dnsmasq-dhcp[9463]: 2705516733 sent size: 17 option: 97 client-machine-id 00…
    Aug 20 10:55:31 localhost dnsmasq-dhcp[9463]: 2705516733 available DHCP subnet: 172.18.147.206/255.255.255.0
    Aug 20 10:55:31 localhost dnsmasq-dhcp[9463]: 2705516733 vendor class: PXEClient:Arch:00006:UNDI:003001
    Aug 20 10:55:31 localhost dnsmasq-dhcp[9463]: 109533102 available DHCP subnet: 172.18.147.206/255.255.255.0
    Aug 20 10:55:31 localhost dnsmasq-dhcp[9463]: 109533102 vendor class: PXEClient:Arch:00006:UNDI:003001
    Aug 20 10:55:31 localhost dnsmasq-dhcp[9463]: 109533102 PXE(ens160) 70… proxy
    Aug 20 10:55:31 localhost dnsmasq-dhcp[9463]: 109533102 tags: UEFI32, ens160
    Aug 20 10:55:31 localhost dnsmasq-dhcp[9463]: 109533102 bootfile name: i386-efi/ipxe.efi
    Aug 20 10:55:31 localhost dnsmasq-dhcp[9463]: 109533102 next server: 172.18.147.206
    Aug 20 10:55:31 localhost dnsmasq-dhcp[9463]: 109533102 sent size: 1 option: 53 message-type 5
    Aug 20 10:55:31 localhost dnsmasq-dhcp[9463]: 109533102 sent size: 4 option: 54 server-identifier 172.18.147.206
    Aug 20 10:55:31 localhost dnsmasq-dhcp[9463]: 109533102 sent size: 9 option: 60 vendor-class 50:58:45:43:6c:69:65:6e:74
    Aug 20 10:55:31 localhost dnsmasq-dhcp[9463]: 109533102 sent size: 17 option: 97 client-machine-id 00…
    Aug 20 10:55:31 localhost dnsmasq-dhcp[9463]: 109533102 sent size: 25 option: 43 vendor-encap 06…
    0_1534853053882_3bb8f259-b722-48d4-8141-bb8164e197b3-image.png
    0_1534853066656_0f2e072d-2a7c-404d-8a9c-dba93592e99e-image.png


  • Moderator

    @andrewg78 This tutorial was from over 2 years ago. FOG fully supports uefi imaging now. Does your tablet support pxe booting or booting off alternate media like USB? PXE booting is the best choice if its available.



  • Hi, is this method still the best possible one?
    I have docking station with SMC LAN 7500 built in and there is efi shell available in my tablet.
    I’m looking also some way to automate the process, have u succeeded in this area?



  • @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? https://forums.fogproject.org/post/83952

    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 https://wiki.fogproject.org/wiki/index.php?title=BIOS_and_UEFI_Co-Existence

    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.


 

516
Online

5.4k
Users

12.6k
Topics

118.6k
Posts