Comment # 6 on bug 1185512 from
(In reply to Thomas Blume from comment #5)
...

> Yes, dracut doesn't copy /etc/crypttab, it only parses for the devices
> needed and writes them into the initrd crypttab.

Thanks for explaing; however I wonder whether that is worth the effort: Is it
to save a few bytes, or is it to avoid some problems? Would any devices fount
in crypttab be activated through initrd?

...

> So, the systems crypttab and the initrd crypttab are not identical.
> You can double check whether it works correctly, if you add:
> 
> set -x
> 
> at the beginning of the module-setup.sh file, then run mkinitrd and check
> the output for the entries written.

With the info given, I could verify that the crypttabs are not conflicting at
least:
# lsinitrd -f /etc/crypttab >/tmp/a
# diff -uw /etc/crypttab /tmp/a
--- /etc/crypttab    2021-04-30 18:35:43.643070835 +0200
+++ /tmp/a    2021-05-12 07:56:49.674237743 +0200
@@ -1,4 +1,2 @@
 cr-swap-1  /dev/nvme0n1p3  none discard
 cr-sys-1  /dev/nvme0n1p4   none discard
-cr-home   /dev/nvme0n1p5   none discard
-#cr_swap   UUID=b1d64f3d-697e-449c-9cf1-ee03990785ae

What still is surprising in comment 0 is that the crypttab in initrd seems
older than that from /etc, even after bebuilding initrd.
I re-tried:

Before:
# lsinitrd |grep crypttab
-rw-r--r--   1 root     root           75 Apr 29 08:12 etc/crypttab
# ll /etc/crypttab
-rw------- 1 root root 173 Apr 30 18:35 /etc/crypttab

After mkinitrd:
# lsinitrd |grep crypttab
-rw-r--r--   1 root     root           75 Apr 29 08:12 etc/crypttab

Once again, just to verify:
# mkinitrd 2>&1 |grep -i crypt
dracut: *** Including module: crypt ***
#


You are receiving this mail because: