Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
iPXE Memory issues
2015-04-01, 10:48
Post: #1
iPXE Memory issues
If i try to PXE boot MS DOS with memdisk IF ipxelinux.0 is used, i receive "Program too big to fit in memory" while trying to execute a DOS based software from the diskette image.

if i use pxelinux.0 without ipxe the program executes successfully.

does ipxe limit usable memory?
Find all posts by this user
Quote this message in a reply
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
2015-04-18, 11:41
Post: #3
RE: iPXE Memory issues
(2015-04-17 20:41)NiKiZe Wrote:  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.

You might want to try the PXE-bootable version of memtest available from http://boot.ipxe.org/memtest.0 - this does not have the same restrictions on memory layout as the standard .lkrn format, and has the advantage that you can instruct it to perform a set number of passes and then return with a success/failure state to the iPXE script:

Code:
chain memtest.0 passes=1 && echo Memory OK || echo Memory test failed

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
2015-04-18, 11:46
Post: #4
RE: iPXE Memory issues
(2015-04-18 11:41)mcb30 Wrote:  
(2015-04-17 20:41)NiKiZe Wrote:  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.

You might want to try the PXE-bootable version of memtest available from http://boot.ipxe.org/memtest.0 - this does not have the same restrictions on memory layout as the standard .lkrn format, and has the advantage that you can instruct it to perform a set number of passes and then return with a success/failure state to the iPXE script:

Code:
chain memtest.0 passes=1 && echo Memory OK || echo Memory test failed

Michael

I have that one in the menu as well, but most want version 5.01 mainly since it is "faster" (thats the unscientific reason from the users)


The original problem by Leppunen however is with memdisk

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




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