1

I am new to Linux. I am working on a speed up boot-time project. I am using Arch Linux on raspberry pi B+. I am particularly looking into netctl service. To trace down function time, I have edited some of scripts in /usr/lib/network. and I got to know that, it's slow hardware(?) and also stuck up in resolv.conf as it can't find /etc/resolv.conf.

[   17.174115] alarmpi network[195]: Starting network profile 'ethernet-static'...
[   17.190230] alarmpi network[195]: start connection up {network}
[   17.208285] alarmpi network[195]: inside ethernet up
[   17.208285] alarmpi network[195]: test for bring interface up
[   17.443234] alarmpi network[195]: inside bring interface up{network}
[   17.455252] alarmpi network[195]: connection slow or cable is not connectedP{ethernet connection}
[   19.038800] alarmpi network[195]: wait over for carrier whose connection is low or cable not connected {ethernet connection}
[   19.056395] alarmpi network[195]: set ip in IP lib
[   19.056395] alarmpi network[195]: inside ip set {ip}
[   19.112173] alarmpi network[195]: adding static IP routs {set_ip}
[   19.122707] alarmpi network[195]: adding custome gateway {set_ip}
[   19.174517] alarmpi network[195]: start resolvconf
[   21.425880] alarmpi network[195]: /usr/lib/resolvconf/libc: line 230: /etc/resolv.conf: No such file or directory
[   21.901427] alarmpi network[195]: end resolvconf
[   21.913711] alarmpi network[195]: end of IP set
[   21.913711] alarmpi network[195]: set ip function finish P{ethernet connection}
[   21.941763] alarmpi network[195]: Started network profile 'ethernet-static'

code snippet for slow hardware(?) is given below.

if is_yes "${SkipNoCarrier:-no}"; then
    SkipDAD=yes
else
    # Some cards are plain slow to come up. Don't fail immediately.
    if ! timeout_wait "${TimeoutCarrier:-5}" '(( $(< "/sys/class/net/$Interface/carrier") ))'; then
        report_error "No connection found on interface '$Interface' (timeout)"
        bring_interface_down "$Interface"
        return 1
    fi
fi

this is my ethernet profile

Description='A basic static ethernet connection'
Interface=eth0
Connection=ethernet
IP=static
Address=('10.152.187.5/24')
#Routes=('192.168.0.0/24 via 192.168.1.2')
Gateway='0.0.0.0'
DNS=('10.152.187.5')
#ForceConnect=yes
NETCTL_DEBUG=no
TimeoutCarrier=2

## For IPv6 autoconfiguration
#IP6=stateless

## For IPv6 static address configuration
#IP6=static
#Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
#Routes6=('abcd::1234')
#Gateway6='1234:0:123::abcd'

I am using static connection and I have disabled DHCP service and, as of now, I am not interested in IPv6.

What could be the solution to speed up boot time? Should I switch to systemd-networkd service?

0

libc uses /etc/nsswitch.conf to configure name resolution. see man nsswitch.conf

if your hosts entry are resolved using dns at some point, this subsystem will read /etc/resolv.conf looking for parameters.

consider using only a local dns cache to speed up DNS. If a dnsmasq is considered too much you can directly use static /etc/hosts file for name resolution.

to speed up carrier link going up you should consider using spanning tree portfast on the switch link to that interface on you PI.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.