HowTo compile a kernel: Ubuntu way - problem with kernel sources

Discussion in 'HOWTO-Related Questions' started by cryma, May 26, 2009.

  1. cryma

    cryma New Member


    I'm having trouble with the .deb files obtained as the HowTo describes.

    I've created the two .deb on a machine, which rebooted on the new kernel with no problem. Then I installed the two .deb on a second machine and also this one booted on the new kernel with no problem.

    But, on the second machine, when i try to compile modules, such as madwifi, the compilation fails with pretty strange errors (errors attached). Errors seems related to kernel source files missing or different. I did install the headers.deb too.

    On the machine where the .deb have been obtained madwifi compiles. However, I noticed that on that machine
    link to the folder where I had compiled the kernel and not to the source folder obtained through the .deb

    If i do change those links to point to the source folder obtained from the .deb, as it is on the second machine, then madwifi does not compile anymore. I attach the diff of the two folders.

    I'm currently re-doing the compilation process to be sure I did not skip any step (I already know I did not create a link to /usr/src/linux, but could that alone explain the problem?). I'll let you know the outcome of this second try.

    Last piece of info: the kernel I'm compiling is the vanilla kernel patched to install click as a kernel module (, click-1.7.0rc1/etc/linux- Madwifi is version 0.9.4, svn revisions 4007.

    Any idea?

    Thanks :)

    Attached Files:

  2. cryma

    cryma New Member

    I just finished to rebuild the .deb and install them on both the original and the second machine. Same problem as before.

    The only other hint that I can give you is the output of:
    sudo dpkg -i linux-image-
    sudo dpkg -i linux-image-
    Setting up linux-image- ( ...
     Hmm. There is a symbolic link /lib/modules/
     However, I can not read it: No such file or directory
     Therefore, I am deleting /lib/modules/
     Hmm. The package shipped with a symbolic link /lib/modules/
     However, I can not read the target: No such file or directory
     Therefore, I am deleting /lib/modules/
    However, /lib/modules/mykernel/build points to the right sources (installed by the deb). However with those sources I cannot compile madwifi.

Share This Page