Friday, September 10, 2010

Process for buildin new kernel

Build the kernel

a. Download kernel

b. Untar it
c. make menuconfig
d. This Command builds the images in the *parent directory*
/usr/bin/fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers

Install the kernel
a. Move the packages to target machine and install

sudo dpkg --purge linux-headers-2.6.35.4-custom
sudo dpkg --purge linux-image-2.6.35.4-custom
sudo rm -f /boot/initrd.img-2.6.35.4-custom*

sudo dpkg -i linux-headers-2.6.35.4-custom_2.6.35.4-custom-10.00.Custom_amd64.deb
sudo dpkg -i linux-image-2.6.35.4-custom_2.6.35.4-custom-10.00.Custom_amd64.deb
sudo update-initramfs -c -k 2.6.35.4-custom

b. Update initramfs
sudo update-initramfs -c -k 2.6.35.4-custom

c. Update grub.conf.
Add initrd file path.
Edit the path of root device in kernel options from /dev/hda1 to /dev/sda1.


Reboot.. Hopefully it should come up with no kernel panics.