Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
iPXE Memory issues
2015-04-17, 20:41
Post: #2
RE: iPXE Memory issues
iPXE uses more memory and that leaves less memory for the execution of other boot programs.

For example it is quite common for us to not be able to boot memtest directly from ipxe. In case we get an error when trying we instead chain to pxelinux with a special config that immediately loads memtest.

Code:
set esc:hex 1b            # ANSI escape character - "^["

:mtstv501
imgfree ||
chain -a ${boot-url}/tftproot/mtstv501 - || goto failed
goto menu-memtests

:failed
set ferr ${errno} || echo fail set err ||
iseq ${ferr} 0x3e11623b && echo ${esc:string}[31;1m DNS Server Error, Maybe the Networkstack died?${esc:string}[22;37m ||
iseq ${ferr} 0x3e11623b && dhcp ||
chain -a ${menu-url}&error=${ferr}&selected=${selected} ||
echo
iseq ${ferr} 0x46038101 && echo ${esc:string}[31;1m Bin can not be placed in memory, Report to NiXZe so this can be fixed!! ||
iseq ${ferr} 0x3e11623b && echo ${esc:string}[31;1m DNS Server Error! ||
echo ${esc:string}[31;1m Something failed, dropping to iPXE shell ||
echo ${esc:string}[32;1m . . .  check and report ipxe url above for info  ${esc:string}[22;37m
goto shell

Below is the part of the php script that does the real work when this happens.
Code:
if ($errno == "0x46038101") { // not enugh mem.. workaround
        echo "imgfree\necho ${esc_red} . . .  Boot Error trying alternative boot aproach \${esc:string}[22;37m . . . ||\nsleep 2\n";
        echo "set 208:hex f1:00:74:7e\nset 210:string \${boot-url}/\nset 209:string pxelinux.cfg.php/".urlencode($selected)."\nchain -ar pxelinux.0 || shell";
      }

and pxelinux.cfg.php only has
Code:
<?php
header("Content-Type: text/plain");
?>
default def
prompt 0
noescape 1
timeout 1

ontimeout def
onerror def

LABEL def
<?php
echo "  kernel tftproot".urldecode(substr($_SERVER['REQUEST_URI'], 21))."\n";
the substr is a dirty hack since i know the length of my url.
the tftproot is shared over http as well since it lets us maintain all bootfiles in only one place.

This might not be simple to implement, but atleast it works for us.
I might come back and clean this up if time permits.

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
iPXE Memory issues - Leppunen - 2015-04-01, 10:48
RE: iPXE Memory issues - NiKiZe - 2015-04-17 20:41
RE: iPXE Memory issues - mcb30 - 2015-04-18, 11:41
RE: iPXE Memory issues - NiKiZe - 2015-04-18, 11:46



User(s) browsing this thread: 1 Guest(s)