Now that our kernel is configured, we need to build it. Fortunately, the Debian tool make-kpkg abstracts all the details of the build process.
To avoid corrupting our build, we need to remove stale files left over from the previous step:
sudo make-kpkg clean
To build a kernel image with an initial ram disk (initrd), run the following command:
sudo make-kpkg --append-to-version "-suffix" --initrd kernel_imageReplace -suffix with a string that will distinguish the kernel you are building from ones you may build in the future. make-kpkg uses this suffix when naming the Debian package it creates. If you consistently use the same suffix, you will overwrite previously generated packages each time you build a new image.
Note that the initial ram disk is not needed if you build hardware and file system support for your boot device directly into the kernel. On my IBM ThinkPad, I boot from a generic IDE hard disk that contains an ext3 root file system. By choosing to build support for these directly into the kernel, I no longer need the initial ram disk. Leave off the --initrd option to remove the initial ram disk.
sudo make-kpkg --append-to-version "-suffix" kernel_imageRegardless of which method you choose, make-kpkg will take some time to complete.