Bug 489151

Summary: mkinitrd should check if current kernel has CONFIG_SYSFS_DEPRECATED_V2 set
Product: [Fedora] Fedora Reporter: Thomas Meyer <thomas.mey>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: hdegoede, katzj, pjones, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-16 18:47:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
old sysfs style and crypto drive none

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.