justlinux.com
Thu, 18-Mar-2010 13:55:58 GMT
internet.com
Forum: Registered Users: 73706, Online: 279
nhfs Here you can view your subscribed threads, work with private messages and edit your profile and preferences Registration is free! Calendar Find other members Frequently Asked Questions Search Home Home

Help File Library: An Easier (and Better) Way to Compile Your Kernel on Red Hat-Based Systems


Written By: Percy de Leon (pdeleon at punkass dot com)
  1. Download the latest stable kernel tarball (currently it's linux-2.4.19.tar.bz2, but that could be different as you read this). Save it in your home directory.
  2. Extract/uncompress the kernel tarball. After extracting the kernel source, change your directory to the kernel source directory.
    tar xjf linux-2.4.19.tar.bz2
    cd linux-2.4.19
    
  3. Enter the following command:
    make mrproper
    
    This will remove all the stale .o files in the source repository. This will also remove all previous kernel configurations (hey, you want to customize the kernel yourself, right?)
  4. Configure your kernel. You may do so by doing a make config, make xconfig, or make menuconfig, or make oldconfig, which are explained below.
    • make config will require you to modify the default kernel configuration (which is the .config file included in the source tarball).
    • make xconfig is a better way to GUI-cally configure your kernel. This requires an X server in order to run.
    • make menuconfig will let you configure your kernel using curses. It's like a GUI but runs on top of the terminal/console.
    • make oldconfig will let you configure your kernel by answering yes, no, or module.
    So let's use the curses method:
    make menuconfig
    
    Configure your kernel as you see fit. If you have some background knowledge on your hardware, the better.
  5. Compile your kernel. This will involve three easy steps: compile all the dependencies, create a compressed kernel image, and compile all the kernel modules.
    make dep && make bzImage && make modules
    
  6. Install the kernel and the kernel modules. You have be root to do this.
    su 
    make modules_install && make install
    
    make modules will install the kernel modules in your new kernel. make install, on the other hand, will automagically modify your grub.conf or lilo.conf file using the '/sbin/installkernel' script via '$KERNEL_SOURCE/arch/i386/boot/install.sh', which will in turn use the scripts in '/usr/share/loader' to install the kernel in the boot partition, generate an initrd (if necessary), and add entries to your lilo.conf or grub.conf file.

    If you're using grub bootloader, you may proceed to step 7. Else, if you're using LILO, don't forget that you have to run lilo before rebooting.

    lilo
    reboot
    
  7. Reboot and enjoy! You should now have a new kernel running on your Red Hat based system.

References: kernel source README.txt; mandrakeuser.org


internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers
internet.commerce
Be a Commerce Partner












The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers