cwduri
Type | String |
---|---|
DHCP option number | not applicable |
ISC dhcpd syntax | not applicable |
#!ipxe echo This script was loaded from ${cwuri} echo This script is in the directory ${cwduri}
#!ipxe kernel images/pxeboot/vmlinux inst.repo=${cwduri} initrd images/pxeboot/initrd.img boot
Represents the directory portion of the current working URI, i.e. the base URI relative to which any relative URIs will be resolved.
When executing an iPXE script, the current working URI is set to the URI of the script itself. This allows the script to download subsequent files using relative paths, which will be interpreted as being relative to the script's own URI.
You can use the cwduri
setting to construct URI strings that can be passed to the booted operating system via its own command line. For example, suppose that you have a web server containing a Fedora distribution mirror, and a script that allows the user to select a version to be installed:
#!ipxe menu Select Fedora version item 38 Fedora 38 item 39 Fedora 39 item 40 Fedora 40 choose fedver set repo ${cwduri}/releases/${fedver}/Everything/x86_64/os kernel ${repo}/images/pxeboot/vmlinux inst.repo=${repo} initrd ${repo}/images/pxeboot/initrd.img boot