Remove dependency on plymouth for getroot, pass 1. --- dracut | 2 +- init | 13 +++++++++++-- rules.d/63-luks.rules | 3 +-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/dracut b/dracut index 56695c1..630b78b 100755 --- a/dracut +++ b/dracut @@ -41,7 +41,7 @@ initdir=$(mktemp -d -t initramfs.XXXXXX) trap 'rm -rf "$initdir"' 0 # clean up after ourselves no matter how we die. # executables that we have to have -exe="/bin/bash /bin/mount /bin/mknod /bin/mkdir /sbin/modprobe /sbin/udevd /sbin/udevadm /sbin/nash /sbin/pidof /bin/sleep /usr/sbin/chroot" +exe="/bin/bash /bin/mount /bin/mknod /bin/mkdir /sbin/modprobe /sbin/udevd /sbin/udevadm /sbin/nash /sbin/pidof /bin/sleep /usr/sbin/chroot /bin/echo" lvmexe="/sbin/lvm" cryptexe="/sbin/cryptsetup" # and some things that are nice for debugging diff --git a/init b/init index 10a789b..ea06687 100755 --- a/init +++ b/init @@ -74,8 +74,17 @@ esac tries=0 plymouth --update "Waiting up to 30 seconds for $root to become available" until [[ -e $root ]]; do - sleep 1 - ((tries++ > 30)) && emergency_shell + [[ -f /cryptroot ]] && { + tries=27 + cryptopts=$(< /cryptroot) + if [ -x /bin/plymouth ] && plymouth --ping; then + /bin/plymouth ask-for-password \ + --command "/sbin/cryptsetup luksOpen $cryptopts" && break + else + /sbin/cryptsetup luksOpen $cryptopts && break + fi + sleep 1 + ((tries++ > 30)) && emergency_shell done plymouth --update "Mounting rootfs after $tries seconds" ln -s "$root" /dev/root diff --git a/rules.d/63-luks.rules b/rules.d/63-luks.rules index 5d8297b..ab907e9 100644 --- a/rules.d/63-luks.rules +++ b/rules.d/63-luks.rules @@ -8,7 +8,6 @@ SUBSYSTEM!="block", GOTO="luks_end" ACTION!="add|change", GOTO="luks_end" KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode" -ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="/bin/plymouth ask-for-password --command '/sbin/cryptsetup luksOpen $env{DEVNAME} luks-$env{ID_FS_UUID}" - +ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="/echoer /cryptroot $env{DEVNAME} luks-$env{ID_FS_UUID}" LABEL="luks_end" -- 1.6.0.6 -- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html