dhcpcd-discuss

Re: dhcpcd complains "no valid interfaces found"

Roy Marples

Tue Dec 15 08:31:59 2020

On 14/12/2020 23:38, msg board wrote:
My custom distro uses openrc. I am using dhcpcd for network management. At boot dhcpcd prints this

dhcpcd-8.1.6 starting
udev: starting
dev: loaded udev
no valid interfaces found
timed out
forking to background
forked to background, child pid 972


When I run command "ip a", lo interface is in state UNKNOWN and all other interfaces are DOWN . My openrc startup script for dhcpcd is like below

command=/usr/sbin/dhcpcd
pidfile=/var/run/dhcpcd.pid
command_args="-d -j /var/log/dhcpcd.log --waitip=4 -c /usr/libexec/dhcpcd-run-hooks"
name="DHCP Client Daemon"

depend() {
     provide net
     need localmount
     use logger network
     after bootmisc modules
     before dns
}




How do get dhcpcd to bring up my interfaces and get IPv4 on them.

Firstly, I would put all options into /etc/dhcpcd.conf and not seperate dhcpcd init.d scripts.
That just makes life complicated.

Secondly, the dhcpcd-run-hooks command is the default, should not be needed.

As to the actual problem, I suggest disabling udev to test with. You can do this by adding nodev. Here's your confing in dhcpcd.conf:

debug
logfile /var/log/dhcpcd.log
waitip 4
nodev

If you're running dhcpcd in a namespace, this is fixed in later versions.
If you're running dhcpcd in any kind of container, udev will likely fail as you describe.

Good luck!

Roy

References:
dhcpcd complains "no valid interfaces found"msg board
Archive administrator: postmaster@marples.name