Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: how to build kernel headers for new kernel?

  1. #1
    Member
    Join Date
    Feb 2007
    Posts
    229

    Default how to build kernel headers for new kernel?

    Since this is an ubuntu based distro i figure theres some ubuntu-specific way to build kernel headers? Need them for virtual box and such. I have the sources, but i'm not sure that building things the way i did back in the slax versions is applicable anymore.

    On a sad note, the new kernel still doesnt fix the iwlagn5100 injection issue .

  2. #2
    Senior Member
    Join Date
    Jan 2009
    Posts
    114

    Default

    on /usr/src/linux-source-2.6.30.5 i do
    make-kpkg kernel_headers
    and now have linux-headers-2.6.30.5_2.6.30.5-10.00.Custom_i386.deb
    then install with dpkg
    but this non solve my problem on install nvidia driver (that lloking for headers) instead add other problem
    acer 5920g , 345abg , nvidia 8600m
    bt5 kde 64bit + acpi + cuda 4.0 / nvidia 270.40 / pyrit

  3. #3
    Member
    Join Date
    Feb 2007
    Posts
    229

    Default

    yeah i got that far too, copied the config to the source dir, made headers, installed with dpkg, no dice. are there symlinks that need to be updated?

  4. #4
    Developer
    Join Date
    Mar 2007
    Posts
    6,126

    Default

    Quote Originally Posted by Nemis View Post
    on /usr/src/linux-source-2.6.30.5 i do
    make-kpkg kernel_headers
    and now have linux-headers-2.6.30.5_2.6.30.5-10.00.Custom_i386.deb
    then install with dpkg
    but this non solve my problem on install nvidia driver (that lloking for headers) instead add other problem
    Nvidia should install fine. Every thing you need to either use the backtrack one we built or the source is there. I have done it many, many times.

  5. #5
    Member
    Join Date
    Feb 2007
    Posts
    229

    Default

    nvidia installed fine as per the instructions, but virtualbox complains that it cant find the kernel headers, despite making them from the source of the kernel and installing with dpkg. Any ideas what i may be doing wrong here?

  6. #6
    Senior Member
    Join Date
    Jan 2009
    Posts
    114

    Default You do not appear to be using the NVIDIA X driver. Please edit your X configuration f

    apt-get install nvidia-driver
    this install 190.18 driver BUT nvidia-setting show
    "You do not appear to be using the NVIDIA X driver. Please edit your X configuration file (just run `nvidia-xconfig` as root), and restart the X server. "

    AND in /etc/X11/xorg.conf there is Driver "nv"
    if i try to canghe in driver "nvidia" (like bt4pf 2.6.29.4) i have no screen found error.

    and without header Nvidia---.run don't compile module
    acer 5920g , 345abg , nvidia 8600m
    bt5 kde 64bit + acpi + cuda 4.0 / nvidia 270.40 / pyrit

  7. #7
    Just burned his ISO
    Join Date
    Aug 2009
    Posts
    3

    Default

    I was struggling with the same issue of VirtualBox not seeing the headers after compiling and installing them. I found that the /usr/src/linux symbolic link was still pointing to linux-source-2.6.29.4 so I replaced it with a link to the 2.6.30.5 source.

    That corrected the missing headers problem, now when running the guest additions install it finds the headers but unfortunately still chokes. In the /var/log/vboxadd-install.log it states that it cannot fine Module.symvers file. I'm assuming this file is missing due to only compiling the headers and not the full kernel.

    I'm still researching to find the proper resolution for this. I'll post back if I find anything helpful.

  8. #8
    Member
    Join Date
    Feb 2007
    Posts
    229

    Default

    negative, that symlink points to the source (uncompiled). The headers are stored elsewhere, i remember this from the last time i got in depth with linux on bt3 and a distro i was using to run a proxy in iraq off a laptop (linux does everything, you just have to have better memory than i do to use it on an on-and-off basis). where in the hells were the headers for the 2.6.29 version stored? after we installed the new headers they're prolly there too. searching in /var and /usr, i think they're there somewhere. pureh@te or another senior, care to comment? i think i'm on the right track with this but i'm bloody limited on time to address.

    edit - k, i'm not nuts. /lib/modules has a 2.6.30.5 directory, which is where i believe the headers are. its about time to hit google. fml, i'm getting old and sclerotic.

  9. #9
    Just burned his ISO
    Join Date
    Aug 2009
    Posts
    3

    Default

    Quote Originally Posted by RageLtMan View Post
    negative, that symlink points to the source (uncompiled). The headers are stored elsewhere
    Correct, after I compiled and installed the headers they are located in /usr/src/linux-headers-2.6.30.5 (Edit: At least I think so, unless this is just supporting source created during the dpkg install. I'm new to this kernel stuff)

    I looked to the symlink beause the Vbox install log showed output from it's Make command mentioning that if /usr/src/linux was not the location of your kernel src to add a parameter to the make command specifying it's current location.

    Once I changed the symlink I stopped receiving the missing headers message and received a general failure message. I am assuming that it inferred the headers to look for after looking at /usr/src/linux. I did not have the original kernel headers installed so it would not be able to find them.

    If you are still getting the missing headers error you might want to look at /var/log/vboxadd-install.log after a failed install, it might shed some light.

    Edit: I just verified that Debian distributions store the headers in /usr/src/linux-header-uname.

  10. #10
    Just burned his ISO
    Join Date
    Aug 2009
    Posts
    3

    Default

    Success! I've now got the guest additions installed.

    It turns out the only way to get a correct Module.symvers file is to compile the kernel from source, no shortcuts. To summarize what I did.

    1) This was a fresh install to a VirtualBox vhd using the ubiquity installer. After install I upgraded the kernel using the instructions on the Offensive Security blog.

    2) The new kernel's header files were not installed and the repository only has an install available for the older kernel. So I apt-get'd the 2.6.30.5 source so I could compile headers. apt-get install linux-source-2.6.30.5

    3) Copied the kernel config to /usr/src/linux-source-2.6.30.5/.config and compiled and installed headers. make-kpkg kernel_headers then dpkg -i <whateverthenameis>.deb

    4) Changed the /usr/src/linux symlink to point to the new kernel source directory /usr/src/linux-source-2.6.30.5

    5) Compiled the kernel with a simple make. No need to install this compiled version, just need the Module.symvers file ir creates.

    6) Installed guest additions then rebooted. All is good in my VM universe again.

    Hope this helps someone.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •