From 577836a51983cc2b5ca8b2b1e8e26827c51c5533 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Mon, 30 Jul 2012 07:52:55 +0000 Subject: [PATCH] support fadump on stateless netboot on redhat and ppc64 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13367 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/anaconda.pm | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 66814f321..25d8d2630 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -710,12 +710,30 @@ sub mknetboot # if kdump service is enbaled, add "crashkernel=" and "kdtarget=" if ($dump) { + my $fadumpFlag = 0; + if ($dump =~ /^fadump.*/){ + $dump =~ s/fadump://g; + $fadumpFlag = 1; + if ($dump =~ /^nfs:\/\/\/.*/){ + $dump =~ s/(nfs:\/\/)(\/.*)/${1}${xcatmaster}${2}/; + } + } if ($crashkernelsize){ - $kcmdline .= " crashkernel=$crashkernelsize dump=$dump "; + if ($fadumpFlag && $arch eq "ppc64"){ + $kcmdline .= " fadump=on fadump_reserve_mem=$crashkernelsize fadump_target=$dump dump=$dump "; + } + else{ + $kcmdline .= " crashkernel=$crashkernelsize dump=$dump "; + } } else{ if ($arch eq "ppc64"){ - $kcmdline .= " crashkernel=256M\@64M dump=$dump "; + if ($fadumpFlag){ + $kcmdline .= " fadump=on fadump_reserve_mem=512M fadump_target=$dump dump=$dump "; + } + else{ + $kcmdline .= " crashkernel=256M\@64M dump=$dump "; + } } if ($arch =~ /86/){ $kcmdline .= " crashkernel=128M dump=$dump ";