LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-10-2006, 03:50 PM   #1
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Rep: Reputation: 15
Kernel from source Question


My Debian 3.1 installation is currently running 2.4.27 and I wanted to update to 2.6.8. Since I wanted control over what modules etc were in the kernel I figured doing it from the Debian source was my best bet.

I downloaded kernel-source-2.6.8.tar.bz2 from apt and extracted it to /usr/src/kernel-source-2.6.8.tar.bz2 and created a linux symlink to it. I then changed to the linux directory and did make menuconfig.

In there I specified my processor type, and went through all the options removing stuff I don't need (this is a small server that is command line only so I didn't need a lot of the graphical, usb etc stuff). I'd estimate probably 40% of the default enabled options were no longer enabled. I saved the config and verified it created a .config file. I copied that .config to another directory as a backup

I then moved on to building the kernel. First I did:

make-kpkg clean

When that was finished I did:

make-kpkg --append-to-version=.08102006 --revision 10.00.Custom kernel_image

and let it compile. When it was done I found the Kernel in the /usr/src directory but to my suprise it was much larger than I expected.

-rw-r--r-- 1 root src 4.6M 2006-08-10 13:16 kernel-image-2.6.8.08102006_10.00.Custom_i386.deb

I was curious, since my stock Debian 2.4 kernel is 3.7MB in size if this could be right. So I removed the .deb file went back into the /usr/src/linux directory, deleted the .config file and again did make menuconfig this time only setting the correct processor type and leaving EVERY default option enabled. I again did the exact same make-kpkg commands and the created Kernel Image was identical size at 4.6M.

I'm a newbie to compiling my own kernel, but it appears as if it ignored my .config file and just compiled it with all the base options.

Did I do something wrong here?
 
Old 08-11-2006, 01:49 PM   #2
pda_h4x0r
Member
 
Registered: Feb 2006
Location: somewhere in cyberspace
Distribution: Debian, Familiar
Posts: 380

Rep: Reputation: 31
Actually, you should probably load the configuration options from /boot (to be safe). The size of that kernel package is typical--I'm pretty sure that kernel packages include all the modules you built as well (but don't quote me).
 
Old 08-11-2006, 02:27 PM   #3
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Looks like it is normal and whatever you do don't load the config from boot for a 2.4 kernel it will fail.

Code:
ll /usr/src/linux-image-2.6.1*
-rw-r--r-- 1 stephen src 4.5M 2006-06-02 18:29 /usr/src/linux-image-2.6.16-ck11-abit_2.6.16-ck11-abit-10.00.Custom_amd64.deb
-rw-r--r-- 1 stephen src 4.6M 2006-08-01 19:09 /usr/src/linux-image-2.6.17-ck1_2.6.17-ck1-10.00.Custom_amd64.deb
-rw-r--r-- 1 stephen src 4.6M 2006-08-05 14:17 /usr/src/linux-image-2.6.17-ck1-smp_2.6.17-ck1-smp-10.00.Custom_amd64.deb
 
Old 08-11-2006, 04:55 PM   #4
pda_h4x0r
Member
 
Registered: Feb 2006
Location: somewhere in cyberspace
Distribution: Debian, Familiar
Posts: 380

Rep: Reputation: 31
Oops, please ignore my suggestion to the contrary!
 
Old 08-11-2006, 06:52 PM   #5
Jukas
Member
 
Registered: Mar 2005
Posts: 141

Original Poster
Rep: Reputation: 15
Interesting.. Thanks HappyTux, I've still got the 2.6x I compiled so I'll give it a whirl and I have 2.4 to fall back on if needed.

Quote:
Originally Posted by HappyTux
Looks like it is normal and whatever you do don't load the config from boot for a 2.4 kernel it will fail.

Code:
ll /usr/src/linux-image-2.6.1*
-rw-r--r-- 1 stephen src 4.5M 2006-06-02 18:29 /usr/src/linux-image-2.6.16-ck11-abit_2.6.16-ck11-abit-10.00.Custom_amd64.deb
-rw-r--r-- 1 stephen src 4.6M 2006-08-01 19:09 /usr/src/linux-image-2.6.17-ck1_2.6.17-ck1-10.00.Custom_amd64.deb
-rw-r--r-- 1 stephen src 4.6M 2006-08-05 14:17 /usr/src/linux-image-2.6.17-ck1-smp_2.6.17-ck1-smp-10.00.Custom_amd64.deb
 
  


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
casting question in kernel source code linetnew Programming 3 04-18-2005 04:55 AM
Captive-NTFS for FC3? and kernel source question eco2geek Fedora 5 03-12-2005 03:41 AM
newer Fedora kernel-source question cdrobsonjr Fedora 1 10-15-2004 07:40 AM
question about kernel source caesarkim Linux - Newbie 2 11-15-2003 07:26 AM
PPP Support and Kernel Source Question jrdioko Slackware 11 07-25-2003 08:55 AM

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

All times are GMT -5. The time now is 10:14 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