Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

custom kernel other package DKMS cannot find source / header

User discussion about Debian Development, Debian Project News and Announcements. Not for support questions.
Post Reply
Message
Author
hanasaki
Posts: 41
Joined: 2013-09-10 22:34

custom kernel other package DKMS cannot find source / header

#1 Post by hanasaki »

Built a custom kernel with the below. The build is fine. Install of the kernel, sources, header is fine.
Installing a package (in this case specifically virtualbox) that wants to build its own kernel modules it cannot find the sources or headers.

how can this be addressed?

time fakeroot make-kpkg kernel_image kernel_headers kernel_source

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: custom kernel other package DKMS cannot find source / he

#2 Post by stevepusser »

It's looking for build and source symlinks in your kernel's /lib/modules/<kernel-version> folder that link to the headers folder in /usr/src. I noticed that when I used to build kernel debs that way, I would usually have to manually create those if I installed them on the system I created them on.

Now I'm that I'm rebuilding "proper" repository-type Liquorix kernels for MEPIS and MX 15, that issue doesn't come up. It took me a while to figure out a bit of the complex mechanism inside the /debian folder of the Liquorix source enough to make the correct changes in order to port them over to a Wheezy and Jessie base. After that, building them is just like any other backported package.
MX Linux packager and developer

hanasaki
Posts: 41
Joined: 2013-09-10 22:34

Re: custom kernel other package DKMS cannot find source / he

#3 Post by hanasaki »

custom kernel is 4.3.3 downloaded from kernel.org
the source and headers are in /usr/src/linux-headers-4.3.3/ and /usr/src/linux-source-4.3.3/ following the dpkg -i install of the .deb created from making the kernel.

Just looks like the install did not create the symlinks in /lib/modules/4.3.3/

Should it have? I would think so.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: custom kernel other package DKMS cannot find source / he

#4 Post by stevepusser »

This was years ago, but I found that the headers deb would create the symlinks correctly when installed any other machine except for the one used to build them. It seemed that something on that machine got set to use the completed build folder for the kernel by default, instead of creating the correct symlinks to the header folder. But they were easy to create manually.

Note that the kernel build folder also had to hold the completed build, not just freshly extracted source, so the headers folder is going to be a very small fraction of the size.
MX Linux packager and developer

Post Reply