virtual-machinexenipxe

What do 209 and 210 mean in the Set command of iPXE


I am currently using ipxe to support system installation for virtual machines. Some scripts from github do helped me a lot. But I still don't know the meaning of some code, suck like:

set 210:string ${boot-url}sysrcd-${sysrcd-version}-x86/isolinux/
set 209:string isolinux.cfg
set filename ${210:string}pxelinux.0

what do 209 and 210 mean? The official manual does not provide enough information.

http://ipxe.org/cmd/set


Solution

  • This is how iPXE works.

    1. Client (with iPXE firmware) requests a dynamic IP from the DHCP server.
    2. DHCP server offers an IP, as well as extra "options", which include where to download a file to boot.
    3. Client uses TFTP or HTTP to download a boot file. iPXE can handle multiple types of boot files, in your case it's an iPXE script.
    4. Client runs this script to download the actual boot images. It could be ISO images, or kernel + initrd + NFS mount, or boot from iSCSI target.

    This is just iPXE script syntax. First line sets a variable XXX, and the third line uses it ${XXX}. However, IMHO, they are bad names. According to "Dynamic Host Configuration Protocol Options Used by PXELINUX" 209 and 210 are DHCP options. 209 means "config file", and 210 means "path prefix".

    So they mean certain things, but they are just names and can be named any other way.