====== Modify / Compile linux kernel for ubuntu ====== there are thousands of methods to do this, but let's do it with all the nice help we can get from ubuntu.. these steps are based on the [[https://help.ubuntu.com/6.10/ubuntu/installation-guide/i386/kernel-baking.html|ubuntu documentation about building a kernel]] and some [[https://help.ubuntu.com/community/Kernel/Compile|Ubuntu community howto about compiling a kernel]] * cd into a directory where you want to have your kernel sources downloaded to * install all the packages needed and download the sources apt-get install fakeroot kernel-wedge build-essential makedumpfile kernel-package libncurses5-dev sudo apt-get build-dep linux apt-get build-dep --no-install-recommends linux-image-`uname -r` apt-get source linux-image-`uname -r` * in ubuntu 10.04 you need to copy the package scripts for ubuntu because otherwhise the initrd file will not be generated (more details in [https://help.ubuntu.com/community/Kernel/Compile|this wiki article]]) cp linux-2.6.32/debian/control-scripts/{postinst,postrm,preinst,prerm} kernel-package/pkg/image/ cp linux-2.6.32/debian/control-scripts/headers-postinst kernel-package/pkg/headers/ * cd into the linux-xxx directory that was created containing the sources * if you want, edit the config make menuconfig * compile and build a deb package (nothe, the overlay-dir is only needed for ubuntu 10.04 (and maybe later too?)) make-kpkg clean fakeroot make-kpkg --overlay-dir=$HOME/kernel-package/ --initrd --append-to-version=-custom.1.0 kernel_image kernel_headers * install the new kernel dpkg -i ../linux-image-.....deb dpkg -i ../linux-headers-.....deb * reboot :)