Dracut is not generating correct crypttab

I recently added a harddrive which is luks encrypted and which I would like to automatically unlock and mount at boot.
I modified /etc/fstab and /etc/crypttab accordingly to add said device.
Then I ran dracut -f to generate the initramfs afresh. However, in the initramfs the included /etc/crypttab does not contain my newly added device. I was hoping that dracut would simply copy over the /etc/crypttab from the running system, but that seems not to be the case.
So, how can I modify the /etc/crypttab inside the initramfs? Preferably in a way which does not need manual action after every kernel update.

Ok, I am not sure what changed, but I did regenerate the initramfs multiple times, crying to force the correct /etc/crypttab (to no avail). However, all of a sudden everything started working as expected. My additional harddrive automatically gets unlocked and mounted to the correct location, even though it remains absent from the initramfs’ crypttab. Maybe related to systemd, as I did run systemctl daemon-reload a couple of times?

Anyways, fixed, closing now.

1 Like

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