diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm index 88702a0e6..34084daac 100644 --- a/xCAT-server/lib/xcat/plugins/xnba.pm +++ b/xCAT-server/lib/xcat/plugins/xnba.pm @@ -304,22 +304,22 @@ sub setstate { print $pcfg "imgargs kernel BOOTIF=" . '${netX/mac}' . "\n"; } if ($kern->{initrd}) { - print $pcfg "imgfetch http://" . '${next-server}:' . "$httpport/tftpboot/" . $kern->{initrd} . "\n"; + print $pcfg "imgfetch -n initrd http://" . '${next-server}:' . "$httpport/tftpboot/" . $kern->{initrd} . "\n"; } print $pcfg "imgexec kernel\n"; if ($kern->{kcmdline} and $kern->{initrd}) { #only a linux kernel/initrd pair should land here, write elilo config and uefi variant of xnba config file my $ucfg; open($ucfg, '>', $tftpdir . "/xcat/xnba/nodes/" . $node . ".uefi"); print $ucfg "#!gpxe\n"; - print $ucfg 'chain http://${next-server}:'.$httpport.'/tftpboot/xcat/elilo-x64.efi -C /tftpboot/xcat/xnba/nodes/' . $node . ".elilo\n"; - close($ucfg); - open($ucfg, '>', $tftpdir . "/xcat/xnba/nodes/" . $node . ".elilo"); - print $ucfg 'default="xCAT"' . "\n"; - print $ucfg "delay=0\n\n"; - print $ucfg "image=/tftpboot/" . $kern->{kernel} . "\n"; - print $ucfg " label=\"xCAT\"\n"; - print $ucfg " initrd=/tftpboot/" . $kern->{initrd} . "\n"; - print $ucfg " append=\"" . $elilokcmdline . ' BOOTIF=%B"' . "\n"; + print $ucfg "imgfetch -n kernel http://" . '${next-server}:' . $httpport.'/tftpboot/' . $kern->{kernel} . "\n"; + print $ucfg "imgload kernel\n"; + if ($kern->{kcmdline}) { + print $ucfg "imgargs kernel " . $kern->{kcmdline} . ' BOOTIF=01-${netX/mac:hexhyp} initrd=initrd' . "\n"; + } else { + print $ucfg "imgargs kernel BOOTIF=" . '${netX/mac} initrd=initrd' . "\n"; + } + print $ucfg "imgfetch -n initrd http://" . '${next-server}:' . "$httpport/tftpboot/" . $kern->{initrd} . "\n"; + print $ucfg "imgexec kernel\n"; close($ucfg); } }