Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have compiled Linux kernel 3.9.7 for my AMD FX 6300 (with AMD selected as processor vendor during kernel compilation). After the installation, I restarted the system, and found that the "linux-headers" are not installed (actually I was able to find only the kernel source, not header files at kernel.org).

The consequence:
Nvidia graphic driver and many softwares (which depends on display settings) are not working anymore. The previous installation of nvidia graphics drivers is also not working anymore (however if I start with previous kernel 3.2.xx, it works fine). I tried to re-install nvidia graphics but of no use. I suspect that it might be due to missing linux-headers which I can't see in /usr/src/ directory.

The question:
From where can I get the linux-headers source for 3.9.7 kernel ?
In my opinion it doesn't make sense to use the linux-headers from Ubuntu repo, because I have compile the kernel on my machine, while headers from ubuntu repos are result of their own compilations (compiler mismatch?).

share|improve this question
up vote 1 down vote accepted

Did you compile it under Debian or Ubuntu (EDIT: after rereading I see it's sort of implied where you say "Ubuntu repo" above) and then make a .deb package for it? You might have made a package that doesn't contain the headers.

The following is excerpted from here:

If I think about it - it's possible that the kernel headers aren't installed because in the Debian kernel howto we create a kernel .deb package which doesn't contain the headers.

You can try to combine the Debian kernel howto with this one: http://www.howtoforge.com/kernel_compilation_ubuntu_p2

Run

fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers

instead of

fakeroot make deb-pkg

This should create a kernel headers deb package.

If that doesn't work, you can still compile a kernel the traditional way, without creating a deb package, as shown here: http://www.howtoforge.com/kernel_compilation_fedora_p2 That way the headers will be installed for sure.


share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .