Add the key file to LUKS

I read en.opensuse.org/SDB:Encrypted_root_file_system.

cat /etc/crypttab
cr-auto-1  UUID=38298dab-1163-4bb6-8aba-6df3ea9dca16  none  x-initrd.attach

The webpage says add the key file in the third column, I don’t know what is exactly like and here is my modified.

cr-auto-1  UUID=38298dab-1163-4bb6-8aba-6df3ea9dca16  cr_sda1 UUID=38298dab-1163-4bb6-8aba-6df3ea9dca16 /.root.key  x-initrd.attach

Perhaps it is wrong and looks strange, what it would be like?

The third field specifies an absolute path to a file with the encryption key.

https://www.freedesktop.org/software/systemd/man/crypttab.html

The wiki page you reference shows you example of crypttab line with the third column containing absolute path of file with the encryption key. What is not clear in this example?

Try:

cr-auto-1  UUID=38298dab-1163-4bb6-8aba-6df3ea9dca16      /.root.key  x-initrd.attach

Add the text in the new line or replace the original line with the text? Because the operations are about booting system or partition, if I made something wrong broken my boot, can I have a way to rescue or rollback my system to original?

Replace the line that you had.

Then run “mkinitrd” (as root, of course). Then see if it works.