Showing posts with label Kernel. Show all posts
Showing posts with label Kernel. Show all posts

Thursday, 21 April 2016

Package require to analyze kernel core dump in RHEL system


To analyze the system crash dump file (vmcore) , we must have crash and debuginfo package installed on system. 

To install the crash package in your system, run the following as root:
#yum install crash
To install the kernel-debuginfo package, make sure that you have the yum-utils package installed and run the following command as root:
#debuginfo-install kernel
If not able to download the debuginfo kernel package with above command, then download the package from ftp server: http://ftp.heanet.ie/mirrors/puias/updates/


For example to download the RHEL6 (32-bit) related debuginfo package from:
http://ftp.heanet.ie/mirrors/puias/updates/6Server/en/os/debug/i386/

For example to download the RHEL6 (64-bit) related debuginfo package from:
http://ftp.heanet.ie/mirrors/puias/updates/6Server/en/os/debug/x86_64/


Package need to download:
1) Determine the kernel version of generated "vmcore" system , by executing "uname -r" command
2) Download the kernel-debuginfo-`uname -r`.rpm and kernel-debuginfo-common-`uname -r`.rpm
3) Install the package through rpm command i.e "rpm -ivh <package name>




Saturday, 12 July 2014

Linux Kernel Compilation on Same system

In Linux , kernel is core of Operating System. Time to time updating the kernel of Operating System will give latest security , fixes of  bugs and advance features.

Steps to compile and install the latest kernel in Linux Desktop:
Step#1:  Download the latest stable kernel code from https://www.kernel.org/:

Step#2:  Untar the kernel source code:
             #tar -xvf  linux-3.15.5.tar.xz

Step#3:  Configure the kernel according to system :
             #cd linux-3.15.5
             #make menuconfig

  • make menuconfig commands directly configured the kernel according to the your system.
  • Depend upon requirement user can select the functionality they required in menuconfig GUI.
  • Other option to configure the kernel configuration is that edit the .config (hidden) file.
Step#4:  Compile the main kernel:
             #make -j8

  • Option j is used to compile the kernel on multi-thread core, it utilize mutlithread compilation  feature of  kernel.
Step#5:  Compile the kernel modules:
             #make modules

Step#6:  Install the kernel modules:
            #make modules_install

  • After installation of kernel module, in system /lib/modules/3.15.5/ gets created

Step#7: Install the kernel:
           #make install

  • The make install command will install the kernel in /boot directory.
  • Following files gets install in /boot directory
    • vmlinuz-3.15.5 -> Kernel binary code
    • System.map-3.15.5 -> Exported symbols
    • initrd.img-3.15.5 -> Temporary root file system used in bootup process
    • config-3.15.5 -> Compiled kernel configuration
  • make install command , update the grub with installed kernel details in /boot/grub/grub.conf file
Step#8: Reboot 
           #reboot

Step#9: Verify the kernel version
          #uname -r 
            3.15.5
  • During boot-up process, select the required kernel(other than latest install) in grub. 
  • By default grub have latest kernel i.e 3.15.5 as default and system boot with that