How to configure Kdump in RHEL 7 / CentOS 7

In this tutorial i will show you how to install and setup the KDUMP in Redhat 7 / CentOS 7 for analysis KDUMP is a kernel crash dump m...

In this tutorial i will show you how to install and setup the KDUMP in Redhat 7 / CentOS 7 for analysis

KDUMP is a kernel crash dump mechanism that is used to capture the crash dumps when the system crashes. 

If a system crashes with kdump enabled , kdump will invoke kexec to boot into second kernel,This second kernel resides in reserved part of the system memory and it is inaccessible to the first kernel

The second kernel main job is to capture the crash dump whenever the system crashes and these logs will be for finding the root cause why the system crashes.

Installation steps:

Step 1: Install the Kexec tools
yum -y install kexec-tools
Step 2: Configure the memory for kdump

To do this we need to edit the grub configuration file /etc/default/grub as root and search for the word GRUB_CMDLINE_LINUX and replace the "auto" option with the amount of memory you want to reserve

Step 3: Regenerate the Grub2 configuration

For BIOS firmware use the below command 
grub2-mkconfig -o /boot/grub2/grub.cfg
For UEFI firmware use the below command 
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
Step 4:Configure the Dump location

If your system crashes, the core dump will be stored in the default location /var/cores, if you want to change you can edit the /etc/kdump.conf file as root and provide the required destination in the path location path /usr/local/cores  or you can provide the raw device or nfs location also.

eg: raw /dev/sdc1

Step 5 : Configure the core compression and action

To enable the compression edit the file /etc/kdump.conf as root and look for the core_collector makedumpfile -l --message-level 1 -d 31 and change it to core_collector makedumpfile -c 
where -c for compress

For changing the action search for the word default shell and change it to default reboot

Step 6 : Enabling the service

Start the service and also at boot time
systemctl start kdump.service
systemctl enable kdump.service
Step 7 : Crash the system

Check the service is active or dead and then proceed for crashing, if it is dead start and provide the below commands
echo 1 > /proc/sys/kernel/sysrq 
echo c > /proc/sysrq-trigger 
The above commands will crash the system immediately and after reboot , the dump file will be available under the location mentioned in kdump.conf

Step 8 : Install the crash

To know the exact root cause for the crash we need to analze the crash , for that crash and kernel-debuginfo package need to be installed and for debuginfo package we need to enable the repo Debuginfo.repo
yum -y install crash
debuginfo-install kernel
Step 9 : Analyse it

To start the crash utility use the command in the below format
crash /var/crash/<timestamp>/vmcore /usr/lib/debug/lib/modules/<kernel>/vmlinux
#crash /var/crash/ /usr/lib/debug/lib/modules/3.10.0-327.el7.x86_64/vmlinux



0 A.D,1,Amazon Quiz,1,Android Guide,1,Android Updates,2,Atom,6,Audacious,3,Audacity,2,Automation,1,Avidemux,1,BleachBit,1,Blender,7,Bluefish,2,Bluehost,12,Bluehost Coupons,24,Brackets,2,Calibre,2,CDROM,1,CentOS,105,CentOS 8,3,CherryTreeEditor,1,Cinnamon,1,Clementine,1,Coupons,19,Darktable,8,Debian,15,digikam,6,Disable nouveau drive,1,Docker,1,Domain coupons,2,Domaincoupons,2,Driver,1,DVDROM,1,editor,3,Fedora,77,Fedora 26,12,FFmpeg,4,Firefox,33,firefox61,3,FlightGear,1,Foodpanda,1,Fotoxx,3,FreeOffice,1,Frostwire,1,GatewayIP,1,Gimp,5,Git,19,Google Chrome,1,HandBrake,1,Hostgator,1,Hostgator Coupons,1,How,2,How To,572,HPLIP,16,iPage,1,iPage Coupons,1,Kdump,1,KeePassXC,2,kernel,51,Kodi,12,Krita,7,Libreoffice,14,Linux,1,Linux Mint,24,LinuxMint,307,LVM,1,MariaDB,1,MIUI,4,MKVToolNix,10,Mobile News,1,Musicplayer,1,MyThemeShop,2,MyThemeShop coupons,2,Namecheap,5,Netbeans,1,NFS,1,NFS Server,1,Nuvola,1,NVIDIADriver,21,Oh-My-Zsh,1,OpenOffice,2,opensource,1,openSUSE,2,Opera,2,OS Upgrade,1,Pidgin,3,pinta,1,Plasma,2,POCO,1,POCO F1 Update,1,qBittorrent,3,Redhat,31,Redhat 8,1,Redmi Note 7 Pro Update,1,Redmi Note 9 pro MAX Update,1,RedmiNote7proUpdate,1,Rhythmbox,1,runlevel,1,SiteGround,8,SiteGround Coupons,7,Skype,6,SMPlayer,2,SparkyLinux,1,SSH,1,Stellarium,2,Sudo,1,Tesla Coupons,1,TeslaThemes,2,Themes,1,TORbrowser,3,Ubuntu,538,uGet,3,Upgrade,2,Video Editor,1,VidMasta,1,Virtualbox,28,Vivaldi Browser,3,VLC,5,VxVM,1,Wavebox,1,Webhosting tutorials,2,Wine,21,Winrar,1,Wireshark,19,
askmetutorials: How to configure Kdump in RHEL 7 / CentOS 7
How to configure Kdump in RHEL 7 / CentOS 7
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content