Talk:Dracut

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
Before creating a discussion or leaving a comment, please read about using talk pages. To create a new discussion, click here. Comments on an existing discussion should be signed using ~~~~:
A comment [[User:Larry|Larry]] 13:52, 13 May 2024 (UTC)
: A reply [[User:Sally|Sally]] 21:22, 26 March 2025 (UTC)
:: Your reply ~~~~

rd.luks.name in cmdline

Talk status
This discussion is still ongoing.

When dracut decrypts a LUKS-encrypted volume it expects /etc/crypttab to contain its name [1]. However, this file is not used by OpenRC [2] and duplicating configs just for dracut can be wasteful.

A short solution would be to add to dracut.conf:

kernel_cmdline="rd.luks.name=<crypto_LUKS UUID>=root root=/dev/mapper/root"

This way, UUID is only mentioned once. Contrary to [3] this works (I use it). However, rd.luks.name is documented for systemd [4], but not for dracut. Can I add this as a small "LUKS" section for OpenRC people?

[1] https://bugs.gentoo.org/show_bug.cgi?id=592686 (comment #11)
[2] https://forums.gentoo.org/viewtopic-p-8788256.html (post #2)
[3] https://github.com/dracutdevs/dracut/issues/1566
[4] https://www.freedesktop.org/software/systemd/man/latest/systemd-cryptsetup-generator.html

UncleTed (talk) 14:30, 3 January 2024 (UTC)

I wasn't aware of rd.luks.name, I've been using rd.luks.uuid with /etc/crypttab; although, I use the absolute path instead of the UUID in the crypttab file.
I haven't tested external drives, but that will be something I'll be approaching soon.
In general, if you think this will help people, go ahead and make the changes (as stated in the Gentoo contributor guide). If you're not sure, post your proposed changes here before you make the changes with a proposal box
Proposed changes - Please make edits here until a final revision is agreed upon.

like this
FlyingBullets (talk) 19:52, 3 March 2025 (UTC)

Explain elogind in further detail

Talk status
This discussion is still ongoing as of 2025-03-03.

When I get to the Elogind section, it tells me to add a line to Dracut when using elogind:

"To fully support elogind, an extra command should be added to the initramfs via the dracut configuration:"

FILE /etc/dracut.conf.d/elogind.conf
install_items+=" /lib64/elogind/elogind-uaccess-command "

Can someone explain in further detail what this actually does and why we need it? I've ran Dracut without this extra line and haven't noticed any differences.

FlyingBullets (talk) 20:00, 3 March 2025 (UTC)

systemd dependent modules

Talk status
This discussion is still ongoing as of 2025-03-17.

I've been installing a few modules that depends on the network module of dracut, recently. There was a few issues, the most importants was the one related to Dracut#NFS_boot with arping and iputils, and one that was related to this issue on github/dracutdevs/dracut/network module has transitive dependency on systemd #1756.

Devs doesn't seems to be interested on resolving this issue, and patching the thingy looks pretty complicated.

I believe we could had a section, or a precision, on how to use some modules, like network, that normally resolve on a systemd dependent module, but are still usable without it.

For example my fix looks like this (similar to forum/gentoo/Dracut + OpenRC without SystemD still possible? [SOLVED]) to be able to use NFS and ssh-crypt.

In dracut.conf.d/network.conf

# Had to merge net-misc/dhcp for network-legacy to work.
omit_dracutmodules+=" systemd systemd-networkd "
add_dracutmodules+=" network-legacy "

Using dhcp isn't necessary what people needs, so this configuration has certainly some flows. That's why I post it here, before beginning work on the main page.