# Short kernel compile howto for Debian/Ubuntu


1. Download the kernel's source from <http://kernel.org>;
1. Unpack it somewhere (will use `~/src/linux-3.11` here);
1. Copy the config from the distribution over;

        cp /boot/config-3.8.0.30-generic ~/src/linux-3.11/.config

1. Apply any patches;
1. Go to the kernel source and create an up to date config.

        make oldconfig

    Just use the defaults for all the questions you'll get;

1. Compile the kernel into a debian package for easy installation and
    removal.

        fakeroot make-kpkg --initrd -j 8 --revision 3.11custom kernel_image

1. Install the resulting .deb file and reboot.

        sudo dpkg -i ../linux-image-3.11.0_3.11custom_amd64.deb && sudo reboot

