Problem with initrd's cryptroot when unlocking LUKS root during boot.
There seems to be an issue with the cryptroot script as part of the initrd with BT5.
When unlocking your root partition during boot, you get the usual prompt to enter your password:
Code:
Unlocking the disk /dev/disk/by-uuid/e2684c44-a39c-4712-a30b-d782065162d3 (sda3_crypt)
Enter passphrase: :
However, when entering your password, for each character entered it prints the first line again:
Code:
Unlocking the disk /dev/disk/by-uuid/e2684c44-a39c-4712-a30b-d782065162d3 (sda3_crypt)
Unlocking the disk /dev/disk/by-uuid/e2684c44-a39c-4712-a30b-d782065162d3 (sda3_crypt)
Enter passphrase: :*
Code:
Unlocking the disk /dev/disk/by-uuid/e2684c44-a39c-4712-a30b-d782065162d3 (sda3_crypt)
Unlocking the disk /dev/disk/by-uuid/e2684c44-a39c-4712-a30b-d782065162d3 (sda3_crypt)
Unlocking the disk /dev/disk/by-uuid/e2684c44-a39c-4712-a30b-d782065162d3 (sda3_crypt)
Enter passphrase: :**
Code:
Unlocking the disk /dev/disk/by-uuid/e2684c44-a39c-4712-a30b-d782065162d3 (sda3_crypt)
Unlocking the disk /dev/disk/by-uuid/e2684c44-a39c-4712-a30b-d782065162d3 (sda3_crypt)
Unlocking the disk /dev/disk/by-uuid/e2684c44-a39c-4712-a30b-d782065162d3 (sda3_crypt)
Unlocking the disk /dev/disk/by-uuid/e2684c44-a39c-4712-a30b-d782065162d3 (sda3_crypt)
Enter passphrase: :***
and so on...
It still unlocks the disk fine, but it's quite irritating.
The following patch fixed it for me on BT5-GNOME-64 and BT5-KDE-32/64. I see no reason why it wouldn't work on BT5-GNOME-32, but I don't have that ISO. Works both in VM and on HDD install.
Code:
--- /usr/share/initramfs-tools/scripts/local-top/cryptroot.orig 2011-05-13 01:41:22.000000000 +0100
+++ /usr/share/initramfs-tools/scripts/local-top/cryptroot 2011-05-13 01:45:02.000000000 +0100
@@ -272,10 +272,11 @@
cryptremove="/sbin/cryptsetup remove $crypttarget"
NEWROOT="/dev/mapper/$crypttarget"
# Try to get a satisfactory password $crypttries times
count=0
+ echo "Unlocking the disk $cryptsource ($crypttarget)"
while [ $crypttries -le 0 ] || [ $count -lt $crypttries ]; do
count=$(( $count + 1 ))
if [ $count -gt 1 ]; then
/bin/sleep 3
@@ -285,11 +286,11 @@
message "cryptsetup: maximum number of tries exceeded for $crypttarget"
return 1
fi
if [ -z "$cryptkeyscript" ]; then
- cryptkey="Unlocking the disk $cryptsource ($crypttarget)\nEnter passphrase: "
+ cryptkey="Enter passphrase: "
if [ -x /bin/plymouth ] && plymouth --ping; then
cryptkeyscript="plymouth ask-for-password --prompt"
cryptkey=$(echo -e "$cryptkey")
else
cryptkeyscript="/lib/cryptsetup/askpass"
And working as expected (after patch and update-initramfs):
Code:
Unlocking the disk /dev/disk/by-uuid/e2684c44-a39c-4712-a30b-d782065162d3 (sda3_crypt)
Enter passphrase: :****
Re: Problem with initrd's cryptroot when unlocking LUKS root during boot.
Awesome fix on an annoying bug!
Re: Problem with initrd's cryptroot when unlocking LUKS root during boot.
Quote:
Originally Posted by
gtford
when entering your password, for each character entered it prints the first line again:
[CODE]Unlocking the disk /dev/disk/by-uuid/e2684c44-a39c-4712-a30b-d782065162d3 (sda3_crypt)
It still unlocks the disk fine, but it's quite irritating.
The following patch fixed it for me on BT5-GNOME-64 and BT5-KDE-32/64. I see no reason why it wouldn't work on BT5-GNOME-32, but I don't have that ISO. Works both in VM and on HDD install.
gtford, may I ask if you wrote this, if not, where did you find it? In either case, thanks for your info!! If you wrote it do you do any freelance consulting?
Re: Problem with initrd's cryptroot when unlocking LUKS root during boot.
Hi.
How can i apply this patch?
thx.
AW: Re: Problem with initrd's cryptroot when unlocking LUKS root during boot.
open the file /usr/share/initramfs-tools/scripts/local-top/cryptroot
add the lines marked with +
delete the lines marked with -
Re: Problem with initrd's cryptroot when unlocking LUKS root during boot.
Is it possible that this is not longer working in BT5 r2?