echo "copied from \"http://www.howtoforge.com/kernel_compilation_ubuntu\""
echo "Become the superuser and use bash"sudo passwd root; su; rm -f /bin/sh; ln -s /bin/bash /bin/sh;
echo " Get kernel compile tools"apt-get update; apt-get install kernel-package libncurses5-dev fakeroot wget bzip2
echo "get kernel sources, untar the, and go to source directory"cd /usr/src; wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.1.tar.bz2; tar xjf linux-2.6.18.1.tar.bz2; ln -s linux-2.6.18.1 linux; cd /usr/src/linux
echo "use working kernel config file, compile kernel"cp /boot/config-`uname -r` ./.config; make-kpkg clean; fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
echo "install new kernel as a ackage"cd /usr/src; ls -l; dpkg -i linux-image-2.6.18.1-custom_2.6.18.1-custom-10.00.Custom_i386.deb; dpkg -i linux-headers-2.6.18.1-custom_2.6.18.1-custom-10.00.Custom_i386.deb
echo "Confirm new kernel availability in grub"vi /boot/grub/menu.lst
echo "restart"shutdown -r now
echo "confirm loaded kernel"uname -r