From 14933b52a59e669a559ca37d0ebf32b95b6c40c6 Mon Sep 17 00:00:00 2001 From: mxi1 Date: Mon, 28 Feb 2011 07:21:30 +0000 Subject: [PATCH] add the checkpoint for "nodeset netboot/statelite" command, if there's no such one image called "$osver-$arch-$provmethod-$profile" in linuximage table, there will be one error message to indicate the user should use "nodeset osimage=" command update the "crashkernel=" parameter for ppc64 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8933 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/anaconda.pm | 26 +++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index b4ab2ed24..495a52c58 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -308,8 +308,26 @@ sub mknetboot $rootimgdir="$installroot/netboot/$osver/$arch/$profile"; $rootfstype = "nfs"; # TODO: try to get it from the option or table - # $dump; # TODO: set the dump value here - + my $imgname; + if ($statelite) { + $imgname = "$osver-$arch-statelite-$profile"; + } else { + $imgname = "$osver-$arch-netboot-$profile"; + } + if ( ! $linuximagetab ) { + $linuximagetab = xCAT::Table->new('linuximage'); + } + if ( $linuximagetab ) { + (my $ref1) = $linuximagetab->getAttribs({imagename => $imgname}, 'dump'); + if($ref1 and $ref1->{'dump'}) { + $dump = $ref1->{'dump'}; + } + } else { + $callback->( + { error => [qq{ Cannot find the linux image called "$osver-$arch-$provmethod-$profile", maybe you need to use the "nodeset osimage=" command to set the boot state}], + errorcode => [1] } + ); + } } #print"osvr=$osver, arch=$arch, profile=$profile, imgdir=$rootimgdir\n"; @@ -657,7 +675,9 @@ sub mknetboot # if kdump service is enbaled, add "crashkernel=" and "kdtarget=" if ($dump) { - $kcmdline .= " crashkernel=256M\@32M dump=$dump "; + if ($arch eq "ppc64") { # for ppc64, the crashkernel paramter should be "128M@32M", otherwise, some kernel crashes will be met + $kcmdline .= " crashkernel=128M\@32M dump=$dump "; + } } # add the addkcmdline attribute to the end