Building Ubuntu kernels “the right way”

I’ve lost count of how many different kernels I’ve built for different systems, but in the past I always grab the vanilla source from and experiment to get the necessary hardware support. Today I decided to learn how to play nice with Ubuntu’s kernel build facilities. I followed these instructions without issue (except that they show a space between options like –initrd, where there should be no space). Here’s the short version for Ubuntu Intrepid Ibex:

# apt-get install kernel-package libncurses5-dev fakeroot wget bzip2
# apt-get install linux-source
# cd /usr/src
# tar xjvf linux-source-2.6.27.tar.bz2
# ln -s linux-source-2.6.27 linux
# cd linux
# cp /boot/config-2.6.27-9-generic ./.config
# make menuconfig
# make-kpkg clean
# fakeroot make-kpkg --initrd --append-to-version=jm1 kernel_image kernel_headers

# dpkg -i linux-image-
# dpkg -i linux-headers-


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s