LinuxQuestions.org
Visit Jeremy's Blog.
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 06-29-2008, 10:58 PM   #1
parent's_basement
Member
 
Registered: Dec 2006
Posts: 111

Rep: Reputation: 16
No kernel source


Hello,

My /usr/src is empty. This is a new install of etch. I'm installing on another machine and want the kernel source included. I don't remember a section during install where I was given the choice to include or leave out the source. How is this done?

Thanks,

pb
 
Old 06-29-2008, 11:04 PM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Try

apt-cache search kernel-devel

or apt-cache search kernel-header
 
Old 06-29-2008, 11:13 PM   #3
parent's_basement
Member
 
Registered: Dec 2006
Posts: 111

Original Poster
Rep: Reputation: 16
Thanks for the reply. Both commands return 0 results.

-pb
 
Old 06-30-2008, 02:01 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Sorry - just noticed that on debian systems it's linux-headers, so

apt-cache search linux headers
 
Old 06-30-2008, 03:12 AM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
The kernel source is called linux-source on Debian.
 
Old 06-30-2008, 03:53 AM   #6
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Close - I wasn't n debian at the time - and I managed to not type the "-"

At least it was obvious that some looking would find them huh?
 
Old 06-30-2008, 06:10 AM   #7
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Quote:
Originally Posted by billymayday View Post
Close - I wasn't n debian at the time - and I managed to not type the "-"

At least it was obvious that some looking would find them huh?
True. I happened to be tinkering with someones Debian install last night, thats why I remebered the exact name.
 
Old 06-30-2008, 07:00 AM   #8
gullit
LQ Newbie
 
Registered: Jun 2008
Posts: 21

Rep: Reputation: 15
I can't remember the package name , but you can try:

apt-get install linux-headers-`uname -a`

Last edited by gullit; 06-30-2008 at 07:02 AM.
 
Old 06-30-2008, 07:07 AM   #9
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
The headers and the source are two different things. Which you need depends on what you're doing. If you just need to build modules (say for wireless or a graphics card), you probably want the headers. If you want to build an entire custom kernel, you want the source. Beware that some scripts give misleading error messages. For example, I think that the NVIDIA installer script will say something like "No source found for the running kernel" when what it really needs is the headers.
 
Old 06-30-2008, 07:09 AM   #10
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Quote:
Originally Posted by billymayday View Post
Close - I wasn't n debian at the time - and I managed to not type the "-"

At least it was obvious that some looking would find them huh?
I've just tinkered with a Debian Lenny install and you are right, you definitely need to install the linux-headers which will pull other packages needed for building against the kernel.
 
Old 06-30-2008, 09:08 AM   #11
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Just to add a bit more confusion :
apt-get source linux-image-2.6-486
?

Hum, just discovered this linux-source package, I wonder the difference with the apt-get source command..
 
Old 06-30-2008, 06:25 PM   #12
parent's_basement
Member
 
Registered: Dec 2006
Posts: 111

Original Poster
Rep: Reputation: 16
Sorry for the delay in response. This is what I get:

aquamarine:~# apt-cache search linux-source
linux-patch-debian-2.6.24 - Debian patches to version 2.6.24 of the Linux kernel
linux-source-2.6.24 - Linux kernel source for version 2.6.24 with Debian patches
linux-tree-2.6.24 - Linux kernel source tree for building Debian kernel images
linux-patch-debian-2.6.25 - Debian patches to version 2.6.25 of the Linux kernel
linux-source-2.6.25 - Linux kernel source for version 2.6.25 with Debian patches
linux-tree-2.6.25 - Linux kernel source tree for building Debian kernel images
aquamarine:~# uname -a
Linux aquamarine 2.6.24-1-686 #1 SMP Thu May 8 02:16:39 UTC 2008 i686 GNU/Linux

I want to patch my existing kernel but I'm not sure (literally) where to start (my first time). All the HOWTOs start at /usr/src. I'm still not sure why with a default install, the source isn't there.

This is in my /boot directory:

aquamarine:/boot# lsx
total 28004
drwxr-xr-x 4 root root 4096 2008-06-15 06:43 .
drwxr-xr-x 22 root root 4096 2008-05-13 19:04 ..
-rw-r--r-- 1 root root 80542 2008-02-10 16:25 config-2.6.22-3-686
-rw-r--r-- 1 root root 86067 2008-05-07 21:48 config-2.6.24-1-686
drwxr-xr-x 2 root root 4096 2008-05-21 15:02 grub
-rw-r--r-- 1 root root 6435082 2008-05-13 19:05 initrd.img-2.6.22-3-686
-rw-r--r-- 1 root root 5436664 2008-05-13 15:37 initrd.img-2.6.22-3-686.bak
-rw-r--r-- 1 root root 6004146 2008-06-15 06:43 initrd.img-2.6.24-1-686
-rw-r--r-- 1 root root 6003512 2008-06-10 17:06 initrd.img-2.6.24-1-686.bak
drwx------ 2 root root 16384 2008-05-13 15:33 lost+found
-rw-r--r-- 1 root root 810034 2008-02-10 16:25 System.map-2.6.22-3-686
-rw-r--r-- 1 root root 882643 2008-05-07 21:48 System.map-2.6.24-1-686
-rw-r--r-- 1 root root 1359024 2008-02-10 16:24 vmlinuz-2.6.22-3-686
-rw-r--r-- 1 root root 1455896 2008-05-07 21:48 vmlinuz-2.6.24-1-686


Thanks,

pb

Last edited by parent's_basement; 06-30-2008 at 06:28 PM.
 
Old 06-30-2008, 06:38 PM   #13
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
What do you want to do?
 
Old 06-30-2008, 07:09 PM   #14
parent's_basement
Member
 
Registered: Dec 2006
Posts: 111

Original Poster
Rep: Reputation: 16
Sorry. I want to patch my kernel. The HOWTOs online assume as the starting point in their instructions, that a kernel source is installed in /usr/src/linux. I'm confused as to where the source is, since its not in my /usr/src. I looked in /boot as shown above, but am not sure exactly what I'm seeing.

-pb
 
Old 06-30-2008, 07:37 PM   #15
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Yes,but how do you want to patch your kernel?
For start,post the output of the command uname -a
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Manual nvidia install needs kernel source, unable to select source in YOU sirius57 Linux - Hardware 2 12-04-2007 05:11 PM
LXer: Howto: build Linux kernel module against installed kernel w/o full kernel source tree LXer Syndicated Linux News 0 09-03-2006 08:21 PM
Debain kernel source or Linux kernel source? kushalkoolwal Debian 4 11-28-2005 01:56 PM
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

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

All times are GMT -5. The time now is 05:31 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration