Recently I was looking to compile my own kernel that has a few custom patches. Here is how I did it.
Determine your kernel version by running:
-
uname -r
-
3.2.46
Install the following if they are not already:sudo apt-get install bzip2 kernel-package linux-source-3.2 fakeroot build-essential ncurses-dev
Copy and unpackage the Kernel source:
-
cd /usr/src/
-
cp linux-source-3.2.tar.bz2 ~/
-
cd ~/
-
tar -jxf linux-source-3.2.tar.bz2
Now setup the config - Note that I wanted to use the vanilla config, but if you want your own config use the command: make menuconfig:
-
cd linux-source-3.2/
-
cat /boot/config-`uname -r`>.config
Then, cleanup files if you need to and start the build:
-
make-kpkg clean
-
fakeroot make-kpkg --initrd --revision=3myKernel.1.0 kernel_image kernel_headers
Now finally install your packages and reboot:
-
sudo dpkg -i ../linux-image-3.2.46_3myKernel.1.0_amd64.deb
-
sudo dpkg -i ../linux-headers-3.2.46_3myKernel.1.0_amd64.deb
-
sudo reboot -f
Don't forget to select your new kernel.
Cleanup any kernel images your not using (I warn you here!)sudo apt-get remove $(dpkg -l|egrep '^ii linux-(im|he)'|awk '{print $2}'|grep -v `uname -r`)
References:
http://linuxg.net/compile-kernel-3-9-on-debian-wheezy/
http://www.debian.org/releases/stable/i386/ch08s06.html.en
http://www.tux.org/~tbr/debiankernelpkg/
Comments
Debian - Compile Your Own Kernel | Pacific Simplicity
Submitted by Maryellen (not verified) on
“Debian - Compile Your Own Kernel | Pacific Simplicity” was a fantastic read and
I was quite content to find it. Thanks a lot-Maryellen
Visit my web blog Heather
Add new comment