The Debian Linux Kernel Handbook (Etch)
The Debian Linux Kernel Handbook (Lenny version - WORK IN PROGRESS)
If you've never done this before, it's quite an intimidating process, especially if you don't want to screw up what you already have so here's an introduction. Glance through this and then you'll be ready to read the references posted above.
I'm still working on this. It seems to me that if this all works, the md5sum for the existing kernel will be the same as the md5sum for the compiled kernel.
First you have to know a few things:
uname -r to see what yours is)sudo aptitude install linux-source-2.6.26. This will put a file -
linux-source-2.6.26.tar.bz2 - in the /usr/src/ directory which you then have to extract using
tar jxvf linux-source-2.6.26.tar.bz2 which will dump a ton of stuff into the directory
/usr/src/linux-source-2.6.26, most of which you won't want because the package supports building of
kernel images and headers for all currently supported architecturesHere's my question: You want the source at the current maximum patchlevel so you aptitude install
linux-source-2.6.26 as stated above. After unpacking, you have a /usr/src/linux-source-2.6.26/
directory full of stuff. Time goes by. You get back to messing with the kernel but what was the
"current maximum patchlevel" that you extracted way back when? Here's the answer:
Go into that directory and cat version.Debian
When you install the Debian kernel source at the current maximum patchlevel this is probably not the patchlevel currently running on your computer. To get the Debian kernel source at the patchlevel different from the one provided by the current linux-source-version package, one should first install and unpack it, then roll back the unneeded patch sets using a script from the linux-patch-debian-version package.
sudo aptitude install linux-patch-debian-2.6.18cd /usr/src/linux-source-2.6.18sudo /usr/src/kernel-patches/all/2.6.18/apply/debian 2.6.18-3This last command unrolls all the patches down to patchlevel 3
If you've ever tried to compile a kernel you know that you get asked a ton of questions, most of which you have no clue how to answer. It seems there should be some kind of script that knows all the answers that were given when your current kernel was compiled at the factory and lets you just scroll through and pick out the changes you might want, sort of the way the Synaptic package manager works. Well, it turns out there is such a script and there is also an answer file that matches your very own copy of the kernel. The answer file is /boot/config-2.6.26-2-486 (or something similiar) and it's plain ASCII and you can peruse it to your heart's content. Copy it to /usr/src/linux-source-2.6.26 and name it .config
Now to run the script that will let you make changes, complete with help run
sudo make menuconfig and spend the rest of the day playing with that.
To quit the script, press <Esc> twice.
To be continued...
![]() |
This site best viewed with a browser |
| Warning: This is a Debian centric site | |
| Many thanks to Debra and Ian Murdock for making Debian possible | |
| First created Jan 20, 2010 ~ Last revised January 22, 2010 |