Ubuntuでカーネル再構築

wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.4.tar.gz
tar xvzf linux-2.6.24.4.tar.gz
cd linux-2.6.24.4
cp /boot/config-2.6.22-14-generic .config
cp make oldconfig
fakeroot make-kpkg --initrd --revision local.1.0 kernel_image kernel_headers
sudo dpkg -i linux-headers-2.6.24.4_local.1.0_i386.deb
sudo dpkg -i linux-image-2.6.24.4_local.1.0_i386.deb

※バージョンの場合は適宜置き換えること
カーネルイメージのパッケージをインストールすると/boot/grub/menu.lstがおかしな内容に修正される場合があるので注意