On the lines of this thread: Unlocking LUKS with USB key - method - seeking help to improve, I am trying to automatically boot a system with an encrypted drive by pointing it to a keyfile on a CD-ROM. I have revived this laptop to use it as a file server. This would enable me to boot the server when away from home. The reason behind trying the CD-ROM approach is that the USB port contacts are loose and proving to be unreliable.

The boot process appears to go past the point where the password prompt comes up, but fails like so shortly after. Don't have a clue where to start investigating. Any pointers? I'm afraid, I might need a bit of handholding with the commands in this area.

Code:
dracut Warning: unable to process initqueue
dracut Warning: /dev/mapper/vg_cpaqn610c-lv_root does not exist
dracut Warning: /dev/vg_cpaqn610c/lv_root does not exist
dracut Warning: /dev/vg_cpaqn610c/lv_swap does not exist

Dropping to debug shell.

dracut:/#
1. Made a keyfile
# dd if=/dev/urandom of=secretkey bs=512 count=4

2. Burnt the keyfile onto a CD with a label CDRW

3. Added the keyfile to slot 1
cryptsetup luksAddKey /dev/sda2 secretkey --key-slot 1

This step asked for the passphrase, but there was not acknowledgement to confirm that it successfully added the keyfile.

Verified like so
cryptsetup luksDump /dev/sda2
Code:
Key Slot 0: ENABLED
	Iterations:         	32675
	Salt:               	XX XX XX XX XX XX XX XX XX
	Key material offset:	8
	AF stripes:            	4000
Key Slot 1: ENABLED
	Iterations:         	40930
	Salt:               	XX XX XX XX XX XX XX XX XX
	Key material offset:	512
	AF stripes:            	4000
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED
Booted up with this additional grub argument
rd.luks.key=/secretkey:LABEL=CDRW

Code:
#ls -l /dev/disk/by-label/
total 0
lrwxrwxrwx. 1 root root 9 Jul  3 00:53 CDRW -> ../../sr0
Code:
#ls -l /dev/disk/by-id/
total 0
lrwxrwxrwx. 1 root root  9 Jul  3 00:53 ata-Compaq_DVD-ROM_GDR-8081N -> ../../sr0
lrwxrwxrwx. 1 root root  9 Jul  3 00:53 ata-HTS424040M9AT00_MPA242Q2GPAMTB -> ../../sda
lrwxrwxrwx. 1 root root 10 Jul  3 00:53 ata-HTS424040M9AT00_MPA242Q2GPAMTB-part1 -> ../../sda1
lrwxrwxrwx. 1 root root 10 Jul  3 00:53 ata-HTS424040M9AT00_MPA242Q2GPAMTB-part2 -> ../../sda2
lrwxrwxrwx. 1 root root 10 Jul  3 00:53 dm-name-luks-26290b8b-47aa-47c1-8d81-23a197d2df7a -> ../../dm-0
lrwxrwxrwx. 1 root root 10 Jul  3 00:53 dm-name-vg_cpaqn610c-lv_root -> ../../dm-2
lrwxrwxrwx. 1 root root 10 Jul  3 00:53 dm-name-vg_cpaqn610c-lv_swap -> ../../dm-1
lrwxrwxrwx. 1 root root 10 Jul  3 00:53 dm-uuid-CRYPT-LUKS1-26290b8b47aa47c18d8123a197d2df7a-luks-26290b8b-47aa-47c1-8d81-23a197d2df7a -> ../../dm-0
lrwxrwxrwx. 1 root root 10 Jul  3 00:53 dm-uuid-LVM-pbRVQKyYwcJMsZu8jo0zyIG2gqoEA0BjCLhZjTj5AD1Z4haRz0d1I486PJ26adA5 -> ../../dm-2
lrwxrwxrwx. 1 root root 10 Jul  3 00:53 dm-uuid-LVM-pbRVQKyYwcJMsZu8jo0zyIG2gqoEA0BjvdB8vDf879SckXIPRhkXYTkWfq9Ngisv -> ../../dm-1