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)
-
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)
- 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
-
- create a refind efi bootable flash drive using a tool like rufus https://rufus.akeo.ie/downloads/ to put the USB flash drive image on a usb drive via dd that you get from here http://www.rodsbooks.com/refind/getting.html
-
- 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
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.
-
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.
-
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/83952Regards X23
-
What happens when the network or the fog server isn’t available?
-
@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.
-
@JJ-Fullmer That was 6 days ago, I have no idea what I was thinking lol.
-
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? -
@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.
-
@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.efilogs:
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…
-
@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.