Hello,
As a disclaimer I should probably state that I am quite new to iPXE, I have been educating myself by reading the documentation and from 3rd party sources, but I could not find any relevant information for the problem I will be describing below, that's why I am posting here today.
So I am trying to boot a set of linux binaries located on an HTTP server, but from time to time my system hangs after the final 'boot' command.
I am using iPXE version aa11f, and my boot script looks like this:
Code:
#!ipxe
# Global variables used by all other iPXE scripts
chain --autofree boot.ipxe.cfg
# Location of the kernel and initramfs
set image-url ${http-server}
# name of the kernel and initramfs
set kernel bzImage
set initramfs initrd
# Parameters to be passed to the kernel
set kernel-options console=ttyS0,115200 console=tty0
# iPXE boot commands
kernel ${image-url}/${kernel} initrd=${initramfs} ${kernel-options}
initrd ${image-url}/${initramfs}
prompt Press any key to continue
echo boot ${kernel}
boot ${kernel}
I compiled ipxe.efi with the following command:
Code:
make bin-x86_64-efi/ipxe.efi EMBED=chainload.ipxe DEBUG=tcp:1
I noticed the following:
- If the 'boot' command is issued without delay after the 'initrd' command, the system freezes
Quote:>>Start PXE over IPv4, Press [ESC] to EXIT...
Station IP address is 10.0.107.120
Server IP address is 10.0.4.183
NBP filename is /tftpboot/ipxe/ipxe.efi
NBP filesize is 921024 Bytes
Downloading NBP file...
iPXE initialising devices...ok
iPXE 1.0.0+ (aa11f) -- Open Source Network Boot Firmware -- http://ipxe.org
Features: DNS HTTP TFTP EFI Menu
Could not open net0: Input/output error (http://ipxe.org/1d6a4698)
Configuring (net1 00:80:a2:13:76:a1)...... ok
00:80:a2:13:76:a1
net1
http://bucls1:8000/config/00-80-a2-13-76-a1.ipxe...TCP 0x91c2caa8 allocated
TCP 0x91c2caa8 transitioned from CLOSED to SYN_SENT
TCP 0x91c2caa8 bound to port 1025
TCP 0x91c2caa8 timer fired in SYN_SENT for 2d75941b..2d75941b 00000000
TCP 0x91c2caa8 using timestamps, SACK, TX window x1, RX window x1
TCP 0x91c2caa8 transitioned from SYN_SENT to ESTABLISHED
TCP 0x91c2caa8 transitioned from ESTABLISHED to FIN_WAIT_1
ok
boot.ipxe.cfg...TCP 0x91c2caa8 transitioned from FIN_WAIT_1 to CLOSING/LAST_ACK
TCP 0x91c2caa8 transitioned from CLOSING/LAST_ACK to TIME_WAIT
TCP 0x91c2c208 allocated
TCP 0x91c2c208 transitioned from CLOSED to SYN_SENT
TCP 0x91c2c208 bound to port 42658
TCP 0x91c2c208 timer fired in SYN_SENT for 68b3bd60..68b3bd60 00000000
TCP 0x91c2c208 using timestamps, SACK, TX window x1, RX window x1
TCP 0x91c2c208 transitioned from SYN_SENT to ESTABLISHED
TCP 0x91c2c208 transitioned from ESTABLISHED to FIN_WAIT_1
TCP 0x91c2c208 transitioned from FIN_WAIT_1 to CLOSING/LAST_ACK
ok
http://buc/ipxe/bzImage...TCP 0x91c2c208 transitioned from CLOSING/LAST_ACK to TIME_WAIT
TCP 0x91c2de28 allocated
TCP 0x91c2de28 transitioned from CLOSED to SYN_SENT
TCP 0x91c2de28 bound to port 59162
TCP 0x91c2de28 timer fired in SYN_SENT for 6cbca57f..6cbca57f 00000000
TCP 0x91c2de28 using timestamps, SACK, TX window x1, RX window x1
TCP 0x91c2de28 transitioned from SYN_SENT to ESTABLISHED
ok
http://buc/ipxe/initrd... ok
wait...
boot bzImage
- if I wait ~5 seconds after the 'initrd', 2 debug messages pop-up (They seems related to the download of bzImage. No logs are ever displayed for the download of initrd):
Quote:TCP 0x91c2ce08 transitioned from ESTABLISHED to CLOSING/LAST_ACK
TCP 0x91c2ce08 transitioned from CLOSING/LAST_ACK to TIME_WAIT
If I issue the 'boot' command after those, the systems boots OK:
Quote:>>Start PXE over IPv4, Press [ESC] to EXIT...
Station IP address is 10.0.107.120
Server IP address is 10.0.4.183
NBP filename is /tftpboot/ipxe/ipxe.efi
NBP filesize is 921024 Bytes
Downloading NBP file...
iPXE initialising devices...ok
iPXE 1.0.0+ (aa11f) -- Open Source Network Boot Firmware -- http://ipxe.org
Features: DNS HTTP TFTP EFI Menu
Could not open net0: Input/output error (http://ipxe.org/1d6a4698)
Configuring (net1 00:80:a2:13:76:a1)...... ok
00:80:a2:13:76:a1
net1
http://bucls1:8000/config/00-80-a2-13-76-a1.ipxe...TCP 0x91c2c308 allocated
TCP 0x91c2c308 transitioned from CLOSED to SYN_SENT
TCP 0x91c2c308 bound to port 1025
TCP 0x91c2c308 timer fired in SYN_SENT for 2d75941b..2d75941b 00000000
TCP 0x91c2c308 using timestamps, SACK, TX window x1, RX window x1
TCP 0x91c2c308 transitioned from SYN_SENT to ESTABLISHED
TCP 0x91c2c308 transitioned from ESTABLISHED to FIN_WAIT_1
ok
boot.ipxe.cfg...TCP 0x91c2c308 transitioned from FIN_WAIT_1 to CLOSING/LAST_ACK
TCP 0x91c2c308 transitioned from CLOSING/LAST_ACK to TIME_WAIT
TCP 0x91c2c8c8 allocated
TCP 0x91c2c8c8 transitioned from CLOSED to SYN_SENT
TCP 0x91c2c8c8 bound to port 42658
TCP 0x91c2c8c8 timer fired in SYN_SENT for 68b3bd60..68b3bd60 00000000
TCP 0x91c2c8c8 using timestamps, SACK, TX window x1, RX window x1
TCP 0x91c2c8c8 transitioned from SYN_SENT to ESTABLISHED
TCP 0x91c2c8c8 transitioned from ESTABLISHED to FIN_WAIT_1
TCP 0x91c2c8c8 transitioned from FIN_WAIT_1 to CLOSING/LAST_ACK
ok
http://buc/ipxe/bzImage...TCP 0x91c2c8c8 transitioned from CLOSING/LAST_ACK to TIME_WAIT
TCP 0x91c2ce08 allocated
TCP 0x91c2ce08 transitioned from CLOSED to SYN_SENT
TCP 0x91c2ce08 bound to port 59162
TCP 0x91c2ce08 timer fired in SYN_SENT for 6cbca57f..6cbca57f 00000000
TCP 0x91c2ce08 using timestamps, SACK, TX window x1, RX window x1
TCP 0x91c2ce08 transitioned from SYN_SENT to ESTABLISHED
ok
http://buc/ipxe/initrd... ok
wait...
Press any key to continue
TCP 0x91c2ce08 transitioned from ESTABLISHED to CLOSING/LAST_ACK
TCP 0x91c2ce08 transitioned from CLOSING/LAST_ACK to TIME_WAIT
boot bzImage
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.1.33-yocto-standard (damien@ansld2.ces.ch) (gcc version 5.2.0 (GCC) ) #1 SMP PREEMPT Mon Oct 31 00:44:11 CET 2016
[ 0.000000] Command line: bzImage initrd=initrd console=ttyS0,115200 console=tty0
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[...]
- Sometime the system boots out of the box, without any the need of an additional sleep, in such case I get:
Quote:iPXE 1.0.0+ (aa11f) -- Open Source Network Boot Firmware -- http://ipxe.org
Features: DNS HTTP TFTP EFI Menu
Could not open net0: Input/output error (http://ipxe.org/1d6a4698)
Configuring (net1 00:80:a2:13:76:a1)...... ok
00:80:a2:13:76:a1
net1
http://bucls1:8000/config/00-80-a2-13-76-a1.ipxe...TCP 0x91c2c308 allocated
TCP 0x91c2c308 transitioned from CLOSED to SYN_SENT
TCP 0x91c2c308 bound to port 1025
TCP 0x91c2c308 timer fired in SYN_SENT for 2d75941b..2d75941b 00000000
TCP 0x91c2c308 using timestamps, SACK, TX window x1, RX window x1
TCP 0x91c2c308 transitioned from SYN_SENT to ESTABLISHED
TCP 0x91c2c308 transitioned from ESTABLISHED to FIN_WAIT_1
TCP 0x91c2c308 transitioned from FIN_WAIT_1 to CLOSING/LAST_ACK
ok
boot.ipxe.cfg...TCP 0x91c2c308 transitioned from CLOSING/LAST_ACK to TIME_WAIT
TCP 0x91c2c8c8 allocated
TCP 0x91c2c8c8 transitioned from CLOSED to SYN_SENT
TCP 0x91c2c8c8 bound to port 42658
TCP 0x91c2c8c8 timer fired in SYN_SENT for 68b3bd60..68b3bd60 00000000
TCP 0x91c2c8c8 using timestamps, SACK, TX window x1, RX window x1
TCP 0x91c2c8c8 transitioned from SYN_SENT to ESTABLISHED
TCP 0x91c2c8c8 transitioned from ESTABLISHED to FIN_WAIT_1
TCP 0x91c2c8c8 transitioned from FIN_WAIT_1 to CLOSING/LAST_ACK
ok
http://ansld3/ipxe/bzImage...TCP 0x91c2c8c8 transitioned from CLOSING/LAST_ACK to TIME_WAIT
TCP 0x91c2de28 allocated
TCP 0x91c2de28 transitioned from CLOSED to SYN_SENT
TCP 0x91c2de28 bound to port 59162
TCP 0x91c2de28 timer fired in SYN_SENT for 6cbca57f..6cbca57f 00000000
TCP 0x91c2de28 using timestamps, SACK, TX window x1, RX window x1
TCP 0x91c2de28 transitioned from SYN_SENT to ESTABLISHED
TCP 0x91c2de28 transitioned from ESTABLISHED to FIN_WAIT_1
TCP 0x91c2de28 transitioned from FIN_WAIT_1 to CLOSING/LAST_ACK
ok
http://ansld3/ipxe/initrd...TCP 0x91c2de28 transitioned from CLOSING/LAST_ACK to TIME_WAIT
TCP 0x91c2d048 allocated
TCP 0x91c2d048 transitioned from CLOSED to SYN_SENT
TCP 0x91c2d048 bound to port 28039
TCP 0x91c2d048 timer fired in SYN_SENT for 37e502df..37e502df 00000000
TCP 0x91c2d048 using timestamps, SACK, TX window x1, RX window x1
TCP 0x91c2d048 transitioned from SYN_SENT to ESTABLISHED
56%TCP 0x91c2d048 transitioned from ESTABLISHED to FIN_WAIT_1
TCP 0x91c2d048 transitioned from FIN_WAIT_1 to CLOSING/LAST_ACK ok
wait...
boot bzImage
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[...]
From here I am not sure where to go.
I would bet that my network infrastructure is most probably guilty of those random late transition from CLOSING/LAST_ACK to TIME_WAIT, but there is nothing I can do on that side.
Is there a way to put more debug messages to understand where iPXE freezes more exactly and why ? Any idea would be much appreciated !
Not sure it is related, but for the record I should mention that I also suffer from time to time of that stalling http download problem that was already reported in a few other posts.