Converting to dracut from mkinitcpio with LUKS encrypted file systems

Hello: I was reading the guide that appears in Dracut Discovery in which they indicate that “If you have any LUKS encrypted file systems, you must create a dracut drop-in config for that. Create the file /etc/dracut.conf.d/encryption.conf with the following content”. However, in Archwiki they indicate “dracut is easy to use and typically does not require user configuration, even when using non-standard setups, like LVM on LUKS”.

This are my partitions:

Drives:
Local Storage: total: 476.94 GiB used: 351.69 GiB (73.7%)
ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB512HBJQ-000H1
size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 serial: temp: 58.9 C
Partition:
ID-1: / size: 476.43 GiB used: 351.69 GiB (73.8%) fs: btrfs dev: /dev/dm-0
mapped: luks-eea88dce-052a-4f4c-a329-6dcdfa0fcedf
ID-2: /boot/efi size: 511 MiB used: 748 KiB (0.1%) fs: vfat
dev: /dev/nvme0n1p1
ID-3: /home size: 476.43 GiB used: 351.69 GiB (73.8%) fs: btrfs
dev: /dev/dm-0 mapped: luks-eea88dce-052a-4f4c-a329-6dcdfa0fcedf
ID-4: /var/log size: 476.43 GiB used: 351.69 GiB (73.8%) fs: btrfs
dev: /dev/dm-0 mapped: luks-eea88dce-052a-4f4c-a329-6dcdfa0fcedf
Swap:
ID-1: swap-1 type: zram size: 9.62 GiB used: 1.28 GiB (13.3%) priority: 100
dev: /dev/zram0

My question is if it is necessary to create the encryption.conf file as it appears in Discovery

If memory serves, needing to add the device is no longer needed.

However, if you are using a keyfile to unlock the device, you should add that keyfile if the initrd is being stored in an encrypted location.

Thank you Dalto for your quick response. I think that in my case, since I installed EndeavourOs in 2021 on a laptop encrypting the entire system, I will need to create the file /etc/dracut.conf.d/encryption.conf with the following content: install_items+=" /etc/crypttab /crypto_keyfile.bin "
I don’t use physical swap but zram, so I guess I don’t have to do anything else.

I wish you a good day

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.