Bug 462371 - Plymouth asks twice for passphrase of encrypted disk
Summary: Plymouth asks twice for passphrase of encrypted disk
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F10Blocker, F10FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2008-09-15 17:51 UTC by Sven Lankes
Modified: 2014-03-17 03:15 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-11-04 21:00:40 UTC
Type: ---
Embargoed:


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

Description Sven Lankes 2008-09-15 17:51:10 UTC
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 17:51:43 UTC
Created attachment 316768 [details]
fstab

Comment 2 Ray Strode [halfline] 2008-09-15 18:13:08 UTC
and what's the output of 

ls -l /dev/mapper

?

Comment 3 Sven Lankes 2008-09-15 18:21:50 UTC
[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 18:40:31 UTC
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 19:16:18 UTC
Created attachment 316773 [details]
init file - as requested

Comment 6 Ray Strode [halfline] 2008-09-15 20:50:41 UTC
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 22:30:47 UTC
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 17:00:32 UTC
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 23:39:35 UTC
(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 16:58:07 UTC
Fixed in 8.85-1.

Comment 12 Kevin Fenzi 2008-11-04 20:13:45 UTC
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 20:17:14 UTC
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 20:22:30 UTC
Can you attach your /etc/fstab, /etc/crypttab, and /init from your initrd?

Comment 15 Kevin Fenzi 2008-11-04 20:33:41 UTC
Created attachment 322476 [details]
/init from initrd

/init

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

/etc/fstab

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

/etc/crypttab

Comment 18 Kevin Fenzi 2008-11-04 21:00:40 UTC
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.