updating redhat linux kernel
Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: updating redhat linux kernel

  1. #1
    Member
    Join Date
    Jul 2002
    Posts
    68

    updating redhat linux kernel

    hows it goin people. I have a question for you about updating the linux kernel.
    I'm running RH8.0 and the latest kernel RPM is 2.4.19.8
    However some people have told me that the latest kernel version is 2.4.20.0. I also saw the same info
    on google. Has anyone upgraded to that kernel. If so how would I do it. Im pretty sure that there is no RPM
    for it yet. If you can point me to a nice tutorial on updating the kernel from source that would be nice, Thanks
    kNoWLeDgE

  2. #2
    Junior Member
    Join Date
    Dec 2002
    Posts
    15
    I wonder why you would like to get kernel 2.4.20. Unless there is a certain problem that is fixed in the new kernel, I wouldn't recommend installing the new kernel.

    However, there is a tutorial, called Kernel-HOWTO which explains what a kernel is, where you can get the latest version, how to configure and install the new kernel :

    http://www.linux.org/docs/ldp/howto/Kernel-HOWTO.html

    You can find the latest kernel-sources on www.kernel.org

    Please be carefull when configuring/installing a new kernel. I suggest that you make a backup of your current kernel, before you replace it with a new one. (normaly the current kernel is in /boot/vmlinuz, but check your /etc/lilo.conf or other bootloader-configfile for the file that is used.)
    Make sure you have a rescue-disk or put your new testkernel on disk an test it by booting from the disk. If something is wrong you will be able to reboot linux with your current kernel.

    Another advise about configuring your kernel: A lot of modules (ie. drivers) can be chosen to be compiled in the kernel. You don't need all of them. Choose only those which you really need, if in doubt read the helpfile. For example : If you have a NIC (network interface card) of type x, you only need to include the module correspondig to this NIC. Don't select the other modules for NIC's. This will make your kernel bigger and size is limited. So only choose those modules that you really need.
    You can also compile source code seperatly (as modules). These modules can be loaded during startup.

    Good luck.
    Greets,

    ruleant

  3. #3
    Leftie Linux Lover the_JinX's Avatar
    Join Date
    Nov 2001
    Location
    Beverwijk Netherlands
    Posts
    2,534
    IMHO the easiest way is this way..
    -----------------------------------------------------------
    .: DISCLAIMER :.

    If any of these actions harm your linux system, It's your own fault...
    I am no responsible for the wellbeing of your system.
    =================================

    fire up a nice console..
    and type the bold words (or copy by clicking your left button and selecting the text and then in the console press the midle mouse button)

    su this sets you up as superuser (root) and asks for the root password
    cd /usr/src/ places you in the folder where kernels are stored
    wget http://www.kernel.org/pub/linux/kern...-2.4.20.tar.gz this downloads the current kernel 2.4.20
    tar -xzvf linux-2.4.20.tar.gz unzips the current kernel
    rm linux this removes the symbolic link to the current kernel sources
    ln -s linux-2.4.20 linux makes a new symbolic link to the kernel sources
    cd linux places you in the kernel source directory
    cp ../linux-2.4.19/.config . copy's the old kernel configuration to the current folder (.)
    make oldconfig configures the new kernel just like the old was configured, and asks you how new features are to be setup
    make menuconfig is optional to check the configuration and make changes if and when desired
    make dep modules modules_install install makes the dependencies, modules installs the modules and makes and installs the kernel

    that's all..
    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
    Join Date
    Aug 2002
    Posts
    508
    hi,

    I've got kernel 2.4.20 for my RH Linux 7.3. Haven't try yet for RH Linux 8.
    After install new kernel..I have to tweak my boot loader (lilo). You might need to changed your boot loader configuration (but I'm not really sure for RH Linux 8..maybe same as RH LInux 7.3).
    I have dialup connection for my internet connection..and that new kernel took me 5 hours to download+compile it.If you have have fast connection..you're lucky...
    Good luck..
    Not an image or image does not exist!
    Not an image or image does not exist!

  5. #5
    Junior Member
    Join Date
    Dec 2002
    Posts
    15

    Lightbulb

    SweetAngel,

    I would like to add that there is a possibility to update the sourcecode of the kernel, without having to download the entire source-code.
    Every time a new kernel is released, for example v2.4.19 to v2.4.20, you can get this new version entirely or by applying a patch which will upgrade your current kernel-version to the next version.

    This means that you must have a complete version of the kernel, to be able to upgrade (patch).
    If you want to patch to the newest kernel-version, but your current kernel is older than one patch (example, new kernel version is 2.4.20, your kernel-version is 2.4.12), you have to apply all patches in the correct order, to get to the newest version. (2.4.12 -> patch13 -> 2.4.13 -> ... patch20 -> 2.4.20)
    Please correct me if I'm wrong, but there are no patches for upgrading from for example 2.2.x to 2.4.x. In case of a major version-upgrade, you will have to download the entire source-code.

    This quote explains how to patch your current kernel:

    - You can also upgrade between 2.0.xx releases by patching. Each
    patch that is released for 2.0.xx contains only bugfixes. No
    new features will be added to the Linux kernel until the 2.1.xx
    development effort begins. To install by patching, get all the
    newer patch files and do

    cd /usr/src
    gzip -cd patchXX.gz | patch -p0

    (repeat xx for all versions bigger than the version of your current
    source tree, _in_order_) and you should be ok. You may want to remove
    the backup files (xxx~ or xxx.orig), and make sure that there are no
    failed patches (xxx# or xxx.rej). If there are, either you or me has
    made a mistake.

    Alternatively, the script patch-kernel can be used to automate this
    process. It determines the current kernel version and applies any
    patches found.

    cd /usr/src
    linux/scripts/patch-kernel
    This is a quote from: http://www.kernel.org/pub/linux/kernel/README

  6. #6
    Senior Member
    Join Date
    Aug 2002
    Posts
    508
    I would like to add that there is a possibility to update the sourcecode of the kernel, without having to download the entire source-code.
    Every time a new kernel is released, for example v2.4.19 to v2.4.20, you can get this new version entirely or by applying a patch which will upgrade your current kernel-version to the next version.
    You right about that...the reason I'had download entire source code..cause I wanna learn and "dive in" to Linux/*nix ..more seriously. And BTW I've already done both..Download entire source code or Applying path...
    My mandrake Linux 9 have new kernel too (2.4.20) and I've been working on kernel 2.5.52(I haven't finished it yet..yupe...I know still unstable, I just wanna play around with this kernel things), but apparently...it's hard to get 2.5.52 on...
    Not an image or image does not exist!
    Not an image or image does not exist!

  7. #7
    Junior Member
    Join Date
    Dec 2002
    Posts
    15
    Sweet_angel,

    You probably know, but this might be usefull for others :

    There are always two recent versions of the kernel. A stable version that can be used by most linux users and a development version where new features are added/tested. The version number is structured x.y.z, where the y indicates if it is a stable or a development version. If y is odd, then it is a development version. When it is even, it is a stable version. (for example : current kernel versions : 2.4.20 (stable) or 2.5.53 (development))

    In the development version, new features are created. When the kernel development team (or Linus Torvalds, I'm not sure) decides there will be a new kernelversion, all new features are integrated in version x.(y+2).0 and this becomes the new stable version. At the same moment a new development version is created. For example : current stable version is 2.4.20, current development version is 2.5.53, if a new version is created the stable version will start at 2.6.0, the new development version will start at 2.7.0 .

  8. #8
    Member
    Join Date
    Jul 2002
    Posts
    68
    ruleant --

    The reason why i need the latest kernel is that it allows you to do some really useful bandwith control.

    Ok I used the tutorial at kernel.org and the README that came with the kernel.tar.gz however i still have some problems. The new kernel will not bootup. I luckily did not erase the old kernel so i didnt lose anything. When I boot up and LILO asks which kernel to boot with, if i choose the the new one it will just automatically reboot. Does anyone have any ideas what this could be? This was my experimental machine, it had RH 7.2 on it. My guess was that it has something to do with lilo.conf but i dont know what it could be. I appreciate your help
    kNoWLeDgE

  9. #9
    Senior Member
    Join Date
    Aug 2002
    Posts
    508
    The new kernel will not bootup. I luckily did not erase the old kernel so i didnt lose anything. When I boot up and LILO asks which kernel to boot with, if i choose the the new one it will just automatically reboot. Does anyone have any ideas what this could be? This was my experimental machine, it had RH 7.2 on it. My guess was that it has something to do with lilo.conf but i dont know what it could be. I appreciate your help
    Basicly you need to changed your boot loader from grub to lilo first..(if your default boot loader is grub).
    I didn't erased my old kernel...what you do..is just edit your lilo configuration
    open your lilo configuration use your favorit editor (I like using vi).
    vi /etc/lilo.conf and then just add your new kernel...
    image=/boot/vmlinuz-2.2* <<< you will see something like this...this is your old kernel
    label=linux
    read-only
    root=/dev/hda1

    image=/boot/vmlinuz-2.4.20 << copy the one you already have (the old kernel from above)and
    label=2420 just changed it to 2420
    read-only
    root=/dev/hda1

    After that reboot...and you will see your new kernel with label "2420"...and your old kernel still there with label "linux" ...just choose with kernel you want boot up..and click that.
    Not an image or image does not exist!
    Not an image or image does not exist!

  10. #10
    Member
    Join Date
    Jul 2002
    Posts
    68
    image=/boot/vmlinuz-2.2* <<< you will see something like this...this is your old kernel
    label=linux
    read-only
    root=/dev/hda1

    image=/boot/vmlinuz-2.4.20 << copy the one you already have (the old kernel from above)and
    label=2420 just changed it to 2420
    read-only
    root=/dev/hda1
    sweet_angel--

    The above is exactly what i had in /etc/lilo.conf....but it is not booting up. It is possible that lilo is not my default boot
    loader...how would i switch it to lilo

    thanks for your help
    kNoWLeDgE

Posting Permissions

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