Wednesday, February 2, 2011

Compiling the Linux Kernel

Steps to follow:

  1. Unpack the sources

  2. Optional - Copy config file : You can copy the config file from your old linux kernel source tree to new kernel tree (may save time, if you want to reuse the old settings).

  3. make clean; make mrproper

  4. make xconfig

  5. make dep

  6. Give a unique name to your new Kernel - Edit /usr/src/linux/Makefile and change EXTRAVERSION

  7. nohup make bzImage

  8. 'make modules' and 'make modules_install'

  9. And you can go to lunch or go to bed (have nice Linux dreams in sleep) and when you come back the system is ready! And see the log with 'less nohup.out'.

  10. make install [num ] But NOT recommended - use cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage.myker

  11. Configure GRUB or LILO.

  12. Reboot and check new kernel is booting

  13. Create emergency boot disk - bzdisk or mkbootdisk

  14. Optional - make rpm [num ] To build rpm packages

  15. Optional - make clean (If you want to free up disk space)

No comments:

Post a Comment