Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
barathrm opened this issue Feb 9, 2024 · 1 comment · May be fixed by #2623
Open

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

barathrm opened this issue Feb 9, 2024 · 1 comment · May be fixed by #2623
Labels
bug Our bugs

Comments

@barathrm
Copy link

barathrm commented Feb 9, 2024

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 ❓ **

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.

@barathrm barathrm added the bug Our bugs label Feb 9, 2024
@LaszloGombos
Copy link
Collaborator

@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.

aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this issue Feb 12, 2024
… dir

The `remove_hostonly_files` function should only remove (as its name suggests)
hostonly configuration and files. The initqueue/finished scripts considered as
hostonly that must be removed are added via `wait_for_dev`. But, the `hookdirs`
are always created at build time, and should not be removed.

This patch also allows to remove the `mkdir` workaround in the `network-manager`
module (copied-pasted into the `conmman` module after), and avoids having to add
it tree-wide in many missing places.

Fixes 87e90d7
Fixes dracutdevs#2620
aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this issue Feb 12, 2024
… dir

The `remove_hostonly_files` function should only remove (as its name suggests)
hostonly configuration and files. The initqueue/finished scripts considered as
hostonly that must be removed are added via `wait_for_dev`. But, the `hookdirs`
are always created at build time, and should not be removed.

This patch also allows to remove the `mkdir` workaround in the `network-manager`
module (copied-pasted into the `connman` module after), and avoids having to add
it tree-wide in many missing places.

Fixes 87e90d7
Fixes dracutdevs#2620
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Our bugs
Projects
None yet
2 participants