LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-25-2004, 11:28 AM   #1
greg108
Member
 
Registered: Aug 2003
Location: CA USA
Distribution: FC2, FC4, Mandrake 10, Slackware 10, RedHat 9, Suse 9.1, College Linux, Debian Sarge, Gentoo
Posts: 170

Rep: Reputation: 30
kernel source


I installed debian from a netinstall
but no kernel sources were installed
I need current kernel sources to install nvidia driver
uname -r shows:
2.6.7-1-386
apt-get can't locate this version

How do I get source for the kernel that was installed from netinstaller cdrom?
 
Old 08-25-2004, 12:04 PM   #2
halo14
Senior Member
 
Registered: Apr 2004
Location: Surprise, AZ
Distribution: Debian | CentOS | Arch
Posts: 1,103

Rep: Reputation: 45
check this link out... it'll tell you how to download the kernel source...

http://www.desktop-linux.net/debkernel.htm
 
Old 08-25-2004, 12:23 PM   #3
greg108
Member
 
Registered: Aug 2003
Location: CA USA
Distribution: FC2, FC4, Mandrake 10, Slackware 10, RedHat 9, Suse 9.1, College Linux, Debian Sarge, Gentoo
Posts: 170

Original Poster
Rep: Reputation: 30
I had to download kernel-source-2.6.7
this was the closest I found.
But nvidia installer doesn't like. it says

/blah/blah/modversion.h not found. most likely linux/include have not been configured.

I know I could compile this kernel. But I want to avoid it for now.

I just want the same source that compiled my kernel during installation.

Any ideas?
 
Old 08-25-2004, 12:25 PM   #4
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Rep: Reputation: 101Reputation: 101
Code:
apt-get install kernel-source-2.6.7
Will install the kernel source. You probably want to also unpack the source and link it to /usr/src/linux:
Code:
cd /usr/src
tar -jxf kernel-source-2.6.7.tar.bz2
rm linux
ln -s kernel-source-2.6.7 linux
cd /usr/src/linux
cp /boot/config-2.6.7-1-386 .config
 
Old 08-25-2004, 12:30 PM   #5
utanja
Member
 
Registered: Apr 2004
Location: Europe:Salzburg Austria USA:Orlando,Florida;
Distribution: Debian
Posts: 643

Rep: Reputation: 32
Quote:
Originally posted by greg108
I had to download kernel-source-2.6.7
this was the closest I found.
But nvidia installer doesn't like. it says

/blah/blah/modversion.h not found. most likely linux/include have not been configured.

I know I could compile this kernel. But I want to avoid it for now.

I just want the same source that compiled my kernel during installation.

Any ideas?

try this....
at root

#......apt-get install kernel-source-$(uname -r)
#.....apt-get install kernel-headers-$(uname -r)

then extract both and set a symbolic link to kernel-source-$(uname -r) and rename the link to linux

 
Old 08-25-2004, 04:13 PM   #6
greg108
Member
 
Registered: Aug 2003
Location: CA USA
Distribution: FC2, FC4, Mandrake 10, Slackware 10, RedHat 9, Suse 9.1, College Linux, Debian Sarge, Gentoo
Posts: 170

Original Poster
Rep: Reputation: 30
I couldn't get the nvidia driver to work.
I had to recompile kernel.

thanks anyway
 
Old 08-25-2004, 08:17 PM   #7
Clark Bent
Member
 
Registered: Jul 2004
Distribution: Debian, FreeBSD, Slamd64
Posts: 201

Rep: Reputation: 30
Just curious...but can anybody tell me the advantage of installing the kernel the Debian way rather than just going over to kernel.org and downloading the source? I have never quite understood this...except perhaps maybe a person can upgrade to a newer kernel and not have to change their config?
 
Old 08-25-2004, 10:53 PM   #8
greg108
Member
 
