How to compile a kernel:

  1. Download the kernel sources from ftp.kernel.org or your mirrors. Verify the signature with:

    gpg --verify <kernel-version.sign>

  2. Backup the old .config file in /tmp

  3. Copy the old .config to NEW kernel sources directory

    Patches: If you have any patches then

      cd /usr/src/NEW_LINUX

      patch –dry-run -p1 < name_of_patch_file

    Run make oldconfig

    make xconfig -----> GUI

    make menuconfig ----> ncurses based

  1. After you make all choices save settings into .config file

  2. Run$ nice +19 make bzImage

  3. $ nice +19 make modules This will take a long time so go to sleep...

  4. Run make modules_install

    Warning: This will install modules in /lib/modules directory.

  5. cp /usr/src/linux-your-version/arch/i386/boot/bzImage /boot/vmlinuz-your-version

  6. cp /usr/src/linux-your-version/System.map /boot/System.map-2.6.11-version

  7. cp /usr/src/linux-your-version/.config /boot/config-2.6.11-version

  8. Unlink the old vmlinuz, initrd

  9. Now execute, mkinitrd -k vmlinuz-2.6.11-version -i initrd-2.6.11-version -b /boot

  10. If you have a splash image then (check www.bootsplash.de) enable bootsplash option in the kernel config file .config,

    mkinitrd -k vmlinuz-2.6.11.10 -i initrd-2.6.11.10 -s 1024x768 -b /boot

  11. Create softlinks to new vmlinuz, initrd

  12. Edit your grub menu.lst if required

  13. Reboot immediately and check. Don't suspend the machine in which case if you reboot with your NEW kernel data corruption will happen.

Hosted by www.Geocities.ws

1