dbus-broker module fails to be generated
Describe the bug When trying to add "network-manager" dracut module, initramfs generation is halted because "dbus-daemon" module is not available. Dbus-daemon is not used on latest linux distributions anymore and was replaced by Dbus-broker instead. When trying to add "dbus-broker" to the list of dracut modules, the module fails to be generated correctly when building the initramfs.
Distribution used Fedora Server 41 Fedora Server 42 (latest development status)
Dracut version dracut 103-3.fc42
Init system systemd
To Reproduce, Part 1 sudo nano /etc/dracut.conf.d/exampleconfigfile.conf: dracutmodules+=" network-manager "
sudo dracut --regenerate-all --force --verbose
dracut[I]: Executing: /usr/bin/dracut --kver=6.13.6-200.fc41.x86_64 --force --verbose
dracut[E]: Module 'dbus' depends on module 'dbus-daemon', which can't be installed
dracut[E]: Module 'network-manager' depends on module 'dbus', which can't be installed
dracut[E]: Module 'network-manager' cannot be installed.
To Reproduce, Part 2 sudo nano /etc/dracut.conf.d/exampleconfigfile.conf: dracutmodules+=" dbus-broker " dracutmodules+=" network-manager "
sudo dracut --regenerate-all --force --verbose
dracut[I]: Executing: /usr/bin/dracut --kver=6.13.6-200.fc41.x86_64 --force --verbose
dracut[I]: *** Including module: bash ***
dracut[I]: *** Including module: systemd ***
dracut[I]: *** Including module: systemd-sysusers ***
dracut[I]: *** Including module: nss-softokn ***
dracut[I]: *** Including module: dbus-broker ***
sed: can't read /var/tmp/dracut.BPwiG1/initramfs/usr/lib/systemd/system/systemd-tmpfiles-setup.service: No such file or directory
dracut[I]: *** Including module: dbus ***
dracut[I]: *** Including module: network-manager ***
dracut[I]: *** Including module: net-lib ***
dracut[I]: *** Including module: kernel-network-modules ***
dracut[I]: *** Including module: udev-rules ***
dracut[I]: *** Including module: base ***
dracut[I]: *** Including modules done ***
dracut[I]: *** Installing kernel module dependencies ***
dracut[I]: *** Installing kernel module dependencies done ***
dracut[I]: *** Resolving executable dependencies ***
dracut[I]: *** Resolving executable dependencies done ***
dracut[I]: *** Hardlinking files ***
dracut[I]: *** Hardlinking files done ***
dracut[I]: *** Generating early-microcode cpio image ***
dracut[I]: *** Constructing AuthenticAMD.bin ***
dracut[I]: *** Store current command line parameters ***
dracut[I]: *** Stripping files ***
dracut[I]: *** Stripping files done ***
dracut[I]: *** Creating image file '/boot/efi/xxxxxxxxxxxxxxxxxxxxxxxxxxx/6.13.6-200.fc41.x86_64/initrd' ***
dracut[I]: Using auto-determined compression method 'zstd'
dracut[I]: *** Creating initramfs image file '/boot/efi/xxxxxxxxxxxxxxxxxxxxxxxxxxx/6.13.6-200.fc41.x86_64/initrd' done ***
The generation of dracut module "dbus-broker" fails. Process continues to build the initrd. When trying to reboot, the system becomes unbootable.
When trying to update via sudo dnf reinstall kernel-core, the error message is at least vividly marked in color and therefore the user prevented from being tempted to reboot.
Expected behavior I. Dracut should build the module "dbus-broker" without an error. II. Dracut should choose the module "dbus-broker" over the old "dbus-daemon", when trying to build with the module "network-manager" enabled.
Additional context Additional context: NetworkManager from inside the initial ramdisk system is needed for unlocking a LUKS-encrypted system remotely via the project "dracut-sshd" from gsauthof. His project references not to use NetworkManager, but systemd-networkd instead. At the same time, he states his project is network agnostic, so I thought I'd give it a shot. Enabling NetworkManager in Dracut would enable the remote unlocking of LUKS-encrypted systems even when they are using wifi to connect to the home network.
Please try the following instead
add_dracutmodules+=" dbus-broker network-manager "
The development of dracut v103+ is not in this repository, it is in https://github.com/dracut-ng/dracut-ng
Thank you very much - that did it! :)
There seems to be a difference between dracutmodules+=" modulename " and add_dracutmodules+=" modulename ", your command works correctly.
The bug can be closed. Unrelated to the problem, since I've got an expert for Dracut here:
I don't seem to be able to get my wired network up though. I used add_drivers+=" atlantic " for my Aquantia AQC100 SFP+ NIC (connected via DAC cable to my router, which works fine after boot), and ip=enp1s0:dhcp as kernel boot parameter. This automatically generates a new connection while in initrd, which I can confirm since NetworkManager keeps these after boot, so I can find it under /run/NetworkManager/system-connections/enp1s0.nmconnection. It just tells the NIC to listen for a DHCP server. So the kernel command is executed correctly. Problem is, I can't even ping the host while in initrd, and my router shows the link as unconnected. I'm therefore suspecting a driver problem, maybe?
Is the following line correct: add_drivers+=" atlantic "?
This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.