Unable to boot to HDD whilst using PXE Boot USB

  • I have a host that I’m unable to enable native PXE booting on for various reasons.

    So I’m using a bootable USB stick with ipxe.efi added to it as per the instructions. This works fine, and I can access the Fog menu, deploy/capture images e.t.c

    However I cannot get it to leave the menu once the countdown has completed and continue to boot from the HDD.

    I have tried all the available options in the host config, and they either cause the menu to just reappear and the countdown begins again forever, or they dump me to the refind console window, or an error window if I choose EXIT.

    The system does have 2 x HDD, with the recovery partition, and system on the first drive (sdb), and that drive is specified as the primary host disk as /dev/sdb, if that makes any difference.

    It’s not the end of the world to have to remove the USB and manually restart the machine, but it really slows down doing a load of machines as they need me to manually intervene so they drop into the OS and commence processing Snapins.



  • Developer

    @gazzer82 said in Unable to boot to HDD whilst using PXE Boot USB:

    Is their any way for me to target specific machines with different settings?

    You can set specific EXIT TYPES for each host machines. Unfortunately there is no way to specify individual refind.conf files in FOG yet. Though it’s not very hard to manually add this to the code. I might suggest you give this a try as we won’t have the time to add this as a feature as quickly.

    Edit /var/www/html/fog/lib/fog/bootmenu.class.php and jump to line 135. Here you add another variable same as the one above in line 131-135 so it looks like this:

            $refind = sprintf(
                'imgfetch ${boot-url}/service/ipxe/refind.conf%s'
                . 'chain -ar ${boot-url}/service/ipxe/refind_x64.efi',
            $refindbugged = sprintf(
                'imgfetch ${boot-url}/service/ipxe/refindbugged.conf%s'
                . 'chain -ar ${boot-url}/service/ipxe/refind_x64.efi',

    The only difference between the two is the variable name and the conf file name.

    In that same file jump to line 170 (166 if you have not added the code above yet) and add the new item to the list here:

            self::$_exitTypes = array(
                'sanboot' => $sanboot,
                'grub' => $grub['basic'],
                'grub_first_hdd' => $grub['basic'],
                'grub_first_cdrom' => $grub['1cd'],
                'grub_first_found_windows' => $grub['1fw'],
                'refind_efi' => $refind,
                'refindbugged_efi' => $refindbugged,
                'exit' => 'exit',

    And now there is one more place to edit to make this new item available in the web UI: /var/www/html/fog/lib/fog/service.class.php - around line 210:

            $types = array(

    Save the changes and go back to the web UI. You should be able to select “REFINDBUGGED_EFI” in the host settings now. Create a file /var/www/html/fog/service/ipxe/refindbugged.conf with the specific settings you want for those clients.

    Those changes will be lost when you update your FOG installation. This is definitely not a proper fix for your situation. But this should help you work around the issue for now.

  • Hi Sebastian,

    Thanks for your reply.

    Thanks for the suggestion, I have just spent some time playing with the various options in the config file to see if it helps, but I’m still not really getting anywhere.

    If I use REFInd as the default exist option for UEFI then I end up at the About REFInd screen, which I guess indicates it can’t find anything to boot.

    I have tried enabling the scan_delay option, putting it to 5 seconds, but that doesn’t make any difference.

    I then tried enabling scanfor internal,hdbios, which did detect something to boot, but I get the usual “nothing here to boot” screen when trying to boot from a drive with nothing on it.

    What did help, was enabling the deep scan, which then showed me 2 bootable options, 2 second of which is the windows install I was looking to boot to.

    So, that seems to work. However this config is now causing issues with the other machines that don’t need this enabled to work fine, they throw an error about not having the modules available for this, which blocks the automatic booting into windows for them.

    Is their any way for me to target specific machines with different settings?



  • Developer

    @gazzer82 Have you played with the rEFInd settings in /var/www/html/fog/service/ipxe/refind.conf yet? From what you describe this sounds like a bit of a special hardware setup and that might need some adjustment.

Log in to reply