Bug 2321331 - network-legacy removed from dracut-network package
Summary: network-legacy removed from dracut-network package
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: 40
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: dracut-maint-list
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-10-23 19:11 UTC by robin
Modified: 2025-04-28 14:02 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
dracut debug output (359.32 KB, text/plain)
2024-11-07 11:10 UTC, robin
no flags Details

Description robin 2024-10-23 19:11:47 UTC
The network-legacy module has been removed from the dracut-network package. https://src.fedoraproject.org/rpms/dracut/c/a1ebaf27b616010bc672be9409ff42b8234b008d

This seems to break booting from NBD, I am unable to generate an initramfs containing the nbd module:

# dracut --no-kernel --modules "nbd" initramfs.img
dracut[E]: No '/dev/log' or 'logger' included for syslog logging
dracut[E]: Module 'network' depends on 'network-legacy', which can't be installed
dracut[E]: Module 'nbd' depends on 'network', which can't be installed
dracut[E]: Module 'nbd' cannot be installed.

This is all new to me so I could very well be something wrong. Am I? Is there a reason the network-legacy module was removed? 


Reproducible: Always

Steps to Reproduce:
mkdir /fedora
for i in /proc /sys; do mkdir /fedora$i; mount --bind $i /fedora$i; done
dnf --releasever=40 --installroot=/fedora groupinstall core
dnf --installroot=/fedora install dracut-network nbd
chroot /fedora
dracut --no-kernel --modules "base network nbd" initramfs.img

Comment 1 Lukáš Nykrýn 2024-10-25 11:44:07 UTC
I think in that version of dracut some detection in the "meta" modules is wrong.

Can you try explicitly setting NM and dbus-broker? 
dracut --no-kernel --modules "base network nbd network-manager dbus-broker" initramfs.img

Comment 2 Lukáš Nykrýn 2024-10-25 13:55:06 UTC
Oh, and to answer your question, we no longer support the old network scripts; we use NetworkManager instead.

Comment 3 robin 2024-10-27 09:14:54 UTC
Thanks for the reply, the command you provided results in the following error message:

dracut[E]: Module 'nbd' cannot be installed.

It seems like nbd has a dependency on network-legacy specifically?

Comment 4 Lukáš Nykrýn 2024-10-29 14:29:47 UTC
https://github.com/dracut-ng/dracut-ng/blame/main/modules.d/95nbd/module-setup.sh#L22

The dependency is correct, it is set to the network meta module.

Can you rerun it with the --debug option? It probably fails in the check function, and from the output it should be clearly visible why.

Comment 5 robin 2024-11-07 11:10:42 UTC
Created attachment 2056206 [details]
dracut debug output

Output of:
sudo dracut --debug --kernel-image /mnt/boot/http/nbd/vmlinuz --modules "nbd" --compress zstd --force initrd.img > output.txt 2>&1

I cannot make sense of the debug output, so I hope someone else can.

Comment 6 Laszlo 2024-11-19 22:24:11 UTC
Dracut upstream here...

> dracut --no-kernel --modules "nbd" initramfs.img

Workaround is to use --add instead of --modules.

--modules is a footgun - see https://github.com/dracut-ng/dracut-ng/commit/eb1ae6c4f83663bfe87c835feaa649f272d780bb

If you insist on using --modules there is an upstream fix - https://github.com/dracut-ng/dracut-ng/commit/c4b57722fbe65dce49105ad264dde2c2bbfc8a41

This would have been very easy to find if Fedora (at least Rawhide) would follow upstream development. Upstream has released v105 over a month ago, which is already packaged up in Arch, Gentoo, Debian, Ubuntu and even Void/Alpine/Slackware.

Comment 7 Aoife Moloney 2025-04-28 14:02:40 UTC
This message is a reminder that Fedora Linux 40 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 40 on 2025-05-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '40'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 40 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.


Note You need to log in before you can comment on or make changes to this bug.