Bug 430405 - mkinitrd should not check the running kernel
Summary: mkinitrd should not check the running kernel
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 11.2
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: unspecified
Hardware: Other Other
: P4 - Low : Normal (vote)
Target Milestone: ---
Assignee: Michal Marek
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-27 13:57 UTC by Andreas Gruenbacher
Modified: 2009-07-15 14:07 UTC (History)
5 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Buggy check (613 bytes, patch)
2008-09-27 13:57 UTC, Andreas Gruenbacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Gruenbacher 2008-09-27 13:57:26 UTC
Created attachment 242101 [details]
Buggy check

When computing the list of modules which should be included in the initrd,
mkinitrd tries to be smart about modules which used to be standalone,
and which have been built into the main kernel image later. There is no way to determine which modules have been built into a kernel, so mkinitrd currently looks at the running kernel and tries to guess from the contents of /sys/modules whether a module has likely become a built-in.

This is broken. Nevertheless, we want to keep kernel upgrade paths painless and so failing mkinitrd whenever a module cannot be found is not acceptable. I have sent a proposal how to fix this to the upstream kbuild maintainer (Hannes, you were CCed). The proposal is to compute the list of built-in modules and attach that to the kernel image, or at least the kernel package.

I am attaching a patch showing where mkinitrd gets this wrong.
Comment 2 Hannes Reinecke 2008-10-09 10:09:32 UTC
Yes, we know it's broken. But the real fix would indeed create some kbuild magic which puts all compiled-in module name into the kernel somewhere.
But knowing little-to-none about kbuild internals I'm not really qualified for doing a patch.
Comment 3 Alexander Graf 2008-10-24 10:57:04 UTC
Mkinitrd can not distinguish between "a module isn't there" and "the module is compiled into the kernel" atm. We would definitely need some magic exported from the kernel build system that tells us "this would've been a module, but it's compiled into the kernel".

Andreas, do you know who could write such an enhancement for the kernel build system?
Comment 4 Andreas Gruenbacher 2008-10-24 11:11:58 UTC
I'm adding Michal; he may be interested in looking into this at some point.
Comment 5 Michal Marek 2008-10-24 11:19:03 UTC
Andreas, did you get any response from Sam?
Comment 6 Andreas Gruenbacher 2008-10-24 11:28:44 UTC
No, sorry. He seems to be very busy with other things lately. I think the best approach would be to hack this up and send a proposal to linux-kbuild@vger.kernel.org. It shouldn't be hard to do.

For SLE11 it's a bit late already, though.
Comment 7 Michal Marek 2008-10-24 11:31:21 UTC
ok.
Comment 8 Michal Marek 2009-05-26 16:06:11 UTC
I sent a patch to Sam, let's see what's his opinion.
Comment 9 Michal Marek 2009-07-15 14:07:43 UTC
Fixed in kernel and module-init-tools.