Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
appnotes:authmenus [2011/04/26 20:23]
genec [vesamenu.c32 directly] Fix "/" becoming "//"
appnotes:authmenus [2013/03/04 15:34] (current)
genec Fix cmd.c32 -> gpxecmd.c32
Line 20: Line 20:
   ​   ​
   header ( "​Content-type:​ text/​plain"​ );   header ( "​Content-type:​ text/​plain"​ );
 +  echo "#​!gpxe\n";​
 +  ​
 +  $proto = "​https";​
 +  // Comment out/remove the following if strictly using HTTPS
 +  if (!isset($_SERVER["​HTTPS"​]))
 +    $proto = "​http";​
 +  ​
 +  // This assigns the host that gPXE should use using the most logical variables
 +  if ( $_SERVER["​HTTP_HOST"​] != ""​ ) {
 +    $host=$_SERVER["​HTTP_HOST"​];​
 +  } else {
 +    if ( $_SERVER["​SERVER_NAME"​] != 0) {
 +  $host=$_SERVER["​SERVER_NAME"​];​
 +    } else {
 +  $host=$_SERVER["​SERVER_ADDR"​];​
 +    }
 +  }
 +  ​
 +  // Comment out/remove the following if you are running on a standard port
 +  if (!((! isset($_SERVER["​HTTPS"​]) ) && ($_SERVER["​SERVER_PORT"​] == 80))
 +    && !(isset($_SERVER["​HTTPS"​]) && ($_SERVER["​SERVER_PORT"​] == 443)) ){
 +      if (strrpos($host,​ ":"​) == FALSE)
 +        $host=$host.":"​.$_SERVER["​SERVER_PORT"​];​
 +  }
   ​   ​
   $uri=$_SERVER["​REQUEST_URI"​];​   $uri=$_SERVER["​REQUEST_URI"​];​
Line 27: Line 51:
   echo "​imgfree\n";​   echo "​imgfree\n";​
   echo "​login\n";​   echo "​login\n";​
-  echo "set 209:string bootcfg.php";​+  echo "set 209:string bootcfg.php\n";
   echo "set 210:string ".   echo "set 210:string ".
-        ​"https://​\${username:​uristring}:​\${password:​uristring}@"​. +       ​$proto."://​\${username:​uristring}:​\${password:​uristring}@"​. 
-        $_SERVER["​SERVER_NAME"​].$dir."​\n";​ +       ​$host.$dir."​\n";​ 
-  echo "chain \${210:​string}pxelinux.0";​+  echo "chain \${210:​string}pxelinux.0\n";
   ?>   ?>
  
Line 61: Line 85:
   echo "​login\n";​   echo "​login\n";​
   echo "chain ".   echo "chain ".
-        ​"​https://​\${username:​uristring}:​\${password:​uristring}@"​. +       "​https://​\${username:​uristring}:​\${password:​uristring}@"​. 
-        $_SERVER["​SERVER_NAME"​].$dir. +       ​$_SERVER["​HTTP_HOST"​].$dir. 
-        "​vesamenu.c32 menu.php\n";​+       ​"​vesamenu.c32 menu.php\n";​
   ?>   ?>
  
Line 73: Line 97:
     filename "​https://​my.web.server/​boot/​boot.php";​     filename "​https://​my.web.server/​boot/​boot.php";​
  
-Download the latest //​syslinux//​ tarball from [[http://​www.kernel.org/​pub/​linux/​utils/​boot/​syslinux/​]] and extract it.  Copy the files //​com32/​menu/​vesamenu.c32//​ and //​com32/​modules/​cmd.c32// into the "​boot"​ directory on the web server.+Download the latest //​syslinux//​ tarball from [[http://​www.kernel.org/​pub/​linux/​utils/​boot/​syslinux/​]] and extract it.  Copy the files //​com32/​menu/​vesamenu.c32//​ and //​com32/​modules/​gpxecmd.c32// into the "​boot"​ directory on the web server.
  
 ===== Setup (interesting part) ===== ===== Setup (interesting part) =====
Line 110: Line 134:
     function sanboot ( $label, $root_path ) {     function sanboot ( $label, $root_path ) {
       label ( $label );       label ( $label );
-      echo " ​ kernel ​cmd.c32\n";​+      echo " ​ kernel ​gpxecmd.c32\n";​
       echo " ​ append sanboot "​.$root_path."​\n";​       echo " ​ append sanboot "​.$root_path."​\n";​
       echo "​\n";​       echo "​\n";​
Line 211: Line 235:
     label item1     label item1
       menu label ^1 MS-DOS 6.22       menu label ^1 MS-DOS 6.22
-      kernel ​cmd.c32+      kernel ​gpxecmd.c32
       append sanboot iscsi:​chipmunk.tuntap::::​iqn.2007-07.chipmunk:​msdos622       append sanboot iscsi:​chipmunk.tuntap::::​iqn.2007-07.chipmunk:​msdos622
     ​     ​
     label item2     label item2
       menu label ^2 Windows 2k3       menu label ^2 Windows 2k3
-      kernel ​cmd.c32+      kernel ​gpxecmd.c32
       append sanboot iscsi:​chipmunk.tuntap::::​iqn.2007-07.chipmunk:​win2k3       append sanboot iscsi:​chipmunk.tuntap::::​iqn.2007-07.chipmunk:​win2k3
     ​     ​
Line 246: Line 270:
  
 Note that Windows imposes a minimum password length of 12 characters, and a maximum of 16 characters, for iSCSI authentication;​ this scheme will silently break unless your password policy enforces an appropriate min/max password length of 12<​-->​16 characters. Note that Windows imposes a minimum password length of 12 characters, and a maximum of 16 characters, for iSCSI authentication;​ this scheme will silently break unless your password policy enforces an appropriate min/max password length of 12<​-->​16 characters.
- 
- 

Navigation

* [[:start|Home]] * [[:about|About our Project]] * [[:download|Download]] * [[:screenshots|Screenshots]] * Documentation * [[:howtos|HowTo Guides]] * [[:appnotes|Application Notes]] * [[:faq:|FAQs]] * [[:doc|General Doc]] * [[:talks|Videos, Talks, and Papers]] * [[:hardwareissues|Hardware Issues]] * [[:mailinglists|Mailing lists]] * [[http://support.etherboot.org/|Bugtracker]] * [[:contributing|Contributing]] * [[:editing_permission|Wiki Edit Permission]] * [[:wiki:syntax|Wiki Syntax]] * [[:contact|Contact]] * [[:relatedlinks|Related Links]] * [[:commerciallinks|Commercial Links]] * [[:acknowledgements|Acknowledgements]] * [[:logos|Logo Art]]

QR Code
QR Code appnotes:authmenus (generated for current page)