[ipxe-devel] memtest as a PXE NBP

Robin Smidsrød robin at smidsrod.no
Sun Jul 15 14:20:23 UTC 2012


On 15.07.2012 15:51, Michael Brown wrote:
> On Sunday 15 Jul 2012 14:02:40 Robin Smidsrød wrote:
>>>   http://boot.ipxe.org/memtest.0
>>
>> I tried to use the precompiled version you made available, and if you
>> start it and then press ESC after it has started running it will return
>> with a falsy value, which I assume is intended behavior. But if you try
>> to start it again (from the same iPXE session), the memtest UI will
>> never appear and it will exit with a falsy value after a few seconds.
>>
>> Are you able to reproduce this problem?
> 
> I am unable to reproduce the problem.  Using your script, I am able to exit 
> and restart memtest multiple times, on both qemu and real hardware.
> 
> Incidentally, it is possible to differentiate between "test incomplete" (i.e. 
> test aborted via ESC before one full cycle completed) and "memory bad" 
> returns, by using the newly-added ${errno} variable:
> 
>   chain memtest.0 && goto memory_good || goto memory_fail
>   :memory_fail
>   iseq ${errno} 0x1 && goto memory_bad || goto memory_incomplete
> 
> (Note that the "iseq" command is likely to change the value of ${errno}; if 
> you want to preserve ${errno} for multiple tests then you must copy it to 
> another variable first.)

I changed my test script to this:

:memtestnbp
chain ../memtest.0 passes=1 && set memtest GOOD || set memtest BAD
set memtest_errno ${errno}
iseq ${memtest} GOOD && goto memtest-info ||
iseq ${memtest_errno} 0x1 && set memtest BAD || set memtest UNKNOWN
:memtest-info
menu Your memory seems to be ${memtest}
item memtest-report   Report memtest result to web service
item diagnostics-menu Back to diagnostics menu...
choose --default diagnostics-menu selected && goto ${selected} || goto start

:memtest-report
chain
http://boot.smidsrod.lan/memtest-report.cgi?result=${memtest}&mac=${mac}&uuid=${uuid}&hostname=${hostname}
||
goto diagnostics-menu

I still get the same error on VirtualBox 4.1.18 (on a Windows host), and
on my HP 6730b (tg3) laptop.

-- Robin



More information about the ipxe-devel mailing list