Bug 489151 - mkinitrd should check if current kernel has CONFIG_SYSFS_DEPRECATED_V2 set
Summary: mkinitrd should check if current kernel has CONFIG_SYSFS_DEPRECATED_V2 set
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mkinitrd
Version: rawhide
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-08 09:06 UTC by Thomas Meyer
Modified: 2009-03-16 18:47 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-03-16 18:47:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
old sysfs style and crypto drive (718 bytes, text/plain)
2009-03-08 14:14 UTC, Thomas Meyer
no flags Details

Description Thomas Meyer 2009-03-08 09:06:32 UTC
Description of problem:

mkinitrd should check if current kernel has CONFIG_SYSFS_DEPRECATED_V2 set, otherwise the created initrd image doesn't include necessary steps to setup a luks device, because the sysfs paths used in mkinitrd are hardcoded to the "old" path schema and so the needed steps to setup crypto handling (handle_dm) are not called.

Comment 1 Hans de Goede 2009-03-08 09:11:55 UTC
(In reply to comment #0)
> Description of problem:
> 
> mkinitrd should check if current kernel has CONFIG_SYSFS_DEPRECATED_V2 set,
> otherwise the created initrd image doesn't include necessary steps to setup a
> luks device, because the sysfs paths used in mkinitrd are hardcoded to the
> "old" path schema and so the needed steps to setup crypto handling (handle_dm)
> are not called.  

I assume you mean 'are hardcoded to the "new" path schema' ? As by default the
Fedora kernels do not have CONFIG_SYSFS_DEPRECATED_V2 set, so by default we expect
the new paths.

Can you come up with a patch which makes mkinitrd work with the paths which one
gets when CONFIG_SYSFS_DEPRECATED_V2 is set? It does not need to adept itself
automatically I just wonder what the code needs to look like in the CONFIG_SYSFS_DEPRECATED_V2 is set case.

Thanks!

Comment 2 Thomas Meyer 2009-03-08 14:14:20 UTC
Created attachment 334436 [details]
old sysfs style and crypto drive

Comment 3 Thomas Meyer 2009-03-08 14:16:56 UTC
Oops! Yes you are right! I inverted the logic. My self-compiled kernel did use the old sysfs style... - Just fixed that.

Anyway the attached diff did the trick for me.

Thanks and sorry for the noise.

Comment 4 Hans de Goede 2009-03-16 18:47:56 UTC
Thanks for the patch, that was very helpful!

This is fixed in mkinitrd-6.0.81, which should be in tomorrows rawhide.


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