Registered: Aug 2003
Location: CA USA
Distribution: FC2, FC4, Mandrake 10, Slackware 10, RedHat 9, Suse 9.1, College Linux, Debian Sarge, Gentoo
Posts: 170

Original Poster
Rep: Reputation: 30
I think it is just easier, because kpkg copies kernel and other files like initrd.img automatically with just one command. It also edited grub for me.
Another thing it uses kernel-image. I think this means that kpkg compiles kernel in some kind of debianish preferred way. But I don't know any technical details.
 
Old 08-25-2004, 11:11 PM   #9
Clark Bent
Member
 
Registered: Jul 2004
Distribution: Debian, FreeBSD, Slamd64
Posts: 201

Rep: Reputation: 30
Thats interesting...the concept of compiling the kernel in a Debian type manner. I know Gentoo offers their own kernel as well. Matter of fact (I'm sorta new here so forgive me) but I think there is even a kernel associated with this site isn't there?

At any rate, I wonder what sort of optimizations could be passed?? I mean it's all the same code...is it not? Perhaps it is not. That would certainly be interesting. Doesn't Red Hat tweak the kernel as well? I guess that is the advantage of Open Source. I'll have to try it the Debian way one of these times. I have been compiling kernels for so long just downloading the source and rolling with it that anything else feels strange. It's like when Grub came out. I had used Lilo for so long that anything else was just irritating. I have grown to deal with Grub. Still like Lilo better though.
 
Old 08-26-2004, 12:56 AM   #10
Termina
LQ Newbie
 
Registered: Mar 2004
Distribution: Debian
Posts: 14

Rep: Reputation: 0
I'm having the same problem.

For some reason, debian didn't come with the kernel source (because, as everyone knows, that's never useful).

So now it looks like I'll have to compile the 2.4.26 kernel, etc. etc.

*sighs* Looks like I won't get this machine up and running tonight. =/
 
Old 08-26-2004, 04:40 AM   #11
utanja
Member
 
Registered: Apr 2004
Location: Europe:Salzburg Austria USA:Orlando,Florida;
Distribution: Debian
Posts: 643

Rep: Reputation: 32
afaik.....Kpkg is just a script to automate the standard steps for compiling kernel images...

either way will work...but with kpkg....set it and forget it..
 
Old 08-28-2004, 04:04 PM   #12
towjamb
Member
 
Registered: Aug 2004
Location: Canada
Distribution: Debian
Posts: 87

Rep: Reputation: 15
Adding a few thoughts,

Installing the stock kernel image is quite easy and makes upgrading the kernel equally easy. You may wish to add hardware at a later date and, chances are, this will be added via discover. Make sure you have the matching source and headers, used for compiling 3rd party kernel modules, and you won't go wrong with the Nvidia installer, which makes graphics updates easy, too.

I have tried custom kernels, compiling from Debian sources, but haven't really noticed a huge speed difference from stock.
 
Old 08-29-2004, 07:52 PM   #13
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Rep: Reputation: 101Reputation: 101
The Debian kernel has patches applied to it. The patches are also available to download via apt-get. You can download the stock kernel from kernel.org and apply the Debian patches manually to get the same kernel that is available as source via apt-get.

One warning I received when upgrading the kernel is that the Debian patches enable the cramfs filesystem and initrd won't work without cramfs. If you want to use initrd, you are probably better off using the debian kernel source.
 
  


Reply



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
Debain kernel source or Linux kernel source? kushalkoolwal Debian 4 11-28-2005 01:56 PM
how to integrate driver source into kernel source tree zhchang Linux - Software 5 11-23-2005 12:34 AM
apt-get kernel-source is installing the wrong kernel source. JordanH Ubuntu 10 07-08-2005 05:42 PM
difference between "pure" kernel source, and .deb packaged kernel source microsoft/linux Debian 1 06-19-2005 10:28 PM
where is linux source build directory/kernel source tree? webazoid Linux - Software 2 07-01-2004 08:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:17 PM.

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