Gentoo Archives: gentoo-user

From: Mike Gilbert <floppym@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] udev or Gentoo issue?
Date: Sat, 17 May 2014 18:54:50
Message-Id: CAJ0EP40cF5CqTObF8Kd9qSRnnCoZyyxU3KpLK51SmNo+NGydfg@mail.gmail.com
In Reply to: Re: [gentoo-user] udev or Gentoo issue? by Grant
1 On Sat, May 17, 2014 at 2:39 PM, Grant <emailgrant@×××××.com> wrote:
2 >>> I have this:
3 >>>
4 >>> # dmesg | grep enp
5 >>> [ 4.297862] systemd-udevd[659]: renamed network interface eth0 to enp0s20u2u1
6 >>> [ 4.778289] systemd-udevd[660]: renamed network interface eth0 to enp0s20u2u2
7 >>> [ 6.496193] ax88179_178a 3-2.1:1.0 enp0s20u2u1: ax88179 - Link status is: 1
8 >>> [ 7.905393] ax88179_178a 3-2.2:1.0 enp0s20u2u2: ax88179 - Link status is: 1
9 >>> #
10 >>>
11 >>> That doesn't tell us when the network initscripts tried and failed to
12 >>> start but this from /var/log/messages/everything/current shows the
13 >>> first time in the boot sequence that a dependent service failed to
14 >>> start because of the networking failure so it should be before this:
15 >>>
16 >>> [kernel] [ 0.787433] serio: i8042 AUX port at 0x60,0x64 irq 12
17 >>> [/etc/init.d/unbound] ERROR: cannot start unbound as net.enp0s20u2u1
18 >>> would not start
19 >>> [kernel] [ 0.792081] rtc_cmos 00:04: alarms up to one month, y3k,
20 >>> 242 bytes nvram, hpet irqs
21 >>>
22 >>
23 >> Yeah, so I think the kernel is detecting your network card after udev
24 >> has already started.
25 >>
26 >> One interesting experiment would be to delay the boot process to allow
27 >> the kernel additional time to detect devices. Adding rootdelay=10 to
28 >> your kernel command line should do the trick, unless you are using
29 >> some broken initramfs.
30 >
31 >
32 > I tried that and it works great which I think confirms our suspicions
33 > that the kernel is detecting my network cards after udev has already
34 > started. If I remove rootdelay=10 and I do this:
35 >
36 > # ln -s /dev/null /etc/udev/rules.d/90-network.rules
37 >
38 > the network interfaces fail to come up which is the same thing I've
39 > experienced with rc_hotplug="net.*".
40 >
41
42 Yeah, so this is not solvable using service dependencies. You will
43 either need to make that boot delay permanent, or rely on the hotplug
44 functionality to start the net.en* services. In the latter case, you
45 should remove them from the default runlevel.
46
47 You may want to define rc_need="!net" to prevent init scripts that
48 "need net" from automatically starting the net.* services. For most
49 services this is fine, but it will obviously break things like ntpdate
50 which actually need a usable network connection.

Replies

Subject Author
Re: [gentoo-user] udev or Gentoo issue? Grant <emailgrant@×××××.com>