<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>208593</bug_id>
          
          <creation_ts>2008-02-02 16:08 0000</creation_ts>
          <short_desc>/sbin/modprobe does not work with multiple kernels</short_desc>
          <delta_ts>2008-02-14 04:32:41 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Hosted Projects</product>
          <component>genkernel</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>fdbugs@dupoux.com</reporter>
          <assigned_to>genkernel@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>fdbugs@dupoux.com</who>
            <bug_when>2008-02-02 16:08:52 0000</bug_when>
            <thetext>I have a problem with the /usr/share/genkernel/generic/modprobe (the modprobe script implementation for busybox) script that comes with genkernel-3.4.9 (final version). This script has a problem when we have more than one set of kernel modules in /lib/modules. The insmod may fail because the script uses &apos;find /lib/modules&apos; to get the full path to the kernel module in real_mod_path().

The problem is when you have vmlinuz2 loaded into memory and you want to load the &apos;xxx&apos; module, the script will load /lib/modules/vmlinuz1/xxx.ko instead of /lib/modules/vmlinuz2/xxx.ko. Just because the wrong &apos;vmlinuz1&apos; subdirectory will be found before the right &apos;vmlinuz2&apos; subdirectory by the find command.

All you have to do is to search in the right subdirectory.
To fix the bug, edit the modprobe script and do that:
replace
   find /lib/modules | grep /&quot;${1}${KSUFF}&quot;
with
   find /lib/modules/${KV} | grep /&quot;${1}${KSUFF}&quot;


Reproducible: Always

Steps to Reproduce:
1. make an initramfs that can work with more than one kernel
2.
3.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>agaffney@gentoo.org</who>
            <bug_when>2008-02-02 16:36:09 0000</bug_when>
            <thetext>Well, you are using genkernel&apos;s initramfs in an unsupported way. You can&apos;t really complain that it breaks :P However, the proposed fix is simple and appears harmless even for &quot;supported&quot; configurations.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fdbugs@dupoux.com</who>
            <bug_when>2008-02-02 16:49:41 0000</bug_when>
            <thetext>Hi Andrew,

Thanks for your quick reply. That&apos;s right this is an unsupported usage, but it&apos;s always better to have a program that works in all conditions. That&apos;s just a small contribution to improve genkernel. Hope you can include this patch in the next genkernel version.

Thanks.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>agaffney@gentoo.org</who>
            <bug_when>2008-02-02 17:34:34 0000</bug_when>
            <thetext>This is fixed in SVN. Thanks.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wolf31o2@gentoo.org</who>
            <bug_when>2008-02-14 04:32:41 0000</bug_when>
            <thetext>I just released genkernel 3.4.10_pre1, which has this fix included.  Feel free to REOPEN this bug or make a comment if it is not resolved.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>