USB Boot UEFI client into FOG menu (harder way)

  • Moderator

    WARNING: this tutorial is no longer relevant since the rom-o-matic site has been shutdown since Dec 2019. These instructions are no longer valid and can be followed. I'm leaving these instructions here for historical reasons. No additional support on this topic can be provided since they depend on an external web site working

    You may has why do we need this?

    UEFI PXE booting is a bit different than BIOS based PXE booting. Some of the early UEFI systems like the Dell Latitude e6420 and the OptiPlex 790 do not support PXE booting in UEFI mode. But through testing they do support USB booting in PXE mode. So knowing this I’m going to create the harder solution (see easier solution if this method is too complicated for your needs) to PXE boot these devices in UEFI mode. This method we will create a new efi boot kernel to install on our usb flash drive to boot into the FOG environment. Building linux kernels are not extremely difficult using the rom-o-matic, but because of the number of options you can choose, you can run into problems if not created correctly. I can say for sure this method works with the previous mentioned systems. YMMV with other hardware platforms.

    The process steps are not that hard, its a bit like giving your self a root canal without medicine. It will hurt like crazy while you are doing it, but once its over you will have the satisfaction of not wanting to ever do it again <jk>. Its not really that hard, the rom-o-matic does all of the work.

    You will need to acquire these things.

    1. A 2GB (min) flash drive
    2. A UEFI pxe boot image we will create from the rom-o-matic web site

    iPXE UEFI boot kernel creation process

    1. From a browser access the rom-o-matic web site at
    2. Select Advanced, for experienced users radio button
    3. In the drop down list for the output format select EFI PXE bootstrap 64-bit (.efi) selection.
    4. Ensure that NIC type is set to all-drivers (default)
      Since there are a ton of settings that could be changed here, I'm only going to post the changes from the default settings for the PXE boot. HINT: You may want to search in your browser for the variable names I used below to locate the exact setting in question.
    5. Section: Download protocols.
      DOWNLOAD_PROTO_HTTPS = checked
      DOWNLOAD_PROTO_FTP = checked
      DOWNLOAD_PROTO_NFS = checked
    6. Section: SAN boot protocols
      All checked in this section except HTTP_ENC_PEERDIST = unchecked
    7. Section: Image types
      All unchecked except IMAGE_PNG = checked
    8. Section: Command-line commands to include
      All checked except IWMGMT_CMD = unchecked, PXE_CMD = unchecked, PROFSTAT_CMD, = unchecked
    9. Section: Console options
      All unchecked except CONSOLE_FRAMEBUFFER = checked
    10. Section: Embedded script add in the following script
    set fogserver
    isset ${net0/mac} && dhcp net0 || goto dhcpnet1
    echo Received DHCP answer on interface net0 && goto netboot
    isset ${net1/mac} && dhcp net1 || goto dhcperror
    echo Received DHCP answer on interface net1 && goto netboot
    prompt --key s --timeout 10000 DHCP Failed, hit 's' for the iPXE shell; reboot in 10 seconds && shell || reboot
    cpuid --ext 29 && set arch x86_64 || set arch i386
    param mac0 ${net0/mac}
    param arch ${arch}
    param platform ${platform}
    param product ${product}
    param ipxever ${version}
    isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
    chain http://${fogserver}/fog/service/ipxe/boot.php##params

    Be sure to change the ip address above for next-server to the IP address of your FOG server. You must use an IP address and not the conical name of your fog server.

    1. Section: Which revision should be set to Master (default)
    2. Press the Proceed >> button. After a bit you will be prompted to download a file called **ipxe.efi ** be sure to save it. We will need this file in the section below.

    Boot drive creation process

    1. Insert your flash drive into a Windows based computer and format it with FAT32 disk format
    2. On that flash drive create a folder called EFI
    3. On that same flash drive create a folder called BOOT in the EFI folder creating this path “x:\EFI\BOOT”. Note: I have not tested if case is important or not, I used upper case for everything and it worked. That is as far as I tested.
    4. Copy the ipxe.efi kernel created in the previous section to the flash drive in the EFI\BOOT folder. That file MUST BE RENAMED to bootx64.efi (note the case difference. I did not test to see if case is important)
    5. At this point remove the usb thumb drive from the build up computer and insert the drive into a target computer
    6. Power on the target computer and press F10 or F12 (depending on the mfg) to call up the EFI boot menu.
    7. Select the USB boot device under the EFI section of the EFI menu
    8. You should see the iPXE boot banner and then after about 30 seconds it should be prompted for the IP address of your FOG server. Key in the IP ADDRESS of your FOG server and press Enter.
    9. At this point you should boot into the FOG iPXE menu.

  • @george1421 here is the error2_1488933685695_rsz_20170307_163040.jpg 1_1488933685695_rsz_20170307_163050.jpg 0_1488933685693_rsz_20170307_163106.jpg

  • @cnkpadobi Here is the new error0_1488485699885_rsz_20170302_111551.jpg

  • @george1421 Thank you

  • Moderator

    @cnkpadobi I just rebuilt that image file and will test it tonight to see if something changed.

  • @george1421 0_1488410321600_rsz_pic3.jpg Here is the pic from the FOS USB

  • @george1421 Hmm that make sense is there a way to get a list of compatible USB adapter

  • Moderator

    @cnkpadobi This may not be an issue with the iPXE kernel settings specifically. I would test this pxe boot stick on a computer that does work with pxe booting today. The idea here is that there is a potential that the iPXE kernel may not have the required driver for this usb network adapter.

  • Thank you, was wondering why I am getting this message.


  • Moderator

    @cnkpadobi Just be aware that this document was created over a year ago so some of the menu/values on the rom-o-matic site may have moved. But from memory I would say that the HTTP Extensions is the right location now.

  • Step Number 6 does not appear under the San boot protocols but under the Http Extension. Is this correct?

    SAN boot protocols:

    SANBOOT_PROTO_AOE, AoE protocol

    SANBOOT_PROTO_IB_SRP, Infiniband SCSI RDMA protocol

    SANBOOT_PROTO_FCP, Fibre Channel protocol


    HTTP extensions:
    HTTP_AUTH_BASIC, Basic authentication

    HTTP_AUTH_DIGEST, Digest authentication

    HTTP_ENC_PEERDIST, PeerDist content encoding

    HTTP_HACK_GCE, Google Compute Engine hacks

  • @george1421 Best way to keep up with updates in that regard, would be, (for your setup at least), instead of booting to ipxe.efi, or some other filename, goto: tftp://FOGIP/default.ipxe.

    THe problem with this approach (though) is it assumes the fogip in the file will always have tftp running. That’s why I recommend using a combination of your scripts and the ipxescript from the src as a part of the embedded script.

    It leads you away from the need to have tftp running, and all the DB style checks can still be made.

  • Moderator

    @Tom-Elliott OK great. I just wanted to give the usb booted device just enough to get into the official FOG ipxe.efi kernel. That way if you guys developed new or additional tests this external boot would not have to stay in lock step with your updates.

    BUT, with that said, if there is an easier/better/preferred way to do this, just let me know and I’ll update this document.

  • @george1421 I don’t think you’re doing anything wrong, but at this point you’re already in ipxe. so why not just use the file with the modified embedded script? you’re already in there. ipxe.efi or ipxe.pxe already have ALL the same drivers ours do. Only difference is the embedded script at that point.

  • Moderator

    @Psycholiquid said:

    What I am trying to do is boot from USB pxe because the laptop has no NIC or UEFI is not cooperating like it should.and Wireless wont boot from network. So basically trying to make a live USB drive so I can boot to FOG on machine where there is no nic or the docking station wont show up.

    While this is the intended purpose of the usb boot, dealing with wireless nics is a bit of a pain since the number of models is staggering. I don’t think I included the wireless management code in my how to script. The preference would be to use a usb ethernet nic.

    The issue I see is some how you need to tell the client what SSID to connect to and any security keys required to connect. Unless you create a fully open wireless network just for imaging.

  • Moderator

    @Tom-Elliott said:

    I guess what I’m trying to say, if you’re using the usb, you’re already IN ipxe in some way, why would you want to redirect to another ipxe file. Why not make the config the same AS the default.ipxe file, or just load the file itself.

    The intent (right or wrong) was to not alter the FOG workflow. My intentions were to get the client booted well enough to then load the official ipxe.efi kernel with all of its goodness. There are many more network checks being done with its boot script than is being done with the USB boot. Was this the right idea, I guess time says… maybe?

  • Testers

    @Wayne-Workman Will do

  • @Psycholiquid Ok… I don’t think that these instructions by the OP are going to help in your situation. We need to get your USB to Ethernet adapter going the regular way. Can you please start a new thread for the issue and post a screen shot of what you’re seeing when you try to network boot?

  • Testers

    @Wayne-Workman StarTech USB31000SPTB

  • @Psycholiquid What is the make and model of the USB adapter you’re using?