Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 405495 - <sys-kernel/genkernel-3.4.26 doesn't include sha256 module in initramfs when luks is enabled
Summary: <sys-kernel/genkernel-3.4.26 doesn't include sha256 module in initramfs when ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2012-02-23 23:28 UTC by Ogelpre
Modified: 2012-03-22 03:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ogelpre 2012-02-23 23:28:09 UTC
genkernel doesn't include sha256 module in initramfs.

Reproducible: Always

Steps to Reproduce:
Encrypt your partition with cryptsetup and sha256 hash.
Build kernel with sha256 as module and build initramfs with genkernel and luks support. 
Actual Results:  
System doesn't boot, because sha256 module is not included in initramfs.

Expected Results:  
If sha256 is compiled as module, then genkernel should include it into initramfs.

### On boot:
Enter passphrase for /dev/md1:
device-mapper: reload ioctl failed: No such file or directory
Failed to setup dm-crypt key mapping for device /dev/md1.
Check that kernel supports aes-xts-plain cipher (check syslog for more info).
Failed to read from key storage.
###

Sorry for my bad english...
Comment 1 Sebastian Pipping gentoo-dev 2012-02-25 00:44:05 UTC
Thanks for reporting and sorry for the trouble this has caused to you.

I have made a patch to get sha256_generic.ko copied to the initramfs:
http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=1159b4c2f6c7cb672941e4786b4d1b427c25748a

Please test the patch and report back.  One way to do so would be:

  # git clone git://git.overlays.gentoo.org/proj/genkernel.git
  # cd genkernel
  # git checkout -t origin/bug-405495
  # sudo GK_SHARE="$PWD" ./genkernel initramfs --loglevel=2

If this works for you, I can make a new release soon.
Comment 2 Ogelpre 2012-03-03 13:01:43 UTC
No Problem. It hasn't caused any trouble to me. A simple workaround is to build the modules into the kernel.

I've tested your patch. The sha256 module is now in the initramfs but not loaded automatically.
Comment 3 Sebastian Pipping gentoo-dev 2012-03-03 13:40:36 UTC
(In reply to comment #2)
> I've tested your patch. The sha256 module is now in the initramfs but not
> loaded automatically.

Thanks for testing.  Right now I don't know how to best ensure the modules is loaded in an initramfs context.  If you feel like finding out before I can, please go ahead.
Comment 4 Sebastian Pipping gentoo-dev 2012-03-20 03:13:56 UTC
(In reply to comment #2)
> I've tested your patch. The sha256 module is now in the initramfs but not
> loaded automatically.

It should be loaded automatically now [1].  Please sync your local branch "bug-405495", re-try and report back.  Thanks!


[1] http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=506a94ab26b488a54f1a1a84ba74a5cc7db34c6f
Comment 5 Ogelpre 2012-03-21 09:30:13 UTC
It works as expected (:
Thank you (:
Comment 6 Sebastian Pipping gentoo-dev 2012-03-22 03:18:02 UTC
(In reply to comment #5)
> It works as expected (:
> Thank you (:

Great, thanks for testing.  If you sync in 60 minutes (maximum) you can upgrade to 3.4.26 including the fix.