Reinhard, correct me if I'm wrong but isn't the init.d call to cryptdisks.functions already in the rootfs instead of the initramfs?
I'm running gutsy, and this configuration works fine:
$ cat /etc/crypttab croot32 /dev/sda11 none luks,cipher=aes-cbc-essiv:sha256 chome32 /dev/sda12 none luks,cipher=aes-cbc-essiv:sha256 cvar32 /dev/sda13 /cvarfile luks,cipher=aes-cbc-essiv:sha256 cswap /dev/sda6 /dev/urandom swap $ cat /etc/fstab /dev/mapper/croot32 / ext3 defaults,errors=remount-ro 0 1 LABEL=cvar32 /var ext3 defaults 0 1 LABEL=chome32 /home ext3 defaults 0 1 /dev/mapper/cswap none swap sw 0 0
The only patch I use is for usplash: --snip-- --- /lib/cryptsetup/cryptdisks.functions 2007-09-23 16:29:57.000000000 +0200 +++ /lib/cryptsetup/cryptdisks.functions 2007-09-23 16:29:57.000000000 +0200 @@ -271,11 +271,15 @@ cryptsetup $PARAMS luksOpen $src $dst <&1 else if [ -x /sbin/usplash_write -a -p /dev/.initramfs/usplash_outfifo ]; then - /sbin/usplash_write "QUIT" - # saftey sleep ! - sleep 2 + while [ "$tried" -lt "$TRIES" ]; do + usplash_write "INPUTQUIET Enter password for $dst ($src): " + PASS="$(cat /dev/.initramfs/usplash_outfifo)" + echo -n "$PASS" | cryptsetup $PARAMS luksOpen $src $dst > /dev/null 2>&1 && break + tried=$(( $tried +1 )) + done + else + cryptsetup $PARAMS luksOpen $src $dst <&1 fi - cryptsetup $PARAMS luksOpen $src $dst <&1 fi fi
--snip--
Hope that helps.
Reinhard, correct me if I'm wrong but isn't the init.d call to cryptdisks. functions already in the rootfs instead of the initramfs?
I'm running gutsy, and this configuration works fine:
$ cat /etc/crypttab aes-cbc- essiv:sha256 aes-cbc- essiv:sha256 aes-cbc- essiv:sha256 errors= remount- ro 0 1
croot32 /dev/sda11 none luks,cipher=
chome32 /dev/sda12 none luks,cipher=
cvar32 /dev/sda13 /cvarfile luks,cipher=
cswap /dev/sda6 /dev/urandom swap
$ cat /etc/fstab
/dev/mapper/croot32 / ext3 defaults,
LABEL=cvar32 /var ext3 defaults 0 1
LABEL=chome32 /home ext3 defaults 0 1
/dev/mapper/cswap none swap sw 0 0
The only patch I use is for usplash: /cryptdisks. functions 2007-09-23 16:29:57.000000000 +0200 /cryptdisks. functions 2007-09-23 16:29:57.000000000 +0200
cryptsetup $PARAMS luksOpen $src $dst <&1
else
if [ -x /sbin/usplash_write -a -p /dev/.initramfs /usplash_ outfifo ]; then /usplash_ outfifo) "
fi
--snip--
--- /lib/cryptsetup
+++ /lib/cryptsetup
@@ -271,11 +271,15 @@
- /sbin/usplash_write "QUIT"
- # saftey sleep !
- sleep 2
+ while [ "$tried" -lt "$TRIES" ]; do
+ usplash_write "INPUTQUIET Enter password for $dst ($src): "
+ PASS="$(cat /dev/.initramfs
+ echo -n "$PASS" | cryptsetup $PARAMS luksOpen $src $dst > /dev/null 2>&1 && break
+ tried=$(( $tried +1 ))
+ done
+ else
+ cryptsetup $PARAMS luksOpen $src $dst <&1
- cryptsetup $PARAMS luksOpen $src $dst <&1
fi
fi
--snip--
Hope that helps.