Menu

#3 Kernel modules placed into wrong directory on some distros

cvs
open
nobody
3
2006-01-02
2005-12-30
No

Make install puts the modules into
/lib/modules/kernel-version (e.g /lib/modules/2.6.12-9).

Some distros like Debian and Ubuntu search for the
modules in /lib/modules/kernel-version-architecture
(e.g. /lib/modules/2.6.12-9-686). In that case the
files are in the wrong place and modprobe doesn't find
them.

Discussion

  • Andreas Gnau

    Andreas Gnau - 2005-12-30
    • priority: 5 --> 3
     
  • Fabian Melzow

    Fabian Melzow - 2006-01-01
    • status: open --> pending
     
  • Fabian Melzow

    Fabian Melzow - 2006-01-01

    Logged In: YES
    user_id=54451

    Yes, this is a known problem.
    We are using the kernel build system and do a "make
    modules_install" for our driver. But many distros add
    various suffixes to the kernel version like the
    architecture, "-smp", etc.

    I don't know if using /lib/modules/`uname -r`/ would work
    for this problem. We can additional copy the modules by
    hand, when the directory "uname -r" exists under /lib/modules/.

     
  • Andreas Gnau

    Andreas Gnau - 2006-01-02

    Logged In: YES
    user_id=1109714

    uname -r returns 2.6.12-9-686 for me i.e.
    /lib/modules/`uname -r`/ works.
    In my opinion there's no need to put the modules in to the
    wrong directory first and copying them to the "right one"
    after that.

     
  • Andreas Gnau

    Andreas Gnau - 2006-01-02
    • status: pending --> open
     
  • Andreas Gnau

    Andreas Gnau - 2006-01-22

    Logged In: YES
    user_id=1109714

    Detecting the right place would be much better IMO.

    Another quick and dirty fix ist reading out /etc/lsb-release.
    This is the Linux Standards Base method.

    As far as I know Debian isn't that far, yet. Ubuntu is, btw.
    I think /etc/debian_release and /etc/debian_version should
    help in that case.

     
  • Andreas Gnau

    Andreas Gnau - 2006-04-14

    Logged In: YES
    user_id=1109714

    In the current CVS the modules aren't placed into any
    directory at all, because /lib/modules/$(uname -r)/extras
    doesn't exist.
    I don't know the directory structure of other distros by
    heart, but at least on Debian and ubuntu, it's different and
    no folder "extras" exists.
    I'll attach the output of tree.
    I think the subdirectories /lib/modules/$/uname
    -r)/kernel/drivers/ are the appropiate location for the
    modules. I know that you can put them anywhere you want, but
    I think it would look nicer if they were at the "correct"
    location.

     
  • Andreas Gnau

    Andreas Gnau - 2006-04-14

    Directory structure of /lib/modules/ (including files)

     
  • Andreas Gnau

    Andreas Gnau - 2006-04-14

    Directory structure of /lib/modules/ (without files)

     

Log in to post a comment.