0

I upgraded my kernel on Ubuntu 12.04 in order to gain access to the include/uapi/ headers.
The full kernel version that I upgraded to is 3.9.0-030900-generic, following this tutorial.

Unfortunately, the headers seem to have remained the same because the uapi directory doesn't exist. To diagnose the problem, I tried to download the source for my 3.9 kernel with:

sudo apt-get source linux-image-$(uname -r)

However the output is

Picking 'linux' as source package instead of 'linux-image-3.9.0-030900-generic'

And this results in the kernel source for 3.2 being downloaded instead of 3.9.

What action must I take to install the kernel/headers properly?

I looked through these two posts before posting for insights, to no avail:

eitan27
  • 101
  • 2
  • Mainline kernel are mostly for test, you can however install kernel 3.8 from ubuntu officual repositories. – xangua Nov 26 '13 at 20:20
  • Be aware that you can upgrade to the kernel 3.8 via official updates in Precide (Raring kernel) according to: https://wiki.ubuntu.com/Kernel/LTSEnablementStack , does this kernel contain the feature you want? – xangua Dec 24 '13 at 02:19

1 Answers1

1

I suggest you download and install the headers appropriate to your architecture; either 32- or 64-bit, from here: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.9-raring/

chili555
  • 58,968
  • 8
  • 93
  • 129
  • I currently have several header directories, both 3.5.0-linux-headers-3.5.0-23(-generic) and linux-headers-3.9.0-030900-generic. How do I ensure that the 3.9 is set as the default? (Currently my attempts to compile code indicate that 3.5 is still being used) – eitan27 Nov 27 '13 at 09:04
  • Generally, any compile will attempt to use headers matching the currently running kernel: uname -r. If you are not running 3.9.0-xx, reboot and you may have to select it at the GRUB menu. – chili555 Nov 27 '13 at 14:16
  • I am running 3.9.0-xx, according to uname -r. I also did a sudo update-grub and restarted just to make sure. (Same reuslts). – eitan27 Nov 29 '13 at 20:41
  • Do you have the exact matching headers installed? sudo dpkg -s linux-headers-$(uname -r) | head -n3 Where and how did you get the 3.9.0-xx kernel? The headers should be there, too. – chili555 Nov 29 '13 at 22:02