PXE Boot with Unmodifiable Windows DHCP Server
-
@JJ-Fullmer said in PXE Boot with Unmodifiable Windows DHCP Server:
on a usb and embed the ipxe.efi file and set it as a boot option
This won’t work because the fog delivered copy of ipxe.efi contains an embedded script that queries dhcp (again)
ref: https://github.com/FOGProject/fogproject/blob/master/src/ipxe/src-efi/ipxescript
It has to be grub in this case. I think I found a command that allows grub to prompt the user for an input. I have yet to test it out to see if it works the same way as the prompt command for iPXE.
-
I think I have a solution that will work. I have not tested or debugged it yet (its almost bed time in the US). But the reason why I built the USB FOS booting process is because some computers will not boot iPXE so I created the grub method of booting. The problem is that grub is static where iPXE is dynamic and the fog server can control the actions of the iPXE script at run time. With grub its static text saved on the usb flash stick. This static file while it works for basic tasks does not support some of the more advanced options available in the iPXE menu. So our first choice is to get iPXE to boot from the USB flash drive but not use dhcp options to locate the FOG server. To that end I think I have a way to do this. I created a custom (one-off) build of iPXE.
We are going to kind of follow the process outlined here: https://forums.fogproject.org/topic/6350/usb-boot-uefi-client-into-fog-menu-easy-way but with some tweaks.
You will need to acquire these things.
- A 2GB (min) flash drive
- A UEFI pxe boot image from a functioning FOG server.
Boot image creation process
- Insert your flash drive into a Windows based computer and format it with FAT32 disk format
- On that flash drive create a folder called efi (all lower case)
- On that same flash drive create a folder called boot in the efi folder creating this path “x:\efi\boot” (make sure the case matches).
- Download zipxe.efi from my google drive: https://drive.google.com/file/d/12kZ1S2zXQofd_OI5oipWXj3JQIBaJO2g/view?usp=sharing
- Copy that file to the flash drive in the efi\boot folder. That file MUST BE RENAMED to bootx64.efi (note the case)
- Download the file default.ipxe from the /tftpboot directory on your fog server and save it in efi\boot directory on the flash drive. In theory you should not have to do anything with that file, because the last line in that text file should have the IP address of your FOG server in it. If it does, then the configuration part is done.
- At this point remove the usb thumb drive from the build up computer and insert the drive into a target computer
- Power on the target computer and press F10 or F12 (depending on the mfg) to call up the EFI boot menu.
- Select the USB boot device under the EFI section of the EFI menu
- You should see the iPXE boot banner and then it should load the FOG IPXE menu. Once you get to this menu then you have the full function of the FOG server including multicast imaging.
-
@george1421 I see that in the code but this is a method I use to get past dhcp on the daily. I think it’s going out to dhcp just to make sure the machine has an ip address and is on the network and then connects to the tftp server. But since it already has the efi boot file it’s not using dhcp to try to go find it, which is the part I believe he needs to skip. But if my thought doesn’t work then the default.ipxe method you outlined is worth a shot.
I would add to your method that in the case that file isn’t seen (like if it’s a super picky uefi bios) you could create a efi partition instead of fat32 with
diskpart
But I would bet your method there would work. -
@george1421 Just a follow up with this request. The steps I laid out did boot the FOG iPXE menu without the use of DHCP to give it direction. It should work for the OP as defined.
-
Another option would be to configure your fog server to be a router, serving ip addresses only for a new subnet behind the fog server’s second NIC via a switch dedicated to imaging. We do this in our primary imaging lab. Let me know if this appeals to you and I’ll go into greater detail.
-
@george1421 Your solution worked perfectly on the few devices I have tried so far (tested by both running a capture and deploy).
Many Thanks
-
@george1421 I have come across a small annoyance. The USB drive boots to the Fog menu successfully, however if no keyboard entry is detected after around 5 seconds or so the menu changes to an rEFInd - About screen. Any ideas how to stop this from happening?
Thanks
-
@Richard-Wise Are you wanting to not have it default, change the default timeout, or is stopping at the refind menu the issue? I can read your post a number of ways.
-
@george1421 I want it to boot directly to the fog menu and stay there indefinitely until an option is manually selected.
Currently it boots to the fog menu but if nothing is selected after a few seconds it automatically changes to an rEFInd - About screen.
-
@Richard-Wise Ah ok, then set this value in the web ui FOG Configuration->FOG Settings->(Expand all)->FOG Boot Settings->PXE MENU TIMEOUT change the value to 0