2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-13 18:00:38 +00:00

Remove use of elilo

iPXE can directly execute all but the most ancient Linux kernels
directly in UEFI boot.  Remove the elilo intermediate step.
This commit is contained in:
Jarrod Johnson
2019-06-13 15:14:07 -04:00
parent bb94a50c17
commit 76a57eaae2

View File

@ -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);
}
}