Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 04-18-2007, 08:35 AM   #1
Registered: Sep 2005
Distribution: debian, solaris 10
Posts: 200

Rep: Reputation: 31
install linux headers of a compiled kernel


I have downloaded and configured my own kernel which is I would like to know how could I install the Linux headers It's needed to configure correctly the wireless network card ipw3945...

I am actually trying to install ieee80211 but module assistant doesn't install them due to a problem with kernel-dirs. I have the sources I downloaded from at my home directory : $HOME/kernel/linux.
installing ieee80211 from source gives much more errors. does debian install the Linux-headers when you compile a new kernel... if not how to do it?
make headers_install
doesn't seem to do the trick. how to tell where are the headers and tell ieee80211 or m-a?
i hope i made myself clear.
Old 04-18-2007, 08:56 AM   #2
Dutch Master
Senior Member
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
When you've compiled a kernel from source you automatically have the headers installed. What's the contents of your /usr/src directory? Check if /usr/src/linux brings you to the directory. If not, create the sym-link
ln -s </full/path/to/dir> /usr/src/linux
Remove any other links to /usr/src/linux beforehand!
Old 04-18-2007, 08:57 AM   #3
ReliaFree Maintainer
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,812
Blog Entries: 1

Rep: Reputation: 259Reputation: 259Reputation: 259
First, you really shouldn't replace things in /usr/include/linux. If you do, you risk breaking things that link against the old headers. This includes things like glibc, which is sort of important. And don't ever change or create the /usr/src/linux symlink to point to the new kernel source. It hasn't been done that way for close to a decade. Just do what you did and compile the kernel in $HOME without a symlink in sight.

For years it was common practice to use “raw” kernel headers (straight from a kernel tarball) in /usr/include, but over the last few years, the kernel developers have taken a strong stance that this should not be done. This gave birth to the Linux-Libc-Headers Project, which was designed to maintain an API stable version of the Linux headers. I think it's been awhile since they produced a set of headers.

You should get the headers from Debian. In fact, you should probably use the kernel source provided by Debian rather than vanilla source. Either that or apply the Debian patches.

Last edited by weibullguy; 04-18-2007 at 09:25 AM.
Old 04-18-2007, 09:08 AM   #4
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
I thought m-a prepare does this?
Old 04-18-2007, 10:55 AM   #5
Registered: Sep 2005
Distribution: debian, solaris 10
Posts: 200

Original Poster
Rep: Reputation: 31
the issue is the following.. when I compiled the kernel i did;
fakeroot make-kpkg --append-to-version mglaptop --revision 2 kernel-image

then I did dpkg -i linux-image-

now when I try to look for kernel headers with m-a per instance it's looking for linux-headers- which doesn't exist.
/usr/src/linux is symlinked with linux-headers-

then that's why i get "No such file or Directory".

there must be a way to build a custom linux-headers to suit my custom kernel compilation.

thank you
Old 04-18-2007, 07:23 PM   #6
Registered: Dec 2004
Location: San Antonio, TX
Distribution: Debian-AMD64 Sid
Posts: 481

Rep: Reputation: 31
I usually run
fakeroot make-kpkg --initrd kernel_image kernel_headers

notice the kernel_headers at the end.

You can try (based on yours)

fakeroot make-kpkg --append-to-version mglaptop --revision 2 kernel-headers


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
install new kernel headers cyb0rg777 Slackware 4 04-04-2007 12:21 PM
Install Kernel Headers derrekito Slackware 10 06-28-2006 06:47 AM
kernel-headers and custom compiled kernels jaakkop Slackware 2 11-22-2005 12:21 PM
trying to find/install kernel-source or kernel-headers timsch75 Slackware 3 10-22-2005 10:17 AM
How do I install kernel headers jsurgeson Linux - Newbie 4 03-27-2002 06:01 AM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration