[svlug] Inits (was: On the process of picking up systemd)

Rick Moen rick at svlug.org
Fri Jan 16 00:24:51 PST 2015


Steve Litt wrote:

> You have me at a disadvantage because I don't think I've ever seen a
> system boot indeterminately, or at least not in the last 10 years. I've
> never seen eth0 and eth1 switch, and the machine I've been doing all
> this testing on has both.

I've made the same observation to people describing the problem to me,
except I tend to say 'never in 20 years' instead of just 10.  ;->
The several times I had that conversation with people much more versed in
dynamic kernel event-handling than I, usually on Don Marti's linux-elitists
mailing list, were frustrating because my interlocutors seem to have
concluded I was just being contrary in saying 'What problem?'

Anyway, truth to tell, I'm likewise at a disadvantage in attempting to
intelligently discuss this problem, being both late to the party and having
through either luck or careful avoidance of problem scenarios not seen the
referenced problems.

Come to think of it, it's quite possible that one of the things that's
prevented me from seeing it is udev.  One sees things like this in
/etc/udev/rules.d/70-persistent-net.rules, obviously intended to ensure that
a specified MAC address always ends up as eth0:

# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:aa:b2:05", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

I.e., among other consequences, my thoughts of adopting a 'static /dev was
never broken' stance may have been unrealistic.  Not sure yet, but am
leaning that way.

> If all this kernel event stuff is that indeterminate, we have bigger
> fish to fry, because the initramfs does a lot of stuff long before it
> knows whether /sbin/init is Epoch, runit, systemd, or /bin/bash.

It's my understanding that this is precisely why initramfs has a built-in
hook to execute /sbin/hotplug from the RAMdisk immediately, to pick up
relevant kernel events for, in particular, loading firmware images necessary
to iniitalising network interfaces.  

Anyway, like you I'm a bit at a loss to produce indeterminate bootup
sequences -- at least, in Linux systems that comply with my prejudices,
e.g., avoiding that silliness of mounting /home from a USB drive -- so I
cannot say 'Here, look at this [link] session data that proves that an
event-driven handler is required for at least the early phase of init'.  
However, reading the 2011-2012 technical discussions from before the subject
devolved into verbal warfare, I see broad consensus that such is the case,
FWIW.





More information about the svlug mailing list