2 Dracut bugs!

I wrote a custom hook for Dracut that requires dm and crypt modules.

1st bug:
/usr/lib/dracut/modules.d/90crypt/module-setup.sh contains this line “instmods dm_crypt” with an underscore. There’s no such module in Dracut. There are dm and crypt modules as you can see by running “dracut --list-modules.” So I don’t know what 90crypto is for, but it’s misleading as a reference and is broken right now.

2nd bug:
When I do “instmods dm crypt” without an underscore in my custom module and run dracut -f it does NOT pick it up and does not include these modules in the generated initramfs, as is evidenced also by the output of dracut -f -v (verbose run). I am only able to include these two modules by adding -a "dm crypt" flag to the dracut -f command.

Please report bugs to Fedora. See Using Bugzilla :: Fedora Docs

Not even a conjecture? It’s a core functionality of Fedora since everyone seems to be encrypting their hard drives nowadays.
I’m also encountering an error with cryptsetup run from Dracut’s emergency shell now…same cryptsetup executes fine on a Fedora workstation but gives a cryptic error from the emergency shell. Where can I post the output of that verbose debug stuff?

If you want to get it fixed, https://bugzilla.redhat.com/ is where the maintainers looks for bug reports. Some maintainers are good at it, some not so much.

By the way, it looks like a genuine bug, so do report it.

instmods installs kernel modules, it is not about dracut modules. dm_crypt is the name of a kernel module, see modinfo dm_crypt.

2 Likes

Thank you. But. The problem persists: dracut -f does NOT install dm_crypt kernel module from instmods dm_crypt included in installkernel() in module-setup.sh (even though the module does install itself). When I run dracut with -d dm_crypt I do see dm_crypt.ko.xz in the initramfs by running lsinitrd blah | grep dm-crypt.

Is this a bug?

If you see dm_crypt.ko.xz in the initramfs, then instmods dm_crypt did what it is supposed to do. Note that there is a difference between “installing” a kernel module (in the initramfs) and “loading” a kernel module (into RAM) at runtime. For the latter, you might need to run, e.g., modprobe dm_crypt (use lsmod to see what kernel modules are currently loaded in memory and active).

Ok, well, one problem I had was that all custom hook scripts needed to be executible so needed to be chmod +x. Another problem was which hooks to use. It seemed pre-trigger was good enough but in reality needed to use theinitqueue/finished. It’s all working now, thank you. Dracut is fantastic, just wish there was better documentation with examples and tutorials.