]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
We create our test image with root as an LVM menber.
authorVictor Lowther <victor.lowther@gmail.com>
Thu, 21 May 2009 02:55:06 +0000 (19:55 -0700)
committerHarald Hoyer <harald@redhat.com>
Mon, 25 May 2009 09:36:27 +0000 (11:36 +0200)
We purport to support booting off an encrypted LVM PV, may as well test it.

modules.d/00test/create-root.sh
test/test-initramfs

index ce9f40bfda88e280b0486f9975aa8b9921a8b7af..c756f4f5f2bb19ed5bf4531703e5e9ae202de24d 100755 (executable)
@@ -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
index 3c75553fa233e0a4810b9ee98ef596be663cf6fd..5ee0336485d0143ac15085d0dd9ee5c740d93a6a 100755 (executable)
@@ -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