LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Kernel from source Question (https://www.linuxquestions.org/questions/debian-26/kernel-from-source-question-472718/)

Jukas 08-10-2006 03:50 PM

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?

pda_h4x0r 08-11-2006 01:49 PM

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).

HappyTux 08-11-2006 02:27 PM

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


pda_h4x0r 08-11-2006 04:55 PM

Oops, please ignore my suggestion to the contrary!

Jukas 08-11-2006 06:52 PM

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




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