Compiling the Linux Kernel

From Notes

Jump to: navigation, search

On Fedora, CentOS, or Red Hat, use the following steps:

  1. Install ncurses-devel:
    1. sudo yum install ncurses-devel
  2. Download the source from kernel.org (any version you like).
  3. Extract the source in a safe location, do not configure and/or compile as root - use a non-privileged user.
    1. cd /home/myuser && mkdir kernels</code
    2. <code>wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.8.tar.gz
    3. tar xvzf !$ && cd !$
  4. Configure kernel options:
    1. make menuconfig
  5. Compile the kernel and kernel modules
    1. make
  6. Install kernel modules:
    1. make modules_install
  7. Install kernel (and rebuilds initrd):
    1. make install
Personal tools