Hi,

On Sun, 16 Aug 2020 at 12:31:38 -0700, Forest wrote:
> When it fails, I see this message repeated several times, scattered
> between various other messages on the serial console:
> 
> ipconfig: no devices to configure
> 
> Finally, this message appears:
> 
> /scripts/init-premount/dropbear: .: line 279:
> can't open '/run/net-*.conf': No such file or directory

This comes from initramfs-tools's configure_networking()
https://salsa.debian.org/kernel-team/initramfs-tools/-/blob/v0.137/scripts/functions#L279

> However, editing /usr/share/initramfs-tools/scripts/init-premount/dropbear
> does get it working. Making that script wait for a /run/net-*.conf file to
> appear before it calls configure_networking appears to be a solution.

No idea if that's a valid workaround, but I don't think that's something
to implement in dropbear-initramfs: presumably NFS rootfs are affected
as well on your hardware, in which case it has nothing do with
dropbear-initramfs (nor cryptsetup/LUKS).

> Based on this workaround and the fact that the aforementioned error messages
> are interleaved with other boot messages, it looks to me like dropbear's
> init-premount script is being run in parallel with driver and network setup,
> and often executing before the rk3399's onboard ethernet has a chance to
> finish initializing.

configure_networking() is run in the backround, yup (and the dropbear
server is started afterwards if successful) see #806884.  But that's done
at init-premount stage, after udev and the required modules are loaded.
Is your network interface brought up by a script in init-premount or
local-top?

Please also try the attached patch (with and without delay).  If this
alone doesn't help BUT the addition of some delay *before* running
configure_networking() fixes the race condition, then this bug should
probably reassigned to initramfs-tools.

Cheers,
-- 
Guilhem.

Attachment: signature.asc
Description: PGP signature

Reply via email to