charleslinquist
Posts: 112
Joined: Wed Sep 05, 2012 12:43 pm

Changing boot order or stopping programs from loading

Wed Apr 10, 2019 5:06 am

I would like to change the order of services loaded during boot. My network is powered by the same power supply as the Raspberry, and the Raspberry boots quicker. I have several network services that don't load because the network hasn't yet made a connection. I need to load those network services last (or maybe in rc.local), not early in the boot process.
I believe that some versions of Linux have this information in rc.d, but Raspbian doesn't have that file.

So... how do I change the order of the drivers loaded during boot? I realize that I'll need to be careful of dependencies.

Andyroo
Posts: 4162
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Changing boot order or stopping programs from loading

Wed Apr 10, 2019 11:08 am

There is an option in raspi-config to wait for the network to start before completing the boot process.

This can be found by using the command

Code: Select all

sudo raspi-config
Then select boot options

raspi-config documentation is https://www.raspberrypi.org/documentati ... -config.md

This adds dhcpcd -q -w in to /etc/systemd/system/dhcpcd.service.d/wait.conf rather than changing sequencing of start up tasks.

Edit: Added command in to explanation and corrected code / url tag error.
Need Pi spray - these things are breeding in my house...

Paul Hutch
Posts: 378
Joined: Fri Aug 25, 2017 2:58 pm
Location: Blackstone River Valley, MA, USA
Contact: Website

Re: Changing boot order or stopping programs from loading

Wed Apr 10, 2019 3:32 pm

Just tried the raspi-config option and at least on the latest Raspbian Lite, it does not wait for what most people consider a valid network connection. It allows boot to complete even if there is no LAN connection via eth0 and wlan0 due to unplugged cable and no valid SSID/key pair.

Return to “Advanced users”