[ipxe-devel] Get autoboot device from the network card list

Anton D. Kachalov mouse at yandex-team.ru
Mon Dec 8 12:20:29 UTC 2014


Hello.

I need to get autoboot device while booting as PCI Option ROM to create tagged interface to try to boot from first.

An example iPXE script snippet:

<-- ipxe-cut -->
set idx:int32 0

:loop isset ${net${idx}/mac} || goto fail
  iseq ${net${idx}/autoboot} 0x1 && goto loop_end ||
  inc idx && goto loop

:loop_end

echo Trying VLAN-123 first on net${idx}...
vcreate -t 123 net${idx} ||
ifconf net${idx}-111 && isset ${filename} && chain ${filename} ||

echo ...then access port...
ifconf net${idx} && isset ${filename} && chain ${filename} ||

fail:
</-- ipxe-cut -->

I've hacked a bit and export `autoboot' setting (ipxe-autoboot.patch). But it's a wrong way to do things.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipxe-autoboot.patch
Type: text/x-diff
Size: 2426 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20141208/4d3d0aa9/attachment.bin>


More information about the ipxe-devel mailing list