View previous topic :: View next topic |
Author |
Message |
nagmat84 Apprentice
Joined: 27 Mar 2007 Posts: 226
|
Posted: Fri May 03, 2024 11:53 am Post subject: Required Dracut modules for Systemd with DM Crypt |
|
|
I try to enable RootFS encryption for my system with FIDO2 support. I am following the guides. I have a self-compiled kernel with all relevant drivers compiled in statically. I am using UEFI boot with rEFInd as the boot manager. In the past, the the InitRAM disk has been serving a rather nominalistic purpose to provide the firmware blobs for my AMDGPU card which were required before root FS access.
Consequently, my Dracut configuration was very minimalist and only used the following Dracut modules Code: | base dash plymouth resume rootfs-block | This led to the following list of Dracut modules due to automatic dependency resolution Code: | base dash drm fs-lib plymouth resume rootfs-block udev-rules |
Following the guides above, I added the Dracut modules "crypt" and "fido2" to the list. However, this resulted in an unbootable, broken system. During boot I got the following error messages- [FAILED] Failed to start Virtual Console Setup
- [ *** ] A start job is running for /dev/sda5 (1min 15s / unlimited)
(Note, /dev/sda5 is my swap partition.)I found out that adding "crypt" and "fido2" pulled in some additional modules due to dependency resolution, namely Code: | base crypt dash dm drm fs-lib fido2 plymouth resume rootfs-block systemd systemd-udevd udev-rules | This got me suspicious whether some more dependencies were missing, in particular related to SystemD. Hence, as an investigative step I ran Dracut without any options at all to see what modules Dracut pulls in by default. The following modules turned up Code: | dracut-systemd i18n kernel-modules kernel-modules-extra shutdown systemd-initrd terminfo | I added all these modules to the list and - surprise, surprise - I got a working system again. (But it also doubled my initramfs in size.)
This leads to a couple of questions:- What module was missing exactly? (Yes, I could find it myself by a recursive search-and-try attempt, leaving out one half of the modules and see when it breaks.)
- Should this be considered a bug and reported? Obviously, the problem seems to originate from a missing dependency.
- Is there any list or guide which Dracut module does what and when it is needed? I had a look at /usr/lib/dracut/modules.d and there seem to be a lot of modules especially around systemd-*. How do I know when I should include which module?
|
|
Back to top |
|
|
waldolemmer n00b
Joined: 22 May 2024 Posts: 1
|
Posted: Wed May 22, 2024 9:05 am Post subject: |
|
|
I believe "Failed to start Virtual Console Setup" is related to the i18n module, or at least the file /etc/vconsole.conf.
I have no idea what module would be needed for your swap partition. However, I can offer a truncated version of my dracut.conf.d:
Code: | hostonly="yes"
add_dracutmodules+=" resume "
omit_dracutmodules+=" biosdevname clevis-pin-sss i18n kernel-modules kernel-modules-extra kernel-network-modules memstrack terminfo usrmount "
install_items+=" /usr/lib/systemd/system/systemd-hibernate-resume.service "
# Might not be necessary with i18n module. Further testing needed.
install_items+=" /etc/vconsole.conf "
|
These are the modules that get included:
Code: | base clevis clevis-pin-sss clevis-pin-tpm2 crypt dm done dracut-systemd drm fs-lib i18n plymouth resume rootfs-block shutdown systemd systemd-initrd udev-rules
|
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|