<div dir="ltr"><div class="gmail_quote"><br><div dir="ltr"><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">Hi all,</span></span></div><span style="background-color:rgb(255,255,255)"><div><span style="background-color:rgb(255,255,255)"><br></span></div>Recently I got an issue on iscsi boot windows 7  with</span>

uefi :  <div><br></div><div><b>ipxe takes  a long time before  windows 

<span style="font-size:13px;color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif">animation </span> boot logo appears.</b></div><div><br></div><div><b>The detail: </b></div><div><b><br></b></div><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">Server: windows server 2012 with iscsi target(wintarget) + tftp32 + latest ipxe.efi / snponly.efi + gpt system image (128GB, three partitons: ESP, MSR, and win7 OS)</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">Client : VMWARE 1000M NIC</span></span><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">(E1000)</span><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"> with UEFI network boot enabled ,local hard disk removed.</span></div><div><span style="background-color:rgb(255,255,255)"><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">After ClientPC boot into ipxe shell , I type</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">dhcp --> set keep-san 1 -> sanboot --no-describe iscsi:10.10.10.253::::iqn.2019.com.test:gpt , then the clientPC begin load OS image, but very slow, it takes about 3 - 5 minutes before the windows animation </span></span><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">boot </span><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">logo appears.</span><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">  </span></div><div><span style="background-color:rgb(255,255,255)"><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">and at this time, I found the wintarget service in server side crashed, once I restart the wintarget service manually, it crashed soon(because ipxe will reconnect to target and retry the previous failed scsi cmd) , after crash -> restart for 10 - 20 times , the clientPC can successfully boot into windows desktop. </span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">I tried snponly.efi , and tried another VM with diffrent NIC(vmxnet3), the result always same. So I guess this is not a network or NIC driver problem, it maybe the ipxe send a wrong scsi command to iscsi target, and caused the target crash. </span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">at last, I fetched the latest IPXE source ,and compiled with DEBUG=iscsi,scsi,efi_block:2, enable syslog, then I replace ipxe.efi in server side, and reboot the clientPC.</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">syslog I got after clientPC reboot:</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">...................</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">...................</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: EFIBLK 0x80 read LBA 0x00032800 to 0xbf5000+0x00002000</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: EFIBLK 0x80 read LBA 0x00072800 to 0xc04000+0x00004000</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: EFIBLK 0x80 read LBA 0x00672800 to 0xbf5000+0x00000400</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: EFIBLK 0x80 read LBA 0x0067280a to 0xbf5000+0x00000400</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: EFIBLK 0x80 read LBA 0x00072960 to 0xc08000+0x00004000</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: EFIBLK 0x80 read LBA 0x0067ab08 to 0xbf5000+0x00000400</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: EFIBLK 0x80 read LBA 0x0101c830 to 0xbf5000+0x00002000</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="font-family:Verdana,Arial,sans-serif;font-size:13px;color:rgb(255,0,0)"><span style="font-weight:bold"><6>ipxe: EFIBLK 0x80 read LBA 0x004a5988 to 0x24c5000+<span style="color:rgb(0,0,205)">0x014c2600</span></span></span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: iSCSI 0xe9a3008 closed: Connection reset (</span><a href="http://ipxe.org/0f0a6095)" style="color:rgb(2,108,177);text-decoration-line:none;font-family:Verdana,Arial,sans-serif;font-size:13px" target="_blank">http://ipxe.org/0f0a6095)</a><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: SCSI 0xe9a36e8 tag 18ae01e6 closed: Connection reset (</span><a href="http://ipxe.org/0f0a6095)" style="color:rgb(2,108,177);text-decoration-line:none;font-family:Verdana,Arial,sans-serif;font-size:13px" target="_blank">http://ipxe.org/0f0a6095)</a><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">       </span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: iSCSI 0xe99fb08 initiator iqn.2010-04.org.ipxe:2dfe4d56-efb6-00a3-efcf-7a4242c83c9f</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: iSCSI 0xe99fb08 target 10.10.10.253 iqn.2019.com.test:gpt    </span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: iSCSI 0xe99fb08 entering security negotiation</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: SCSI 0xe9a12e8 created for LUN 0000-0000-0000-0000</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: iSCSI 0xe99fb08 closed: Connection reset (</span><a href="http://ipxe.org/0f0a6095)" style="color:rgb(2,108,177);text-decoration-line:none;font-family:Verdana,Arial,sans-serif;font-size:13px" target="_blank">http://ipxe.org/0f0a6095)</a><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: iSCSI 0xe99f908 initiator iqn.2010-04.org.ipxe:2dfe4d56-efb6-00a3-efcf-7a4242c83c9f</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: iSCSI 0xe99f908 target 10.10.10.253 iqn.2019.com.test:gpt     </span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: iSCSI 0xe99f908 entering security negotiation</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: SCSI 0xe99fb28 created for LUN 0000-0000-0000-0000</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><6>ipxe: iSCSI 0xe99f908 closed: Connection reset (</span><a href="http://ipxe.org/0f0a6095)" style="color:rgb(2,108,177);text-decoration-line:none;font-family:Verdana,Arial,sans-serif;font-size:13px" target="_blank">http://ipxe.org/0f0a6095)</a><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">......................................</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">......................................</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">once the log line " </span><span style="font-family:Verdana,Arial,sans-serif;font-size:13px;font-weight:bold"><font color="#000000"><6>ipxe: EFIBLK 0x80 read LBA 0x004a5988 to 0x24c5000+</font><font color="#0000ff">0x014c2600</font></span><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"> " appears , the wintarget crashed .</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">from the source , the 0x014c2600 in the log means efi block </span></span><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">io </span><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">read  size, I don't understand why there is an io with read size set to 0x014c2600 bytes (21M). (usually the request size in one efi block read io is 0x200 - 0x100000. (512B - 64K))</span></div><div><span style="background-color:rgb(255,255,255)"><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">I simply add some code in the function efi_block_io_read (efi_block.c) :</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><b><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">if (len > 0x1000000)</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">{</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">return EFI_BAD_BUFFER_SIZE;</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">}</span></b><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">then the client can successfully boot with no errors in 30 - 40 seconds, and the target has not crash.</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">But this is not a good solution, I think we need to figure out the reason why the "len" arg passed to efi_block_io_read is so large. </span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><br><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">The GPT disk image in the target and the physical disk of the server are all ok, I checked with HDTUNE ,no errors or warnnings.</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">And I test in legacy bios with a MBR disk image, The boot slow problem and large size read request won't occurrs, only uefi. </span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">I readed the UEFI spec , it doesn't mentioned the max request size limits of block_io_read. </span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">Maybe the bug is in vmware efi block io protocol? or in wintarget? I'm not sure. (I haven't worked with uefi before today) . </span></span></div><div><br></div><div><span style="background-color:rgb(255,255,255)"><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">I'm going to test these on physical machine and try other linux based iscsi target next work day, but before it, is there any one can give some suggestions? really thanks!</span><br style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px"></span></div><div><div><br></div><div><span style="color:rgb(0,0,0);font-family:Verdana,Arial,sans-serif;font-size:13px">(I know the --no-descrbe option will cause windows can't find IBFT, and finally got 0x0000007B BSOD, so I had install my own iscsi-likely boot initiator driver into windows, it can works with out IBFT. so the issue I faced is not about IBFT)</span>  </div></div><div><br></div></div>
</div></div>