Bug 325597

Summary: Encrypted file system can't be mounted on bootup
Product: [openSUSE] openSUSE 10.3 Reporter: Lenz Grimmer <lgrimmer>
Component: YaST2Assignee: Thomas Fehr <fehr>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Major    
Priority: P5 - None CC: ah
Version: Beta 3   
Target Milestone: RC 2   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2log

Description Lenz Grimmer 2007-09-17 07:01:54 UTC
I have an encrypted file system on an LVM that I have been using on various past versions of openSUSE/SuSE Linux before. On 10.3b3 YaST2 correctly detects the file system and mounts it, when I apply the settings. However, /etc/init.d/boot.crypto fails to mount the file system on the next system startup:

# cat /etc/cryptotab 
            /dev/mapper/cr_cryptohome /home                reiserfs   twofish256 defaults
# /etc/init.d/boot.crypto start
Activating crypto devices using /etc/cryptotab ... 
/home: reiserfs doesn't exist                                         skipped

Copying over the cryptotab from openSUSE 10.2 works:

# cat /etc/cryptotab 
/dev/loop0  /dev/system/cryptohome /home                reiserfs   twofish256 noatime,data=journal,acl
# /etc/init.d/boot.crypto start
Activating crypto devices using /etc/cryptotab ... 
Please enter passphrase for /dev/system/cryptohome: 
[/sbin/fsck.reiserfs (1) -- /dev/mapper/cryptotab_loop0] fsck.reiserfs -a /dev/mapper/cryptotab_loop0 
Reiserfs super block in block 16 on 0xfd09 of format 3.6 with standard journal
Blocks (total/free): 2621440/395594 by 4096 bytes
Filesystem is clean
Replaying journal: Done.
Reiserfs journal '/dev/mapper/cryptotab_loop0' in blocks [18..8211]: 0 transactions replayed
Checking internal tree.. finished
/dev/system/cryptohome...                                             done
Comment 1 Lenz Grimmer 2007-09-17 07:04:59 UTC
Created attachment 172733 [details]
y2log
Comment 2 Thomas Fehr 2007-09-18 08:45:47 UTC
Seems not to be a problem with YaST2 but with the startup scripts.
Maybe boot.crypto is called before boot.lvm?
Maybe boot.crypto is confused by /dev/system/cryptohome being a symlink
to /dev/mapper/system-cryptohome?
Reassigning to Ludwig.
Comment 3 Ludwig Nussel 2007-09-18 09:11:50 UTC
boot.crypto and boot.lvm are completely unrelated wrt boot script dependencies. Ie either may be started before the other, they may even run at the same time. That situation is unchanged since 10.2.

Wrt cryptotab. In the above description the first file lacks an entry in the first column, ie the /dev/loop0 that is present in the second file is missing.
How did you create that file?
Comment 4 Thomas Fehr 2007-09-18 09:21:31 UTC
Oops, looks now more like a YaST2 bug to me.
Sorry, did not catch the bogus cryptotab line.

Lenz, could you attach all y2log files. It seems that yast2-storage broke
your cryptotab entry.
Comment 5 Thomas Fehr 2007-09-18 16:28:31 UTC
The line created in cryptotab were indeed wrong. Fixed now.
Comment 6 Thomas Fehr 2007-09-24 12:38:27 UTC
*** Bug 327584 has been marked as a duplicate of this bug. ***