Bug 9040

Summary: Dracut does not include the crypt module when it should
Product: Mageia Reporter: Daniel Lucio <luis.daniel.lucio>
Component: RPM PackagesAssignee: Colin Guthrie <mageia>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Normal CC: mageia
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: dracut-025-1.mga3.src.rpm CVE:
Status comment:

Description Daniel Lucio 2013-02-11 16:34:27 CET
Description of problem:
When you need to crypt the /, and you pass correct parameters to grub, only happens with up-to-date cauldron.  Fresh install of Mga3 beta2 works okay.


Version-Release number of selected component (if applicable):


How reproducible:


Install and update to latest cauldron, do next partition schema
/boot -uncrypted   - sdb2
/ - crypted - sdb5
/mnt/keys - only to store key file, uncrypted - sdb1, label KEYS

Boot, then create a random file in/mnt/keys, In my case i use a 256 len file, content doesnt matter

Then write


cryptsetup luksAddKey /dev/sdb5 /mnt/keys/keyfile

edit grub menu.lst
and add this parameters

rd.luks=1 rd.luks.key=a0e84b99-f510-4686-a12b-165efb09aa03:LABEL=KEYS

where 
a0e84b99-f510-4686-a12b-165efb09aa03 is the name of file containing key
LABEL=KEYS is the label of sdb1, you can also use /dev/sdb1 or UUID=....

reboot,


I uninstall all plymouth stuff, also just to get rid of not necessary graphics.
Colin Guthrie 2013-02-12 23:04:14 CET

Status: NEW => ASSIGNED
CC: (none) => mageia
Assignee: bugsquad => mageia

Comment 1 Colin Guthrie 2013-02-13 00:26:01 CET
Reproduced in my VM here.
Comment 2 Colin Guthrie 2013-02-13 01:31:33 CET
OK, I found the issue and have applied a patch that seems to resolve things for me.

I've confirmed I can now generate an initrd and boot happily.

To test on your system:

1. Boot into older kernel
2. Assuming you have 3.8.0-desktop-0.rc7.1.mga3 installed run: "dracut -f /boot/initrd-3.8.0-desktop-0.rc7.1.mga3.img 3.8.0-desktop-0.rc7.1.mga3"
3. Reboot


I did have a second, unrelated issue where the kernel command line was not properly migrated on upgrade thus leaving it just saying "root=/dev/" without actually saying e.g. "root=/dev/mapper/crypt_sdb5". This was reported before but I was never able to reproduce. Now that I can reproduce that here, I will see if I can fix that issue.

However, this specific issue should be resolved, so if you could close the bug once you've confirmed that dracut-025-2.mga3 works for you, that would be great.
Comment 3 Colin Guthrie 2013-02-13 01:32:46 CET
For reference, fix also sent upstream: http://thread.gmane.org/gmane.linux.kernel.initramfs/3117
Comment 4 Colin Guthrie 2013-02-13 23:30:23 CET
Spoke to Harald upstream and he pointed to another commit that also addresses this issue (and likely others too).

I've applied this alternative fix in 25-3.mga3, so please test that one instead (works for me).
Colin Guthrie 2013-02-13 23:31:03 CET

Summary: Dracut with Luks doesnt uncript on boottime => Dracut does not include the crypt module when it should

Comment 5 Daniel Lucio 2013-02-14 01:32:08 CET
-2 works for me. I haven't tried -3
Comment 6 Colin Guthrie 2013-02-14 01:58:41 CET
If you could try -3 that would be useful as it's a completely different fix! If it works for you, please mark the bug as resolved.

Many thanks.
Comment 7 Daniel Lucio 2013-02-19 16:18:53 CET
-3 works perfectly here

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED

Comment 8 Colin Guthrie 2013-02-19 16:22:04 CET
Awesome, cheers for letting me know :)