We purport to support booting off an encrypted LVM PV, may as well test it.
;
;
EOF
-cryptsetup -q luksFormat /dev/sda1 <<EOF
-test
-EOF
-cryptsetup luksOpen /dev/sda1 dracut_crypt_test <<EOF
-test
-EOF
+echo -n test >keyfile
+cryptsetup -q luksFormat /dev/sda1 /keyfile
+echo "The passphrase is test"
+cryptsetup luksOpen /dev/sda1 dracut_crypt_test </keyfile
lvm pvcreate -ff -y /dev/mapper/dracut_crypt_test
lvm vgcreate dracut /dev/mapper/dracut_crypt_test
lvm lvcreate -l 100%FREE -n root dracut
test/run-qemu -hda test/root.ext2 -m 512M -nographic \
-net nic,macaddr=52:54:00:12:34:57 -net socket,mcast=230.0.0.1:1234 \
-kernel /boot/vmlinuz-$(uname -r) \
- -append "root=/dev/sda rw console=ttyS0,115200n81 $APPEND" \
+ -append "root=/dev/dracut/root rw console=ttyS0,115200n81 $APPEND" \
-initrd test/initramfs.testing