SYA710 Building a New Kernel

From CDOT Wiki
Revision as of 15:57, 19 October 2008 by Bombshelter13 (talk | contribs)
Jump to: navigation, search

Building a New Kernel

  • download source from
  • unpack source
    • tar xvjf linux-2.6.26.tar.bz2
  • create configuration (.config) file
    • cd linux-2.6.26
    • cp /proc/config.gz . (If this file does not exist, skip ahead to the alternate approach below.)
    • gzip -d config.gz
    • mv config .config

Alternate method of getting .config:

    1. If the file /proc/config.gz does not exist on your system, you can get the required file by issuing the following commands:
    2. yum install kerneldevel
    3. cp /usr/src/kernels/ ./
    • make oldconfig
  • customize your configuration
    • make menuconfig
  • compile kernel and modules
    • make
  • copy kernel image to /boot
    • cp arch/x86/boot/bzImage /boot/vmlinuz-2.6.26
  • copy system map to /boot
    • cp /boot/
  • install the modules
    • make modules_install
  • create initial ram disk image
    • mkinitrd -k vmlinuz-2.6.26 -i initrd-2.6.26
  • update GRUB
    • vi /boot/grub/menu.lst
  • reboot