LinuxQuestions.org
Help answer threads with 0 replies.
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 03-26-2008, 06:28 PM   #1
keratos
Member
 
Registered: May 2007
Location: London, UK.
Distribution: Major:FC8. Others:Debian;Zenwalk; Arch; Slack; RHEL.
Posts: 544

Rep: Reputation: 30
[SOLVED] cant find kernel tree for 2.6.18-6-k7


Where can I find kernel source tree PACKAGE that was used to build the Debian 4 lenny/sid image that I selected at installtime via "tiny USB" netinst boot.

see below...(using 2.6.18-6-k7).

thanks!


Code:
$ uname -a
Linux desktop 2.6.18-6-k7 #1 SMP Sun Feb 10 22:16:15 UTC 2008 i686 GNU/Linux

$ dpkg -l | grep 2.6.18-6-k7
ii  linux-image-2.6.18-6-k7   2.6.18.dfsg.1-18etch1   Linux 2.6.18 image on AMD K7

$ apt-cache search 2.6.18-6-k7
gspca-modules-2.6.18-6-k7 - gspca video for linux (v4l) driver modules for Linux 2.6.18 on AMD K7
linux-headers-2.6.18-6-k7 - Header files for Linux 2.6.18 on AMD K7
linux-image-2.6.18-6-k7 - Linux 2.6.18 image on AMD K7
loop-aes-modules-2.6.18-6-k7 - loop-AES encryption modules for Linux 2.6.18 on AMD K7
redhat-cluster-modules-2.6.18-6-k7 - Redhat Cluster infrastructure modules for Linux 2.6.18 on AMD K7
squashfs-modules-2.6.18-6-k7 - Squash filesystem modules for Linux 2.6.18 on AMD K7
unionfs-modules-2.6.18-6-k7 - Unionfs modules for Linux 2.6.18 on AMD K7

$ cat /etc/apt/sources.list
# deb http://debian.virginmedia.com/ etch main

deb http://debian.virginmedia.com/ testing main contrib non-free
deb-src http://debian.virginmedia.com/ testing main contrib non-free

deb http://security.debian.org/ etch/updates main
deb-src http://security.debian.org/ etch/updates main

Last edited by keratos; 03-28-2008 at 09:45 AM. Reason: SOLVED
 
Old 03-26-2008, 08:14 PM   #2
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
It should be this, I think: http://packages.debian.org/etch/linux-source-2.6.18
 
Old 03-27-2008, 04:16 AM   #3
keratos
Member
 
Registered: May 2007
Location: London, UK.
Distribution: Major:FC8. Others:Debian;Zenwalk; Arch; Slack; RHEL.
Posts: 544

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Telemachos View Post
LoL

I wish it was that simple.

thanks for the thought

however, I require the package including the .config that was used to build the image package.
 
Old 03-27-2008, 07:33 AM   #4
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
I may be wrong, but I think that it is almost that simple: the config is in the kernel package itself. The source is in the source. If you download the kernel and then copy the .config into the source package and do "make menuconfig", you should be where you want to be. Since you already have that kernel installed, all you need to do is this:

1: Boot into that kernel.
2: Apt-get or aptitude install the source package.
3: Untar the source. (I prefer to do it into my home directory in a folder called kernels, rather than to clutter up the /usr/src directory.)
4: cp /boot/config-$(uname -r) /path/to/src/.config
5: make menuconfig

That should get you going.

Edit - there's lots of "build kernels in Debian" links, but I like this one (as a description of what packages you should have installed if you want to build a kernel in Debian): http://technowizah.com/2005/12/debia...l-compile.html

Second edit - as far as I know, Debian doesn't provide or ship precisely what you want (the source + config for a specific kernel). It makes sense to me that they don't because the whole point of a precompiled kernel is that it's premade and a source package is often "build your own". That said, I get that you might want to start building your own from the -k7 kernel, but to do that, I'm pretty sure that you copy the config from your kernel over to the untarred source file. (Pretty sure because I have done exactly that myself.)

Last edited by Telemachos; 03-27-2008 at 07:52 AM. Reason: Clarified what I meant
 
Old 03-27-2008, 07:36 PM   #5
keratos
Member
 
Registered: May 2007
Location: London, UK.
Distribution: Major:FC8. Others:Debian;Zenwalk; Arch; Slack; RHEL.
Posts: 544

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Telemachos View Post
I may be wrong, but I think that it is almost that simple: the config is in the kernel package itself. The source is in the source. If you download the kernel and then copy the .config into the source package and do "make menuconfig", you should be where you want to be. Since you already have that kernel installed, all you need to do is this:

