Results 1 to 6 of 6

Thread: Problem with initrd's cryptroot when unlocking LUKS root during boot.

Hybrid View

  1. #1
    Just burned his ISO
    Join Date
    May 2011
    Posts
    1

    Default 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: :****

  2. #2
    Just burned his ISO
    Join Date
    Oct 2010
    Posts
    8

    Default Re: Problem with initrd's cryptroot when unlocking LUKS root during boot.

    Awesome fix on an annoying bug!

  3. #3
    Just burned his ISO
    Join Date
    Jan 2010
    Posts
    13

    Default Re: Problem with initrd's cryptroot when unlocking LUKS root during boot.

    Quote Originally Posted by gtford View Post
    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?

  4. #4
    Just burned his ISO
    Join Date
    Jan 2010
    Posts
    1

    Default Re: Problem with initrd's cryptroot when unlocking LUKS root during boot.

    Hi.
    How can i apply this patch?
    thx.
    Last edited by gimich; 10-03-2011 at 03:17 PM.

  5. #5
    Just burned his ISO
    Join Date
    Aug 2011
    Posts
    4

    Default 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 -

  6. #6
    Just burned his ISO
    Join Date
    Jun 2012
    Posts
    1

    Default Re: Problem with initrd's cryptroot when unlocking LUKS root during boot.

    Is it possible that this is not longer working in BT5 r2?

Similar Threads

  1. Installing BT4 from root directory and boot disk
    By UberKrieger in forum Beginners Forum
    Replies: 2
    Last Post: 07-13-2010, 10:59 AM
  2. BT3 <initrd> hangs at boot. BT2 didn't.
    By PhKillah in forum OLD Newbie Area
    Replies: 6
    Last Post: 08-07-2009, 05:01 PM
  3. Replies: 7
    Last Post: 01-19-2009, 12:03 PM
  4. .../boot is hdc (internal) /root is sda(external) ..KERNEL PANIC
    By engineered2reverse in forum OLD Newbie Area
    Replies: 2
    Last Post: 10-08-2008, 03:05 AM
  5. LUKS HDD encryption
    By Shatter in forum OLD Newbie Area
    Replies: 3
    Last Post: 07-31-2008, 04:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •