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)
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.
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)
- A usb hub, any hub with 3 or more ports should do. I was using a powered usb 3 4 port hub.
- I used the startech USB210000S2 Usb ethernet adapter. It has the SMC LAN 7500 chipset, which is the important part
- 2 usb drives, no substantial size needed. (you may get away with one, but I used 2)
- On the first FAT32 formatted usb drive you just need a couple files in the root of the drive
- the efi driver for the usb (found at this link http://ww1.microchip.com/downloads/en//softwarelibrary/obj-lan95xx-uefi/lan95xx_7500_uefi_driver_0.5.zip, also attached 0_1479851633433_SmscUsbNetDriver.efi , also credit where credit is due, I discovered this file via this blog post http://www.johnwillis.com/2014/03/pxe-booting-using-usb-to-ethernet-dongle.html) (also I renamed this to usb.efi for simplicity later)
- ipxe.efi from your /tftpboot folder on your fog server, copy it off with your favorite ftp/scp client. (or just download the latest one straight from the fog project github https://github.com/FOGProject/fogproject/raw/dev-branch/packages/tftp/ipxe.efi)
- You can also put these files on the root of the C drive
- On the second flash drive
- It makes a ~6MB partition that I’m not sure can be extended to fit the other files
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 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.
Wayne Workman last edited by
@JJ-Fullmer That was 6 days ago, I have no idea what I was thinking lol.
@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.
Wayne Workman last edited by
What happens when the network or the fog server isn’t available?
x23piracy last edited by x23piracy
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
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.