Hi,
There is a problem in setup_pxe. It tries to find its pxelinux.0 binary in
/usr/lib/syslinux which is wrong on CentOS (at least v4 and v5).
I've rewritten the code that copies this file from syslinux to tftpboot so it
is more generic and easier to maintain.
(switch case statement depending on the $os content). No more test on
/etc/mandriva-release or $is_suse...
Best regards.
--
Olivier LAHAYE
CEAEA Saclay
DRT-LIST-DCSI-DIR
Index: setup_pxe
===================================================================
--- setup_pxe (révision 9198)
+++ setup_pxe (copie de travail)
@@ -38,6 +38,7 @@
}
use strict;
+use Switch;
use vars qw($config);
use lib "/usr/lib/systeminstaller";
use lib "/usr/lib/systemconfig";
@@ -189,22 +190,35 @@
my $node_ref = pop @result;
my $ip = $$node_ref{ip};
my $pxelinux_dir = "/usr/lib/syslinux"; # default directory containing pxelinux.0
+my $pxelinux_bin = "pxelinux.0"; # default binary name for pxelinux.0 boot code.
if(($ARCH eq "i386") || ($ARCH eq "x86_64")) {
# Mandriva is now shipping the equivalent of pxelinux.0 as linux.0, installed
# by the package pxelinux in a different path. We differenciate, here, the
# first steps of this section for Mandriva distros and the others.
- if (-e "/etc/mandriva-release") {
- verbose("Getting linux.0.");
- copy("/var/lib/tftpboot/X86PC/linux/linux.0", "/tftpboot/pxelinux.0") or
- croak("Unable to copy \"linux.0\" file to /tftpboot.");
- } else {
- $pxelinux_dir = "/usr/share/syslinux" if ($is_suse);
- verbose("Getting pxelinux.0.");
- copy("$pxelinux_dir/pxelinux.0", "/tftpboot/pxelinux.0") or
- croak("Unable to copy \"pxelinux.0\" file to /tftpboot.");
+ switch ($os->{'distro'}) {
+ case "centos" { $pxelinux_dir="/usr/share/syslinux"; $pxelinux_bin = "pxelinux.0"; }
+ case "rhel" { $pxelinux_dir="/usr/share/syslinux"; $pxelinux_bin = "pxelinux.0"; }
+ case "suse" { $pxelinux_dir="/usr/share/syslinux"; $pxelinux_bin = "pxelinux.0"; }
+ case "mandriva" { $pxelinux_dir="/var/lib/tftpboot/X86PC/linux" ; $pxelinux_bin = "linux.0"; }
+ else { $pxelinux_dir="/usr/lib/syslinux"; $pxelinux_bin = "pxelinux.0"; }
}
+# if (-e "/etc/mandriva-release") {
+# verbose("Getting linux.0.");
+# copy("/var/lib/tftpboot/X86PC/linux/linux.0", "/tftpboot/pxelinux.0") or
+# croak("Unable to copy \"linux.0\" file to /tftpboot.");
+# } else {
+# $pxelinux_dir = "/usr/share/syslinux" if ($is_suse);
+# verbose("Getting pxelinux.0.");
+# copy("$pxelinux_dir/pxelinux.0", "/tftpboot/pxelinux.0") or
+# croak("Unable to copy \"pxelinux.0\" file to /tftpboot.");
+# }
+
+ verbose("Getting $pxelinux_bin.");
+ copy("$pxelinux_dir/$pxelinux_bin", "/tftpboot/pxelinux.0") or
+ croak("Unable to copy \"$pxelinux_bin\" file to /tftpboot.");
+
verbose("Copying default pxelinux.cfg file");
copy("/etc/systemimager/pxelinux.cfg/syslinux.cfg",
"$netboot_cfg_d/default")
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Oscar-devel mailing list
Oscar-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oscar-devel