<div dir="ltr">Hi Shao,<div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 23, 2017 at 10:28 AM, Shao Miller <span dir="ltr"><<a href="mailto:ipxe@sha0.net" target="_blank">ipxe@sha0.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 1/23/2017 10:27, Rick Miller wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
I currently use iPXE to load memdisk and, subsequently, a FreeBSD disk image to perform an OS installation to disk. This works great in BIOS, but upcoming requirements make UEFI a prerequisite.  Because memdisk is not UEFI-aware, new UEFI-aware media is necessary.  The current plan is to integrate the installation scripts (currently in the hard drive image) into a bootable FreeBSD ISO (something I’ve previous experience with) and instead of loading it via memdisk, load it directly from iPXE using `sanboot` (or similar).<br>
<br>
Unfortunately, I have been unable to get iPXE to sanboot an ISO.  It errors citing “Operation not permitted”.  The current working theory is that the necessary features aren’t enabled in the current UEFI-aware iPXE program.  This has lead me to the general.h[2] header file where many of the image types are disabled, including IMAGE_PXE, which seems to be the image type necessary for PXE booting.  However, uncommenting and building the resulting code via:<br>
<br>
# pwd<br>
/ipxe/src<br>
# make bin-x86_64-efi/ipxe.efi<br>
<br>
produces the following error:<br>
<br>
  [AR] bin-x86_64-efi/blib.a<br>
ar: creating bin-x86_64-efi/blib.a<br>
  [HOSTCC] util/elf2efi64<br>
  [VERSION] bin-x86_64-efi/version.ipxe.ef<wbr>i.o<br>
  [LD] bin-x86_64-efi/ipxe.efi.tmp<br>
bin-x86_64-efi/blib.a(librm.o)<wbr>: In function `pm_esp':<br>
(.data.pm_esp+0x0): relocation truncated to fit: R_X86_64_32 against symbol `_estack' defined in .stack section in bin-x86_64-efi/blib.a(stack.o)<br>
bin-x86_64-efi/blib.a(librm.o)<wbr>: In function `real_to_prot':<br>
(.text16.real_to_prot+0x1): relocation truncated to fit: R_X86_64_PC16 against symbol `enable_a20' defined in .text16.early section in bin-x86_64-efi/blib.a(liba20.o<wbr>)<br>
bin-x86_64-efi/blib.a(librm.o)<wbr>: In function `real_to_prot':<br>
(.text16.real_to_prot+0x8): relocation truncated to fit: R_X86_64_16 against symbol `rm_ds' defined in .text16.data.rm_ds section in bin-x86_64-efi/blib.a(librm.o)<br>
bin-x86_64-efi/blib.a(librm.o)<wbr>: In function `real_to_prot':<br>
(.text16.real_to_prot+0x22): relocation truncated to fit: R_X86_64_16 against `.bss16.rm_virt_addrs'<br>
bin-x86_64-efi/blib.a(librm.o)<wbr>: In function `real_to_prot':<br>
(.text16.real_to_prot+0x2e): relocation truncated to fit: R_X86_64_16 against `.bss16.rm_virt_addrs'<br>
bin-x86_64-efi/blib.a(librm.o)<wbr>: In function `real_to_prot':<br>
(.text16.real_to_prot+0x33): relocation truncated to fit: R_X86_64_16 against `.bss16.rm_virt_addrs'<br>
bin-x86_64-efi/blib.a(librm.o)<wbr>: In function `real_to_prot':<br>
(.text16.real_to_prot+0x39): relocation truncated to fit: R_X86_64_16 against `.data16.gdt'<br>
bin-x86_64-efi/blib.a(librm.o)<wbr>: In function `real_to_prot':<br>
(.text16.real_to_prot+0x58): relocation truncated to fit: R_X86_64_32 against `.text.real_to_prot'<br>
bin-x86_64-efi/blib.a(librm.o)<wbr>: In function `r2p_pmode':<br>
(.text.real_to_prot+0x10): relocation truncated to fit: R_X86_64_32 against `.data.pm_esp'<br>
bin-x86_64-efi/blib.a(librm.o)<wbr>: In function `r2p_pmode':<br>
(.text.real_to_prot+0x17): relocation truncated to fit: R_X86_64_32 against symbol `idtr32' defined in .data.idtr32 section in bin-x86_64-efi/blib.a(librm_mg<wbr>mt.o)<br>
bin-x86_64-efi/blib.a(librm.o)<wbr>: In function `r2p_pmode':<br>
(.text.real_to_prot+0x1f): additional relocation overflows omitted from the output<br>
bin-x86_64-efi/blib.a(pxe_entr<wbr>y.o): In function `pxe_segments':<br>
(.text16.data+0x26): undefined reference to `_data16_memsz'<br>
bin-x86_64-efi/blib.a(pxe_entr<wbr>y.o): In function `pxe_segments':<br>
(.text16.data+0x2e): undefined reference to `_data16_memsz'<br>
bin-x86_64-efi/blib.a(pxe_entr<wbr>y.o): In function `pxe_segments':<br>
(.text16.data+0x36): undefined reference to `_text16_memsz'<br>
bin-x86_64-efi/blib.a(pxe_entr<wbr>y.o): In function `pxe_segments':<br>
(.text16.data+0x3e): undefined reference to `_text16_memsz'<br>
bin-x86_64-efi/blib.a(pxe_entr<wbr>y.o): In function `pxenv':<br>
(.text16.data+0x76): undefined reference to `_data16_memsz'<br>
bin-x86_64-efi/blib.a(pxe_entr<wbr>y.o): In function `pxenv':<br>
(.text16.data+0x82): undefined reference to `_data16_memsz'<br>
bin-x86_64-efi/blib.a(pxe_entr<wbr>y.o): In function `pxenv':<br>
(.text16.data+0x86): undefined reference to `_text16_memsz'<br>
make: *** [bin-x86_64-efi/ipxe.efi.tmp] Error 1<br>
rm bin-x86_64-efi/version.ipxe.ef<wbr>i.o<br>
<br>
Are there additional options, such as PXE_STACK, that are required when booting a FreeBSD ISO from iPXE under UEFI, but perhaps disabled that might mitigate this error or perhaps this feature is unavailable under UEFI?<br>
<br>
<br>
[1] <a href="http://ipxe.org/efi/vision" rel="noreferrer" target="_blank">http://ipxe.org/efi/vision</a><br>
[2] <a href="https://git.ipxe.org/ipxe.git/blob/HEAD:/src/config/general.h" rel="noreferrer" target="_blank">https://git.ipxe.org/ipxe.git/<wbr>blob/HEAD:/src/config/general.<wbr>h</a><br>
<br>
<br>
</blockquote></div></div>
Good day, Rick.<br>
<br>
The following forum-post might be related: <a href="http://forum.ipxe.org/showthread.php?tid=6896&pid=9117#pid9117" rel="noreferrer" target="_blank">http://forum.ipxe.org/showthre<wbr>ad.php?tid=6896&pid=9117#<wbr>pid9117</a></blockquote><div><br></div><div>It is related in the context of booting from an iSCSI target where I am booting from an HTTP target.  Having said that, the thread suggests additional patches are necessary to support iBFT under UEFI.  Could it be that these patches are required to enable sanboot to attach to the URL?</div></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Take care<br>Rick Miller</div>
</div></div></div>