1: Boot into that kernel.
2: Apt-get or aptitude install the source package.
3: Untar the source. (I prefer to do it into my home directory in a folder called kernels, rather than to clutter up the /usr/src directory.)
4: cp /boot/config-$(uname -r) /path/to/src/.config
5: make menuconfig

That should get you going.

Edit - there's lots of "build kernels in Debian" links, but I like this one (as a description of what packages you should have installed if you want to build a kernel in Debian): http://technowizah.com/2005/12/debia...l-compile.html

Second edit - as far as I know, Debian doesn't provide or ship precisely what you want (the source + config for a specific kernel). It makes sense to me that they don't because the whole point of a precompiled kernel is that it's premade and a source package is often "build your own". That said, I get that you might want to start building your own from the -k7 kernel, but to do that, I'm pretty sure that you copy the config from your kernel over to the untarred source file. (Pretty sure because I have done exactly that myself.)

It was my mirror. Some packages not available.

I managed to get the linux-2.6(.22) package plus the patches upto 2.6.22.8 then deselect down to 2.6.22.3. I wanted to rebuild this kernel using customisation from deb + my own drivers for a serial device I've built (house burglar alarm).Also thrown in a few optimisations and preemptive scheduling plus a new queueing method.

Runs superbly fast now, better than Arch and Vector on same machine.

Thanks for the post anyway.

p.s. its better to use apt-get source

..for source packages

;-)
 
Old 03-27-2008, 11:14 PM   #6
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
Quote:
Originally Posted by keratos View Post
It was my mirror. Some packages not available.

I managed to get the linux-2.6(.22) package plus the patches upto 2.6.22.8 then deselect down to 2.6.22.3.
Yeah, I don't think I get that at all. Let me try to recap. Originally you wanted the source for the 2.6.18-k7 kernel. In fact, you "required" the package and .config for that specific kernel, but (you say) your mirror has some packages not available. Luckily, you managed to get the sources for 2.6.22 kernel (not -k7 of course, because as I said there are no separate -k7 sources). Huh?

Here's a search from http://packages.debian.org of the debian provided sources: http://packages.debian.org/search?keywords=linux-source The Etch repos have the 2.6.18 sources, and you seem to have upgraded to Lenny. So I'm guessing that your mirror has no problem at all. Because you have Lenny repos in your /etc/apt/sources.list, you can see (and get) the 2.6.22 kernel source but not the 2.6.18 sources. In any event, if you're happy with your kernel, no worries.

Quote:
Originally Posted by keratos
<snip>
p.s. its better to use apt-get source

..for source packages

;-)
Nope: you can install source packages just fine with aptitude.

Edit - I just noticed that your sources are Lenny (testing), but you are still getting Etch security upgrades. You should switch that so that they match. If you get Lenny packages, you want Lenny security fixes.

Last edited by Telemachos; 03-27-2008 at 11:20 PM.
 
Old 03-28-2008, 04:21 AM   #7
keratos
Member
 
Registered: May 2007
Location: London, UK.
Distribution: Major:FC8. Others:Debian;Zenwalk; Arch; Slack; RHEL.
Posts: 544

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Telemachos View Post
Yeah, I don't think I get that at all. Let me try to recap. Originally you wanted the source for the 2.6.18-k7 kernel. In fact, you "required" the package and .config for that specific kernel, but (you say) your mirror has some packages not available. Luckily, you managed to get the sources for 2.6.22 kernel (not -k7 of course, because as I said there are no separate -k7 sources). Huh?
thats about it, yep. I've moved from Gentoo to Deb (too much infighting within the former for my liking) and just getting used to Deb aptitude.
What seems to be the issue is that deb trees only maintain stable versions in a single source tree and deliver unstable through his through the patch system (via patch packages) which must be used to upgrade/downgrade to a specific patch release. So, in my case, it was possible for me to acquire 2.6.22 however the patch (.3) and the arch (-k7) had to be specified in the make-kpkg command. With hindsight, this isnt really an "issue" once one considers the benefits of maintaining only single source tree with patch system - very efficient !

Anyway, all done now and I have to say, once mastered, the system is far more robust , clean and repeatable than the portage system so in that regard, "Respect to Deb".

Quote:
Originally Posted by Telemachos View Post
...have the 2.6.18 sources, and you seem to have upgraded to Lenny. So I'm guessing that your mirror has no problem at all. Because you have Lenny repos in your /etc/apt/sources.list, you can see (and get) the 2.6.22 kernel source but not the 2.6.18 sources. In any event, if you're happy with your kernel, no worries.
Correct again! My mirror had some issues in that certain packages were available, but others were not. Clearly it was more smoke than mirror!! Anyway, I changed to ukdebian.mirror.anlx.net which seems to be current - and quick!


Quote:
Originally Posted by Telemachos View Post
Nope: you can install source packages just fine with aptitude.
Mmm. Whats the difference then?


