Infinite wait for network at boot doesn't work

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Mlz

Infinite wait for network at boot doesn't work

Post by Mlz »

I selected the infinite wait for network at boot in dietpi-config. However, my raspberry pi boots up without a network connection until I powercycle it. I have updated my diet and I am on the latest version.
How do I resolve this?
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: Infinite wait for network at boot doesn't work

Post by Fourdee »

Mlz wrote:infinite wait for network at boot in dietpi-config. raspberry pi boots up without a network connection
Hi,

Thanks for report.

Unable to replicate on RPi 3 with eth unplugged and WiFi disabled.

Is eth plugged in on your system? WiFi disabled ?

The command we use to check a valid connection is:

Code: Select all

route | awk '{print $4}' | grep -ci -m1 'UG'
UG means UP and valid GATEWAY: http://www.thegeekstuff.com/2012/05/route-flags/?utm

Maybe the command is giving bad results, any chance you could replicate no connection boot and paste results of:

Code: Select all

route
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Mlz

Re: Infinite wait for network at boot doesn't work

Post by Mlz »

Fourdee wrote:
Maybe the command is giving bad results, any chance you could replicate no connection boot and paste results of:

Code: Select all

route
Not sure how to go about that since it is a headless server and I need it connected to run the route command.
Mlz

Re: Infinite wait for network at boot doesn't work

Post by Mlz »

Is there any script I can use to check for internet connection at boot and reboot if there is no connection?
brtravel
Posts: 51
Joined: Sat Sep 16, 2017 2:04 pm

Re: Infinite wait for network at boot doesn't work

Post by brtravel »

I've got a question about this, is this simply waiting to be assigned an IP address from a router? If the router doesn't actually have an internet connection, will the device still continue with the boot?
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: Infinite wait for network at boot doesn't work

Post by Fourdee »

brtravel wrote:I've got a question about this, is this simply waiting to be assigned an IP address from a router? If the router doesn't actually have an internet connection, will the device still continue with the boot?
Depends on router, however, If the router provides a gateway, it should pass the connection wait.

You can test with:

Code: Select all

route | awk '{print $4}' | grep -ci -m1 'UG'
1 = gateway established, the net wait command would then exit, system resumed boot.
0 = gateway not available, DietPi will wait for the the above status, before continuing. Endless wait if boot_wait_for_network=2
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply