Skip to content

Network Unreachable from Wget / Second Stage Timeout

This article addresses problems with second stage and wget problems during the PXE bootstrapping process of an operating system. Generally speaking, these issues are related to the Top-of-Rack switch configuration, causing port blocking delays.

Solution

Throwing a network unreachable error from wget when trying to fetch second stage initramfs; however, by the time you get dropped into a root console, eth0 has an IP address and can connect to the server fine. May also see a baremetal PXE boot initial PXE boot works but then it's getting kicked to a shell before it can download root.squashfs.

Troubleshooting: You can manually grab the file with wget after it bails, so communications are working fine. It just appears it's not waiting long enough for DHCP and then fails to get the file before it gets an IP.

Note

You can set these changes in the global profile so it will apply everywhere. It shouldn't hurt functioning systems (they will escape the loop early) and might fix this system.

Solution 1: Do you run your switches with Portfast? or Spanning Tree delays?

You add these to your kernel-options parameter to alter the retry and wait times.

  • provisioner.portdelay=<Number of seconds> - seconds to wait before bring up link
  • provisioner.postportdelay=<Number of seconds> - seconds to wait after bringing up link before dhcp
  • provisioner.wgetretrycount=<Number of retries before failure> - wget of squashfs occurs once a second for 10 times by default.

If you need to specify more than one of the above three values, use a space separated list.

Example

provisioner.wgetretrycount=3 provisioner.postportdelay=120

Solution 2: Is something is really "slower" than sledgehammer expects?

You could try setting provisioner.wgetretrycount=60. kernel-options is a parameter that lets you changing the kernel parameters passed to bootenvs. Sometimes it is used to tweak the kernel options that the kernel is using, but it can be used for other values as well.

CLI Example

drpcli profiles add global param kernel-console to "provisioner.wgetretrycount=60 provisioner.postportdelay=120"

Additional Information

The params listed above should be added to a profile that will be applied to the machine. You can use the global profile to make sure the param will apply to all machines, or add it to individual profiles and apply them directly to the machine.

See Also

Versions

all

Keywords

network unreachable, squashfs, initramfs, spanning tree protocol, stp, portfast, portdelay, postportdelay, wgetretrycount, top of rack switch, ToR, switch, port blocking

Revision Information

KB Article     :  kb-00034
initial release:  Wed Jun 10 12:40:47 PDT 2020
updated release:  Wed Jun 10 12:40:47 PDT 2020