Quote:
Originally Posted by Telemachos View Post
I just noticed that your sources are Lenny (testing), but you are still getting Etch security upgrades. You should switch that so that they match. If you get Lenny packages, you want Lenny security fixes.
Correct! Again!! I will update - I wasnt sure how this worked. Thanks for clarifying.


Ah , all is clearer now. Many thanks for the education and advice, all appreciated because whilst I'm at home with the compiler/linker/kernel, the deb system is new territory and in that respect I thank you for your time. ;-)

Question then, if I may:
make-kpkg takes a target argument. If I want to build kernel_image and kernel_source, is there a target that can do this. Currently the binary target builds seems to build an independent arch (not what I want) and there doesnt seem to be a combined target for these to (image & source) targets ?? I could always change the Makefiles, but was wondering if there is some other package I could use ???

Last edited by keratos; 03-28-2008 at 04:39 AM.
 
Old 03-28-2008, 05:36 AM   #8
East
Member
 
Registered: Jan 2008
Posts: 84

Rep: Reputation: 15
hi all
I am upgrading the knoppix 5.1.1 kernel to kernel version 2.6.23.12.I am getting error in lilo.conf when i type dpkg -i <kernel image>.Can anyone provide me the steps to follow for kernel upgrade. The lilo.conf error is,

Fatal: Trying to map files from unnamed device 0x0010 (NFS/RAID mirror down ?)

I dont know why this comes.
 
Old 03-28-2008, 07:22 AM   #9
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
Quote:
Originally Posted by keratos View Post
I've moved from Gentoo to Deb (too much infighting within the former for my liking) and just getting used to Deb aptitude.
Welcome to Debian.

Quote:
Originally Posted by keratos View Post
Question then, if I may: make-kpkg takes a target argument. If I want to build kernel_image and kernel_source, is there a target that can do this. Currently the binary target builds seems to build an independent arch (not what I want) and there doesnt seem to be a combined target for these to (image & source) targets ?? I could always change the Makefiles, but was wondering if there is some other package I could use ???
I'm not sure that I get exactly what you want, but it sounds to me like you want to use "make-kpkg binary-arch kernel_source" - the make-kpkg command can take more than one argument for its target. The "binary-arch" bit will give you an arch dependent kernel image deb and kernel headers deb, and kernel_source will give you the sources. If you don't need the headers, you can just do "make-kpkg kernel_image kernel_source". Check man make-kpkg for more (gory) details on valid targets. Also for more on Debian and the kernel, you might check this out: http://kernel-handbook.alioth.debian.org/

As far as aptitude vs. apt-get, that's a "third rail" question in Debian. Apt-get is the tried and true package manager (think portage, I suppose), and aptitude is the (relatively) new kid on the block. For installing a kernel source package, you can really use either. I wasn't really pushing you to use aptitude, I just thought that you were telling me not to use it. If you are curious about the differences, Google for "aptitude vs. apt-get" (or apt-get vs. aptitude). Here's one to look at: http://pthree.org/2007/08/12/aptitude-vs-apt-get/
 
Old 03-28-2008, 09:45 AM   #10
keratos
Member
 
Registered: May 2007
Location: London, UK.
Distribution: Major:FC8. Others:Debian;Zenwalk; Arch; Slack; RHEL.
Posts: 544

Original Poster
Rep: Reputation: 30
Excellent post.

Okay, I have it now, its in progress.

Many thanks.

It is actually much easier than Deb albeit a little learning curve

Cheers budy.
 
Old 03-28-2008, 02:33 PM   #11
keratos
Member
 
Registered: May 2007
Location: London, UK.
Distribution: Major:FC8. Others:Debian;Zenwalk; Arch; Slack; RHEL.
Posts: 544

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by East View Post
hi all
I am upgrading the knoppix 5.1.1 kernel to kernel version 2.6.23.12.I am getting error in lilo.conf when i type dpkg -i <kernel image>.Can anyone provide me the steps to follow for kernel upgrade. The lilo.conf error is,

Fatal: Trying to map files from unnamed device 0x0010 (NFS/RAID mirror down ?)

I dont know why this comes.
post output of following commands (as "root" user):
Code:
ls -l /boot
fdisk -l
cat /etc/lilo.conf
mount
 
  


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
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
Find 100 largest files in folder tree tyreth Linux - General 2 02-07-2006 08:18 AM
Where to find Kernel Source Tree cacososa Linux - Software 4 12-06-2003 03:50 AM
Where can I find Kernel Source Tree? cacososa Linux - Software 1 12-05-2003 05:20 AM
how to find the kernel source tree xtian500 Linux - Software 6 11-13-2001 12:55 AM

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

All times are GMT -5. The time now is 04:04 AM.

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