Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Kernel Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th February 2007, 01:43
ikkem ikkem is offline
Member
 
Join Date: Feb 2007
Posts: 85
Thanks: 2
Thanked 2 Times in 1 Post
Default How to Compile kernel headers

Hi I had a question
I wanted to ask how to build kernel_headers for the 2.6.19.3 kernel on debian sarge in order to build the dazuko module
The how to by Falko worked nicely for compiling the kernel source 2.6.19.3 from kernel.org ....thanks for the how to
http://www.howtoforge.com/kernel_compilation_debian
Reply With Quote
Sponsored Links
  #2  
Old 8th February 2007, 20:53
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

If you compiled a kernel from the sources, the kernel headers are already installed.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 8th February 2007, 21:51
ikkem ikkem is offline
Member
 
Join Date: Feb 2007
Posts: 85
Thanks: 2
Thanked 2 Times in 1 Post
Default

hi....
thanks for reacting I get a kernel headers not found error when building the dazuko module maybe I am missing something....
thanks in advance

Last edited by ikkem; 8th February 2007 at 21:54.
Reply With Quote
  #4  
Old 9th February 2007, 15:42
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Did you boot into your new kernel, or are you still using your old one? You can find out by running
Code:
uname -r
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 9th February 2007, 15:49
ikkem ikkem is offline
Member
 
Join Date: Feb 2007
Posts: 85
Thanks: 2
Thanked 2 Times in 1 Post
Default

I boot into my new kernel but for some reason the headers can't be found....
Code:
uname -r  
2.6.19.3-386
I am trying to build the dazuko module to run with antivir

Code:
dpkg -i dazuko-source_2.3.2-1_all.deb
m-a a-i dazuko
module-assistant, error message
Quote:
Bad luck, the kernel headers for the target kernel version could not be found and you did not specify other valid kernel headers to use.
Quote:
If the running kernel has been shipped with the Debian distribution, please
install the package kernel-headers-2.6.19.3-386. If your kernel source tree (or headers) is located in some non-usual location, please set the KERNELDIRS environment variable to the path of this directory, alternatively) specify the source directory we build for with the --kernel-dir option in module-assistant calls.
thanks in advance

Last edited by ikkem; 9th February 2007 at 16:55.
Reply With Quote
  #6  
Old 10th February 2007, 20:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

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
Code:
fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
instead of
Code:
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.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 10th February 2007, 21:55
ikkem ikkem is offline
Member
 
Join Date: Feb 2007
Posts: 85
Thanks: 2
Thanked 2 Times in 1 Post
Default

thanks for reacting I will try the traditional way hopefully that will be sufficient I could not install the kernel_image with the ubuntu way and the kernel headers were not installed in full because the kernel module builder could not find the kernel headers even after I installed the kernel header package
Quote:
darkstar:/usr/src# dpkg -i kernel-image-2.6.19.3-custom686_10.00.Custom_i386.deb
Selecteren van voorheen niet geselecteerd pakket kernel-image-2.6.19.3-custom686.
(Database inlezen ... 142554 bestanden en mappen geďnstalleerd.)
Uitpakken van kernel-image-2.6.19.3-custom686 (uit kernel-image-2.6.19.3-custom686_10.00.Custom_i386.deb) ...
Instellen van kernel-image-2.6.19.3-custom686 (10.00.Custom) ...
/usr/sbin/mkinitrd: /lib/modules/2.6.19.3-custom686: Not a directory
/usr/sbin/mkinitrd: MODULES needs to be set to none?
Failed to create initrd image.
dpkg: fout bij afhandelen van kernel-image-2.6.19.3-custom686 (--install):
subproces post-installation script gaf een foutwaarde 2 terug
Fouten gevonden tijdens behandelen van:
kernel-image-2.6.19.3-custom686
I will try the traditional way hopefully it will help....
ikkem....

Last edited by ikkem; 10th February 2007 at 22:13.
Reply With Quote
  #8  
Old 11th February 2007, 03:20
ikkem ikkem is offline
Member
 
Join Date: Feb 2007
Posts: 85
Thanks: 2
Thanked 2 Times in 1 Post
Default

I followed the how to

Code:
make all
make modules_install
make headers_install
make install
I checked in /boot the ramdisk was not build which made reboot into the new kernel fail (I guess)

I will continue tomorrow.....
Reply With Quote
  #9  
Old 13th February 2007, 16:37
ikkem ikkem is offline
Member
 
Join Date: Feb 2007
Posts: 85
Thanks: 2
Thanked 2 Times in 1 Post
Default

I made the ramdisk
Code:
mkinitrd.yaird -o /boot/initrd.img-2.6.19.3-raysun1 2.6.19.3-raysun1
updated grub
Code:
update-grub
but I still get a error message of kernel headers not found maybe I missed something....

thanks in advance
Reply With Quote
  #10  
Old 14th February 2007, 19:32
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

What's the exact error message, and what kernel version did you try to compile?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
High Availability Samba cluster - DRBD + Heartbeat djalex Server Operation 58 25th May 2007 19:38
Xen 3.0.2 /3.0.3 | No Swap in DomU Merc HOWTO-Related Questions 10 27th March 2007 11:40
Howto resolve sudden server crashes? Possibly spamassassin or clamscan? linus General 3 1st February 2007 09:00
WG311v2 almost working with Edgy (w/o ndiswrapper) need help with the rest caudata Server Operation 11 13th November 2006 20:02
Questions about ubuntu ISP-Server Setup badgerbox76 HOWTO-Related Questions 15 5th March 2006 14:41


All times are GMT +2. The time now is 07:22.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.