redhat-plumbers / dracut-fedora

🧢 dracut source-git for Fedora
GNU General Public License v2.0
1 stars 3 forks source link

No block devices when systemd is omitted #41

Closed h908714124 closed 2 days ago

h908714124 commented 1 week ago

The generated initrd cannot boot when the systemd module is omitted. During boot, the visible messages are:

Starting systemd-udevd version 256.7-1.fc41
dracut Warning: Cancelling resume operation. Device not found.

After waiting a bit more, we drop to the debug shell and see that there are no block devices:

dracut Warning: Could not boot.

dracut Warning: /dev/disk/by-uuid/b427d9b3-dec9-44aa-9fec-4dea1b5070ed does not exist

Generating "/run/initramfs/rdsosreport.txt"
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.

To get more debug information in the report,
reboot with the "rd.debug" added to the kernel command line.

Dropping to debug shell.

dracut:/# blkid
dracut:/#

Distribution used Fedora 41 (cannot reproduce in Fedora 40)

Dracut version 102-3.fc41 (the version currently in the Fedora 41 repo; could not reproduce with 102-2.fc40)

Init system systemd

To Reproduce

dracut --add "debug" --omit "plymouth systemd" --regenerate-all --force -v

Plymouth was omitted here, because it makes it harder to see the error message. The problem also occurs when we don't omit plymouth.

Here's a kickstart script to reproduce the problem (change disk name "nvme0n1" and url):

text
rootpw --plaintext changeit
reboot
ignoredisk --only-use=nvme0n1
bootloader
clearpart --all --initlabel
zerombr
part /boot --fstype=ext4 --size=1024
part /boot/efi --size=600
part swap --fstype=swap
part / --fstype=ext4 --size=16000
url --url="http://10.48.150.11/repo/fedora/linux/releases/41/Everything/x86_64/os"

%post 
dracut --add "debug" --omit "plymouth systemd" --regenerate-all --force -v
%end

Expected behavior It should be possible to build an initrd without the systemd module. Omitting systemd seems to be necessary for automatic disk unlocking with a password file.

pvalena commented 6 days ago

F42 is on 103. I forgot to push 103 to F41 as well. Will upgrade to v105 in Rawhide. There's no plan to upgrade stable releases further.

I will post here any further updates.

pvalena commented 6 days ago

If upstream supports that scenario, it should be no issue. There's no plan to diverge from upstream (and in Fedora we default to systemd).

h908714124 commented 4 days ago

I could now install dracut 105 on an arch system (from the "extra" repo), and generated an initrd with the following command:

dracut /boot/test-omit-systemd.img --add debug --omit --systemd

After updating grub, I can now boot into the resulting initramfs just fine. Hence, I could not reproduce the problem with upstream dracut. Upstream dracut does support the "scenario" (omitting systemd module). The dracut documentation explicitly says "systemd is an optional (not required) dependency".

Dracut upstream devs can't help us, because the problem does not exist upstream. Yet Fedora users have to use this outdated fork. On the other hand, you basically said it's an upstream issue. I feel a bit lost now, and I hope you don't mind me asking some obvious questions:

Upstream devs don't consider this a dracut issue, but a Fedora issue. They are right, the problem does not exist upstream. Now that it's confirmed that upstream dracut-105 does support the "scenario" (omitting systemd), I hope you find the time to answer the questions above.

h908714124 commented 2 days ago

Closing this as a duplicate of #16