dracutdevs / dracut

dracut the event driven initramfs infrastructure
https://github.com/dracutdevs/dracut/wiki
GNU General Public License v2.0
599 stars 399 forks source link

network-legacy gen-rules.sh failes due to missing initqueue/finished directory #2620

Open barathrm opened 7 months ago

barathrm commented 7 months ago

Describe the bug

Attached are the init.log and build logs.

init-sanitized.log

dracut.log

I've been trying to build zfsbootmenu with remote ssh access in a reproducible way using a debian:bookworm docker based workflow.

zfsbootmenu prohibits systemd dracut modules, so I've enabled network-legacy instead. hostonly is disabled/ set to no. zfsbootmenu calls dracut (see the logs), and finally produces a UEFI stub image which I test using qemu. I boot the image with ip=dhcp and rd.neednet=1, as well as some debug flags to increase dracut logging.

The image builds fine, however when booting the eth0 interface stays DOWN and no IP is assigned via dhcp.

I can then manually bring up the interface just fine by calling dhclient eth0.

Looking /run/initramfs/init.log I see

//lib/dracut/hooks/pre-udev/60-net-genrules.sh: line 120: /lib/dracut/hooks/initqueue/finished/wait-network.sh: No such file or directory

Fix :question:

If I add mkdir -p "$hookdir"/initqueue/finished just before that line, similar to network-manager and connman modules and rebuild the image, the interface comes up automatically at boot, as expected.

Distribution used

Docker version of debian bookworm.

Dracut version

059-4

Init system

? systemd when generating dracut, but systemd is omitted in dracut's conf files.

To Reproduce

I can share my dockerfile is necessary, but, without being a dracut expert or experienced user at all, I wonder how network-legacy can work if neither connman or network-manager modules are used and the finished dir is never created?

Expected behavior

I'd have expected the eth0 interface to be brought up properly by network-legacy.

LaszloGombos commented 7 months ago

@barathrm

Thanks for the report.

wonder how network-legacy can work if neither connman or network-manager

network-legacy does not have a dependency on connman or on network-manager. There are several options to get networking working, network-legacy is simply one of them. This is expected.