Bug 462371 - Plymouth asks twice for passphrase of encrypted disk
Plymouth asks twice for passphrase of encrypted disk
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: F10Blocker/F10FinalBlocker
  Show dependency treegraph
 
Reported: 2008-09-15 13:51 EDT by Sven Lankes
Modified: 2014-03-16 23:15 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-11-04 16:00:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
crypttab (45 bytes, text/plain)
2008-09-15 13:51 EDT, Sven Lankes
no flags Details
fstab (726 bytes, text/plain)
2008-09-15 13:51 EDT, Sven Lankes
no flags Details
init file - as requested (2.25 KB, text/plain)
2008-09-15 15:16 EDT, Sven Lankes
no flags Details
Updated diff (737 bytes, patch)
2008-10-31 13:00 EDT, Bill Nottingham
no flags Details | Diff
/init from initrd (2.12 KB, text/plain)
2008-11-04 15:33 EST, Kevin Fenzi
no flags Details
/etc/fstab (806 bytes, text/plain)
2008-11-04 15:35 EST, Kevin Fenzi
no flags Details
/etc/crypttab (45 bytes, text/plain)
2008-11-04 15:36 EST, Kevin Fenzi
no flags Details

  None (edit)
Description Sven Lankes 2008-09-15 13:51:10 EDT
Created attachment 316767 [details]
crypttab

I get asked twice for the passphrase to unlock my disk during boot. A couple of seconds after entering the passphrase during boot the passphrase-screen returns (this time with an added line '/dev/sda2 is encrypted' - or something along those lines). Entering the correct passphrase a second time doesn't work - all I can do is press escape which continues the boot.

I'm seeing this with plymouth-0.6.0-0.2008.09.10.1.fc10.x86_64. Same issue on my i386 machine with the same plymouth-version.
Comment 1 Sven Lankes 2008-09-15 13:51:43 EDT
Created attachment 316768 [details]
fstab
Comment 2 Ray Strode [halfline] 2008-09-15 14:13:08 EDT
and what's the output of 

ls -l /dev/mapper

?
Comment 3 Sven Lankes 2008-09-15 14:21:50 EDT
[root@host ~]# ls -l /dev/mapper/
total 0
crw-rw---- 1 root root  10, 60 2008-09-15 18:29 control
brw-rw---- 1 root disk 253,  0 2008-09-15 18:29 cry
brw-rw---- 1 root disk 253,  2 2008-09-15 18:29 VolGroup_Dull-LogVol_home
brw-rw---- 1 root disk 253,  1 2008-09-15 18:29 VolGroup_Dull-LogVol_root
brw-rw---- 1 root disk 253,  3 2008-09-15 18:29 VolGroup_Dull-LogVol_swap
Comment 4 Ray Strode [halfline] 2008-09-15 14:40:31 EDT
okay one more thing :-)

Can you run:

sudo zcat /boot/initrd-$(uname -r).img  | cpio -i init

and then attach the init file that gets dropped into the current working directory?
Comment 5 Sven Lankes 2008-09-15 15:16:18 EDT
Created attachment 316773 [details]
init file - as requested
Comment 6 Ray Strode [halfline] 2008-09-15 16:50:41 EDT
so there seems to be a mismatch between what mkinitrd is naming your decrypted device and what crypttab wants it to be called.  this is confusing rc.sysinit, so rc.sysinit asks for the password to an entry it should ignore.

moving to mkinitrd.
Comment 8 Will Woods 2008-10-30 18:30:47 EDT
That patch didn't work for me, but that line of bash seems suspect. 

I think you're trying to see if a device name (e.g. 'sda2') is present in one of the /sys/block/dm-*/slaves/ directories?

" $(ls /sys/block/dm-*/slaves) " expands to:
"  /sys/block/dm-0/slaves:
sda2

/sys/block/dm-1/slaves:
dm-0

/sys/block/dm-2/slaves:
dm-0 "
So " sda2 " probably isn't going to match because there's a newline after it. 

Here's what I came up with:
+       # Does it exist?
        [ -z "$src" ] && continue
+       # Is it a block device?
        [ -b "$src" ] || continue
+       # Is it already a device mapper slave? (this is gross)
+       for d in /sys/block/dm-*/slaves; do
+           [ -e $d/${src##/dev/} ] && continue 2
+       done
Yeah, I used 'continue' with an argument. Yuck. You could change it to set 'isaslave=true' and then check 'isaslave' after the loop, if you'd be more comfortable with that.

Anyway, *that* patch suppresses the repeated unlock dialogs on my system. Hope that helps.
Comment 9 Bill Nottingham 2008-10-31 13:00:32 EDT
Created attachment 322110 [details]
Updated diff

Please try the attached - the extra grossness is due to things like /dev/cciss/d0p1.
Comment 10 Sven Lankes 2008-10-31 19:39:35 EDT
(In reply to comment #9)

> Created an attachment (id=322110) [details]
> Updated diff 
> Please try the attached - the extra grossness is due to things like
> /dev/cciss/d0p1.

That patch works fine for me.
Comment 11 Bill Nottingham 2008-11-03 11:58:07 EST
Fixed in 8.85-1.
Comment 12 Kevin Fenzi 2008-11-04 15:13:45 EST
humm. I am still seeing this with 8.85-1. ;( 

ohm(kevin)[~] ls -la /dev/mapper                                                 13:09:40
total 0
drwxr-xr-x  2 root root     120 2008-11-04 13:01 ./
drwxrwxrwt 16 root root    4640 2008-11-04 13:02 ../
crw-rw----  1 root root  10, 63 2008-11-04 13:00 control
brw-rw----  1 root disk 253,  0 2008-11-04 13:01 luks-5ca29f06-2925-42f5-81b9-4dbf070b5fd5
brw-rw----  1 root disk 253,  1 2008-11-04 13:01 VolGroup00-LogVol00
brw-rw----  1 root disk 253,  2 2008-11-04 13:01 VolGroup00-LogVol01
ohm(kevin)[~] rpm -q initscripts                                                 13:09:44
initscripts-8.85-1.x86_64

It's worth noting that if I provide the password both times, it does boot up fine. 

Happy to provide more info...
Comment 13 Kevin Fenzi 2008-11-04 15:17:14 EST
Also, note that this was an updated machine from F9 using preupgrade. 

I do recall anaconda asking if the password for the crypted volumes was a 'global' password or not, and I said no (since I only had one volume). 
No idea if that matters...
Comment 14 Bill Nottingham 2008-11-04 15:22:30 EST
Can you attach your /etc/fstab, /etc/crypttab, and /init from your initrd?
Comment 15 Kevin Fenzi 2008-11-04 15:33:41 EST
Created attachment 322476 [details]
/init from initrd

/init
Comment 16 Kevin Fenzi 2008-11-04 15:35:37 EST
Created attachment 322479 [details]
/etc/fstab

/etc/fstab
Comment 17 Kevin Fenzi 2008-11-04 15:36:14 EST
Created attachment 322480 [details]
/etc/crypttab

/etc/crypttab
Comment 18 Kevin Fenzi 2008-11-04 16:00:40 EST
Well, just did a bunch of reboots and tried to see what was going on, but I can't get it to happen again. it's always asking just once for me now. ;( 

I guess I will blame sunspots. :(

Note You need to log in before you can comment on or make changes to this bug.