Author Topic: driver: Error! Your kernel source for kernel 2.6.24-28-server cannot ...[SOLVED]  (Read 3634 times)

eboxnas

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
I use DKMS (Dynamic Kernel Module Support) for installing an adaptec driver (aacraid for Adaptec 3405).

I have the following problem. When I try to build the driver, DKMS ist unable to locate the kernel-sources. Looking at /lib/modules/<version>, there is NO build folder and no source folder.
I tried to locate the source, but without success.

Where do I find the kernel sources? If they are not on my machine, how can I get them locally?

DKMS-Error-Message:
root@eboxnas:/tmp# sudo dkms build -m aacraid -v 1.1.5.25500

Error! Your kernel source for kernel 2.6.24-28-server cannot be found at
/lib/modules/2.6.24-28-server/build or /lib/modules/2.6.24-28-server/source.
You can use the --kernelsourcedir option to tell DKMS where it's located.
root@eboxnas:/tmp#

Using the option --kernelsourcedir, I tried nearly every folder below /lib/modules, but the kernel sources are not found by dkms.

Can someone help me?

« Last Edit: July 20, 2010, 04:36:09 pm by eboxnas »

naelq

  • Zen Monk
  • **
  • Posts: 65
  • Karma: +0/-0
    • View Profile
looks like you are missing the kernel-headers, more: https://help.ubuntu.com/community/Kernel/Compile


nael

miko-edv

  • Zen Apprentice
  • *
  • Posts: 25
  • Karma: +0/-0
    • View Profile
    • MiKo-EDV
just did it for installing vmware-toolbox:

apt-get install linux-headers-`uname -r`

good luck
Michael

eboxnas

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Thank you very much, Nael and Michael,

your link, Nael, was very informative for me. The command (of Michael)

apt-get install linux-headers-`uname -r`

was sufficient to solve my problem. The driver build and installation completed successfully:

root@eboxnas:/home/DATA/software/adaptec/DKMS_Driver_3405_v1.1.5-25500# dkms build -m aacraid -v 1.1.5.25500

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=2.6.24-28-server -C /lib/modules/2.6.24-28-server/build SUBDIRS=/var/lib/dkms/aacraid/1.1.5.25500/build modules......
cleaning build area....

DKMS: build Completed.


root@eboxnas:/home/DATA/software/adaptec/DKMS_Driver_3405_v1.1.5-25500# dkms install -m aacraid -v 1.1.5.25500
Running module version sanity check.

aacraid.ko:
 - Original module
   - Found /lib/modules/2.6.24-28-server/kernel/drivers/scsi/aacraid/aacraid.ko
   - Storing in /var/lib/dkms/aacraid/original_module/2.6.24-28-server/i686/
   - Archiving for uninstallation purposes
 - Installation
   - Installing to /lib/modules/2.6.24-28-server/updates/dkms/

depmod.....

Saving old initrd as /boot/initrd.img_old-2.6.24-28-server
Making new initrd as /boot/initrd.img-2.6.24-28-server
(If next boot fails, revert to the _old initrd image)
mkinitramfs.......

DKMS: install Completed.
root@eboxnas:/home/DATA/software/adaptec/DKMS_Driver_3405_v1.1.5-25500#

naelq

  • Zen Monk
  • **
  • Posts: 65
  • Karma: +0/-0
    • View Profile
i'm glad it worked :)
please, could you edit the subject of the 1st post, to include [SOLVED] ;)


nael

eboxnas

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Certainly, Nael,
it is done.
Thanks again,
best regards