Hi,<div><br></div><div>The way i use it is the latest syslinux 4.04 menu.c32 and use menu.c32 directly as follows boot.php:</div><div><br></div><div><pre class="code" style="padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; margin-top: 0px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(140, 172, 187); border-right-color: rgb(140, 172, 187); border-bottom-color: rgb(140, 172, 187); border-left-color: rgb(140, 172, 187); background-color: rgb(255, 255, 255); line-height: 1.2em; font-size: 15px; overflow-x: auto; overflow-y: auto; ">
<?php
header ( "Content-type: text/plain" );
$uri=$_SERVER["REQUEST_URI"];
$dir=substr ( $uri, 0, strrpos ($uri, "/") + 1);
echo "#!gpxe\n";
echo "imgfree\n";
echo "login\n";
echo "chain ".
"https://\${username:uristring}:\${password:uristring}@".
$_SERVER["HTTP_HOST"].$dir.
"menu.c32 menu.php\n";
?></pre><div><br></div><div>menu.php needs small correction:</div><div><br></div><div><pre class="code" style="padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; margin-top: 0px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(140, 172, 187); border-right-color: rgb(140, 172, 187); border-bottom-color: rgb(140, 172, 187); border-left-color: rgb(140, 172, 187); background-color: rgb(255, 255, 255); line-height: 1.2em; font-size: 15px; overflow-x: auto; overflow-y: auto; ">
<?php
header ( "Content-type: text/plain" );
$username = $_SERVER["PHP_AUTH_USER"];
$password = $_SERVER["PHP_AUTH_PW"];
$index = 0;
function title ( $title ) {
global $username;
echo "menu title ".$title;
echo ( $username ? " for ".$username : "" )."\n";
}
function label ( $label ) {
global $index;
$index++;
echo "label item".$index."\n";
echo " menu label ";
echo "^".( ( $index < 10 ) ? $index :
sprintf ( "%c", $index + ord ( 'A' ) - 10 ) )." ";
echo $label."\n";
}
function sanboot ( $label, $root_path ) {
label ( $label );
echo " kernel cmd.c32\n";
echo " append sanboot ".$root_path."\n";
echo "\n";
}
function uriboot ( $label, $uri, $args ) {
label ( $label );
echo " kernel ".$uri."\n";
if ( $args )
echo " append ".$args."\n";
}
function retry () {
echo "label failed\n";
echo " menu label Authentication Failed\n";
echo " menu disable\n";
uriboot ( "Try again", "boot.php", "" );
}
function authenticated () {
global $username;
global $password;
switch ( "$username:$password" ) {
case "mcb30:password":
case "guest:guest":
return 1;
default:
return 0;
}
}
?>
menu background atlantis.png
prompt 0
timeout 100
allowoptions 0
menu timeoutrow 29
menu vshift 2
menu rows 8
menu color title 1;36;44 #ff8bc2ff #00000000 std
menu color unsel 37;44 #ff1069c5 #00000000 std
menu color sel 7;37;40 #ff000000 #ffff7518 all
menu color hotkey 1;37;44 #ffffffff #00000000 std
menu color hotsel 1;7;37;40 #ff000431 #ffff7518 all
<?php // <<<<<<<<<<<<<<<<<<<<<<< THIS PART IS MISSING
title ( "Secure Network Boot" );
if ( ! authenticated() ) {
retry();
} else {
if ( $username == "mcb30" ) {
sanboot ( "MS-DOS 6.22",
"iscsi:chipmunk.tuntap::::iqn.2007-07.chipmunk:msdos622" );
sanboot ( "Windows 2k3",
"iscsi:chipmunk.tuntap::::iqn.2007-07.chipmunk:win2k3" );
}
uriboot ( "Linux rescue shell",
"<a href="http://chipmunk.tuntap/images/uniboot/uniboot.php">http://chipmunk.tuntap/images/uniboot/uniboot.php</a>", "" );
}
?></pre></div>It works with me</div><div>Hope it helps.</div><div>Regards</div><div>Slawek</div><div><br><div class="gmail_quote">W dniu 18 listopada 2011 17:08 użytkownik Sven Dreyer <span dir="ltr"><<a href="mailto:sven@dreyer-net.de">sven@dreyer-net.de</a>></span> napisał:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Am 18.11.2011 16:20, schrieb Chee-Yang Chau:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Due to the lack of support of menu in iPXE, I force to use chain to<br>
PXELinux's menu.<br>
</blockquote>
<br></div>
I'm also using a menu and doing it in a (as I think) simpler fashion:<br>
<br>
BIOS > NIC's PXE ROM > DHCP and TFTP > ipxe.kpxe > script (see below) > menu.c32 > menu.cfg<br>
<br>
The script goes like this:<br>
<SNIP><br>
#!ipxe<br>
chain <a href="http://my-server/menu/menu.c32" target="_blank">http://my-server/menu/menu.c32</a> <a href="http://my-server/menu.cfg" target="_blank">http://my-server/menu.cfg</a><br>
</SNIP><br>
<br>
menu.c32 is from syslinux 3.86, later versions use a different module format.<br>
menu.cfg contains the menu's configuration<br>
<br>
Hope this helps,<br>
Sven<div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
ipxe-devel mailing list<br>
<a href="mailto:ipxe-devel@lists.ipxe.org" target="_blank">ipxe-devel@lists.ipxe.org</a><br>
<a href="https://lists.ipxe.org/mailman/listinfo/ipxe-devel" target="_blank">https://lists.ipxe.org/<u></u>mailman/listinfo/ipxe-devel</a><br>
</div></div></blockquote></div><br></div>