Find the answer to your Linux question:
Results 1 to 7 of 7
Hi, I have installed Centos release 6.4 Final (kernel 2.6.32-358.el6.x86_64). I want to upgrade the kernel to latest version. My server doesn't have direct internet connectivity(through proxy it's possible). I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2013
    Posts
    32

    Kernel upgrade


    Hi,

    I have installed Centos release 6.4 Final (kernel 2.6.32-358.el6.x86_64). I want to upgrade the kernel to latest version. My server doesn't have direct internet connectivity(through proxy it's possible). I have setup local repository for installing packages using yum. How to upgrade the kernel. Shall i download the latest kernel as rpm package to the repository, update the repository and issue yum install/update kernel-(version) and reboot the server. Any inputs will be much helpful and highly appreciated.

  2. #2
    Just Joined!
    Join Date
    Jul 2013
    Posts
    18
    Hi,

    I don't know about the kernel in rpm package but you can always compile the source code. This is how I usually install the modified kernels I develop for my work. To do this, first download the source code of the latest kernel, then place it in /usr/src/ ; then with a terminal, extract it and move to the extracted folder. The name of the folder should be linux-3.10.9/ . Time for compilation :

    First do (with superuser permissions by placing sudo in front of the commands):

    Code:
    make menuconfig
    You will see a menu, just exit to save the configuration of your new kernel.

    Then compile with :

    Code:
    make
    Then install the modules and the kernel with :

    Code:
    make modules_install
    then

    Code:
    make install
    Some distributions don't create an initial ramdisk, so just to be sure, generate it manually by typing:

    Code:
    update-initramfs
    Then update grub with :

    Code:
    update-grub
    You can now restart your server and boot on the new kernel. If it doesn't work, you can always boot on your old kernel and try to solve the problems. If you find any difficulty during the process, we are here to help.

  3. #3
    Just Joined!
    Join Date
    Jan 2013
    Posts
    32
    Hi,
    I followed the above instructions, it worked till make install and when i executed update-initramfs it throws
    -bash: update-initramfs: command not found
    Could you please tell me where I went wrong.

  4. #4
    Just Joined!
    Join Date
    Jul 2013
    Posts
    18
    well, I use it in debian but it's maybe not available in redhat/fedora, they use instead dracut which I never really used. Try to install initramfs-tools and type again : update-initramfs -c -k 3.10.9

    if this doesn't work, search how to use dracut or just try to boot on the new kernel after make install, linux sometimes generates the initramfs automatically.

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,601
    CentOS (and other RHEL derivatives) 6.x are running 2.6.32 kernels. You cannot install 3.x kernels without updating ALL of the system libraries and applications. IE, you cannot use yum to do this since the repositories are set at the current RHEL system level. So, if you do this, you are no longer running a CentOS/RHEL system...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #6
    Just Joined!
    Join Date
    Jan 2013
    Posts
    32
    Hi

    I tried to boot the system with new kernel and got the following error. The system is working in 2.6x kernel(old kernel)
    "Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b"

    Could you please tell me is it possible to update the system libraries and applications using yum update or else tell me the steps to update libraries. I am new to kernel recompilation.

  7. #7
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,601
    Quote Originally Posted by geekslinux View Post
    Hi

    I tried to boot the system with new kernel and got the following error. The system is working in 2.6x kernel(old kernel)
    "Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b"

    Could you please tell me is it possible to update the system libraries and applications using yum update or else tell me the steps to update libraries. I am new to kernel recompilation.
    What you are trying to do is to install an entirely different OS version. Yum won't work for you. You will either need to update the packages manually from compatible (to your kernel) rpm files, or you should switch operating systems, such as installing an appropriate version of Fedora.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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