• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Cannot boot through PXE Menu timeout

Scheduled Pinned Locked Moved Solved
General Problems
3
11
4.0k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    mcana66
    last edited by Aug 26, 2022, 3:58 PM

    Hello All, Hoping I’m posting this in the right spot and providing as much info as I can think of. So I have 2 machines on their own tiny subnet for testing, an Intel NUC running ubuntu 20.04 (fog host) and an Asus based motherboard with UEFI PXE running as the 1st boot option. I am able to reliably image the Asus machine but cannot get the machine to boot through the PXE menu to the next boot option. DNS & DHCP are running on the fog server btw.

    Ubuntu Server 20.04 (UEFI) registered for Asus client but no job specified
    EFI Boot Exit - Refind_efi

    iPXE Boots
    received dhcp answer on interface net2
    tftp://<fog ip>/default.ipxe
    tftp://<fog ip>/fog/service/ipxe/boot.php
    tftp://<fog ip>/fog/service/ipxe/grub.exe
    Could not boot: exec format error (https://ipxe.org/2e008081)

    When I do a pcap the “could not boot” error line is looking for autoexec.ipxe which I do not have on my machine.

    No job being pushed but client (Asus) is registered with an image in fog. So I guess my real question should be, why is iPXE booting and starting TFTP if there is no job to be pushed? Is autoexec.ipxe a needed component to continue the boot process? I appreciate any help or questions for info I did not specify in advance.

    G D 2 Replies Last reply Aug 26, 2022, 8:03 PM Reply Quote 0
    • G
      george1421 Moderator @mcana66
      last edited by Aug 26, 2022, 8:03 PM

      @mcana66 said in Cannot boot through PXE Menu timeout:

      grub.exe

      is a bios exit mode. A UEFI system can’t boot grub.exe. Your exit mode for UEFI, the only options are REFIND and Exit, and if you are using FOG 1.5.9 Exit mode has a problem. REFIND is your best choice of an exit mode for UEFI based system.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

      M 1 Reply Last reply Aug 31, 2022, 7:41 PM Reply Quote 0
      • D
        DBCountMan @mcana66
        last edited by DBCountMan Aug 26, 2022, 2:08 PM Aug 26, 2022, 8:07 PM

        @mcana66 autoexec.ipxe is the default script that the ipxe kernel looks for unless another file is specified by your DHCP server or if you compile the kernel with an embedded menu script.

        M 1 Reply Last reply Aug 31, 2022, 7:35 PM Reply Quote 0
        • M
          mcana66 @DBCountMan
          last edited by Aug 31, 2022, 7:35 PM

          @brakcounty

          Thanks for the reply. So if autoexec.ipxe is the default, where can I find or create that script. I’ve been doing a lot of searches but I haven’t really seen anything pointing me to “download and edit this”. More developers talking about embedding their own options.

          D 1 Reply Last reply Sep 6, 2022, 2:45 PM Reply Quote 0
          • M
            mcana66 @george1421
            last edited by Aug 31, 2022, 7:41 PM

            @george1421

            Thank you. So I had tried all of the options and that was just what I last had selected. REFIND did not work either. I am using 1.5.9 and “sniff, sniff” exit mode has a problem is not a happy answer. Is there anyway to help the Devs with the problem? I’m happy to help testing!

            Or alternatively is there a previously working version that I can download?

            G 1 Reply Last reply Aug 31, 2022, 8:50 PM Reply Quote 0
            • G
              george1421 Moderator @mcana66
              last edited by Aug 31, 2022, 8:50 PM

              @mcana66 I guess two thing here,

              1. What part of refind didn’t work? What did it do/didn’t do? It doesn’t work is what I get from users. My response is typically what is it, and what didn’t it do. And then of course reboot the computer and see if it fixes “it”.
              2. The fix for Exit has been found here: https://forums.fogproject.org/post/149256 What the poster in that thread is talking about is on this line https://github.com/FOGProject/fogproject/blob/171d63724131c396029992730660497d48410842/src/ipxe/src-efi/ipxescript#L29

              this

              :netboot
              chain tftp://${next-server}/default.ipxe ||
              prompt --key s --timeout 10000 Chainloading failed, hit 's' for the iPXE shell; reboot in 10 seconds && shell || reboot
              

              should have a carriage return after the double pipe ( || ) It should be written as

              :netboot
              chain tftp://${next-server}/default.ipxe || prompt --key s --timeout 10000 Chainloading failed, hit 's' for the iPXE shell; reboot in 10 seconds && shell || reboot
              

              So you can fix iPXE yourself and then recompile ipxe. I have a tutorial for that. While that will fix ipxe it still won’t address the refind issue.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

              M 1 Reply Last reply Aug 31, 2022, 9:11 PM Reply Quote 0
              • M
                mcana66 @george1421
                last edited by Aug 31, 2022, 9:11 PM

                @george1421

                So I was under the impression (possibly wrong) that refind would pass the boot to continue the EFI/BIOS boot order if there was no PXE job available. I was confused since the target machine picked up PXE and processed a tftpboot even though no job was pending. I was spoiled many years ago using Altiris where the server would boot through PXE if no job was pending, so Fog is new to me but I suppose the concepts are still the same.

                That you have a fix for exit is awesome and I will be applying that at the next chance I get! Thanks!!

                G 1 Reply Last reply Aug 31, 2022, 9:19 PM Reply Quote 0
                • G
                  george1421 Moderator @mcana66
                  last edited by Aug 31, 2022, 9:19 PM

                  @mcana66 Yes the fix will be in the next release.

                  How you explained it is how it should work. Sometimes refind need some tweaks for certain hardware, but the process is pxe boot -> FOG iPXE menu for 5 seconds then it should boot to the hard drive (not necessarily follow the firmware boot order). If there was a pending job when the iPXE menu is loaded it would execute that job. That is the flow.

                  So for the hardware it has two exit mode types. For bios based computers it uses SANBOOT as a default. That command is built into iPXE. For uefi computers Exit is the built in command into ipxe. BUT what FOG does by default is exit to an external program called rEFInd. It is should be configured to find the windows partition on the first hard drive and boot into windows.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  1 Reply Last reply Reply Quote 0
                  • D
                    DBCountMan @mcana66
                    last edited by DBCountMan Sep 6, 2022, 8:46 AM Sep 6, 2022, 2:45 PM

                    @mcana66 What I did was create a file in /tftproot called autoexec.ipxe and put this in:

                    #!ipxe
                    ifopen net0
                    dhcp net0
                    
                    chain ${boot-url}/scripts/menu_EFI.ipxe
                    
                    

                    This is for my FreeNAS box that I use for other projects and testing. You can chain any ipxe script (or any boot script like boot.php on the fog server) you want from there. The ${boot-url} variable is set in the default.ipxe file also located in /tftproot.

                    M 1 Reply Last reply Sep 9, 2022, 2:15 PM Reply Quote 1
                    • M
                      mcana66 @DBCountMan
                      last edited by Sep 9, 2022, 2:15 PM

                      @brakcounty Very Nice! I am going to give that a try! Thank you.

                      M 1 Reply Last reply Sep 9, 2022, 7:31 PM Reply Quote 0
                      • M
                        mcana66 @mcana66
                        last edited by Sep 9, 2022, 7:31 PM

                        @mcana66 Well I want to thank you again BrakCountry. Although the solution you posed did not work, you got me delving into the scripts to figure this out on my own. Took a while but here is what I did to fix my issue of the reboot loop in the FOG menu.

                        First I started playing with chain boot and replaced the initial chain statement with the one below:

                        chain https://(Fog-IP)/fog/service/ipxe/refind.efi

                        This booted directly into refind.efi and booted the first hdd. So I got the thought of how many items can you chain boot?

                        I kicked off a job to image my target and added that chain statement to the bottom of default.ipxe because hey why not. lol. After FOG completed imaging the target, the machine performed a normal reboot and booted to boot.php##params however and I am only guessing, there were no jobs present in FOG so when the menu appeared, “Boot from HDD” was the default selection and then chain booted to the refind.efi which booted the os on the HDD.

                        Again thank you to all who tried to offer help or advice!!

                        1 Reply Last reply Reply Quote 1
                        • A AxeMeAQuestion22 referenced this topic 13 days ago
                        • 1 / 1
                        1 / 1
                        • First post
                          6/11
                          Last post

                        179

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project