Cannot boot through PXE Menu timeout
-
@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.
-
@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.
-
@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.
-
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?
-
@mcana66 I guess two thing here,
- 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”.
- 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.
-
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!!
-
@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.
-
@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.
-
@brakcounty Very Nice! I am going to give that a try! Thank you.
-
@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!!