We purport to support booting off an encrypted LVM PV, may as well test it.
---
modules.d/00test/create-root.sh | 10 ++++------
test/make-test-root | 2 +-
test/test-initramfs | 2 +-
3 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/modules.d/00test/create-root.sh b/modules.d/00test/create-root.sh
index ce9f40b..c756f4f 100755
--- a/modules.d/00test/create-root.sh
+++ b/modules.d/00test/create-root.sh
@@ -5,12 +5,10 @@ sfdisk /dev/sda <<EOF
;
;
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
diff --git a/test/make-test-root b/test/make-test-root
index d79153d..84f2105 100755
--- a/test/make-test-root
+++ b/test/make-test-root
@@ -25,5 +25,5 @@ unset initdir
test/run-qemu -hda test/root.ext2 -m 512M -nographic -net none \
-kernel "/boot/vmlinuz-$kernel" \
- -append "root=/dev/dracut/root rw rootfstype=ext2 quiet
console=ttyS0,115200n81" \
+ -append "root=/dev/dracut/root rw rootfstype=ext2 quiet
console=ttyS0,115200n81i" \
-initrd test/initramfs.makeroot
diff --git a/test/test-initramfs b/test/test-initramfs
index 3c75553..5ee0336 100755
--- a/test/test-initramfs
+++ b/test/test-initramfs
@@ -4,5 +4,5 @@
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
--
1.6.0.4
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html