How to recompile linux kernel
Results 1 to 6 of 6

Thread: How to recompile linux kernel

  1. #1

    Question How to recompile linux kernel

    How to recompile the kernel in Redhat linux 8.0
    I just added a module which supports ntfs file system
    but now need to recomplile the kernel

  2. #2
    Junior Member
    Join Date
    Nov 2001
    Posts
    12
    This really doesnt answer your question but I think this site might have what your looking for. You can install ntfs support from an rpm. Complete with easy to follow instructions. As a linux newbie I really appreciate easy to follw instructions


    http://linux-ntfs.sourceforge.net/info/redhat.html

    good luck.
    I dont read these.

  3. #3
    Leftie Linux Lover the_JinX's Avatar
    Join Date
    Nov 2001
    Location
    Beverwijk Netherlands
    Posts
    2,534
    the short way..

    first become a superuser (or login as root)

    su
    enter password

    go to the kernel source folder (usualy /usr/src/linux)

    cd /usr/src/linux

    then configure the kernel

    make menuconfig

    after selecting the stuff you want and deselecting the stuff you don't need, exit..
    it ususaly tells you that the next step is to "make dep"

    make dep

    next step is to make the modules (parst of the kernel that are loaded in when needed)

    make modules

    then we will install them modules

    make modules_install

    then we have a couple of options.. IMHO the easiest is to let the kernel do the installing itself..
    it will then install the kernel in /vmlinuz (check your /etc/lilo.conf or some other bootmanager.. not all bootmanagers are set to that location automaticly)

    make install

    then you can reboot..

    if you have strange (non GPL) modules (like nvidia drivers) you'll need to recompile that stuff..
    ASCII stupid question, get a stupid ANSI.
    When in Russia, pet a PETSCII.

    Get your ass over to SLAYRadio the best station for C64 Remixes !

  4. #4
    Senior Member IKnowNot's Avatar
    Join Date
    Jan 2003
    Posts
    792
    the_JinX : never tried it that way, but this works for me
    I'll assume you are using RedHat's kernel source.

    you should be in the kernel source directory ( something like directory /usr/src/linux-2.4.16.) and su

    a) enter the command make mrproper ( R.H. 8 source seems to need this )

    b) enter the command make menuconfig this will open up a menu and it is here you make all you choices as to what the kernel will look like and act like.

    c) enter the command make dep

    d) enter the command make clean

    e) check for rejected files by running " find . -name *.rej' -print " there should be none.

    f) check the extra extention on the kernel version to be used in the "Make" file
    If I remember correctly the R.H. 8 kernel source adds the "custom" extention by default. If needed, adjust
    "Extraversions="to whatever.
    Example: "Extraversions=-custom" on a 2.4.16 kernel would yeild a kernel with the name " 2.4.16-custom"

    g) enter the command make bzImage

    h) enter the command make modules

    i) enter the command make modules_install

    j) enter the command make install

    k) check to make sure your boot loader is configured properly for your new kernel ( another topic )

    l) cross your fingers and reboot
    " And maddest of all, to see life as it is and not as it should be" --Miguel Cervantes

  5. #5
    Leftie Linux Lover the_JinX's Avatar
    Join Date
    Nov 2001
    Location
    Beverwijk Netherlands
    Posts
    2,534
    the make mrproper command is little known..

    there is a lot of strange documentation when you google for it.. based down, it comes to this..

    make mrproper

    does a make clean and also overwrites the .config kernel configuration file..

    If you want to backup a (good) kernel configuration, all you need to do is copy the .config file in your kernel source folder !

    mrproper (supposidly) overwrites the config with Linus Torvalds's kernel config wich is quite clean and proper
    ASCII stupid question, get a stupid ANSI.
    When in Russia, pet a PETSCII.

    Get your ass over to SLAYRadio the best station for C64 Remixes !

  6. #6
    Senior Member IKnowNot's Avatar
    Join Date
    Jan 2003
    Posts
    792
    from Red Hat Linux 8.0: The Official Red Hat Linux Customization Guide
    It is important that you begin a kernel build with the source tree in a known condition. Therefore, it is recommended that you begin with the command make mrproper. This will remove any configuration files along with the remains of any previous builds that may be scattered around the source tree.
    One would think that because it was a fresh install of the kernel-source you would not need mrproper, BUT ...

    Never had these problems with Linus's kernels

    also, I didn't notice it before but in step e of my above post, the word processor seems to have altered it a bit, should be
    find . -name '*.rej' -print
    " And maddest of all, to see life as it is and not as it should be" --Miguel Cervantes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •