Bug 489151 - mkinitrd should check if current kernel has CONFIG_SYSFS_DEPRECATED_V2 set
mkinitrd should check if current kernel has CONFIG_SYSFS_DEPRECATED_V2 set
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
rawhide
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-08 05:06 EDT by Thomas Meyer
Modified: 2009-03-16 14:47 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-16 14:47:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Thomas Meyer 2009-03-08 05:06:32 EDT
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 05:11:55 EDT
(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 10:14:20 EDT
Created attachment 334436 [details]
old sysfs style and crypto drive
Comment 3 Thomas Meyer 2009-03-08 10:16:56 EDT
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 14:47:56 EDT
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.