This is an old revision of the document!


Download an image

Synopsis

  imgfetch [--name <name>] <uri> [<arguments>...]

or

  module [--name <name>] <uri> [<arguments>...]

or

  initrd [--name <name>] <uri> [<arguments>...]

Examples

Download a 1MB test file

  imgfetch http://boot.ipxe.org/1mb

Download and boot a Linux kernel, initrd and kernel module (using a script)

  #!ipxe
  kernel /boot/vmlinuz-2.6.31
  initrd initrd.img
  initrd /modules/2.6.31/e1000.ko /lib/modules/e1000.ko
  boot

Description

Download an image from the specified URI. A name for the downloaded image can be specified using the --name option. Any remaining arguments will be passed directly to the image.

If this command is executed from within an iPXE script, then the URI will be interpreted as being relative to the URI of the script itself. For example, if the script http://boot.ipxe.org/demo/boot.php contains the line

  imgfetch initrd.img

then iPXE will download http://boot.ipxe.org/demo/initrd.img.

Command status

Success The image was successfully downloaded
Failure The image was not successfully downloaded

See also

Notes

The commands imgfetch, module, and initrd are identical.

When booting a Linux kernel, any argument supplied to the initrd command will be used as the pathname for that image within the initial RAM filesystem. For example, if you have the script

  #!ipxe
  
  kernel /boot/vmlinuz-2.6.31
  initrd initrd.img
  initrd /modules/2.6.31/e1000.ko /lib/modules/e1000.ko
  boot

then the file initrd.img will be treated as a normal initramfs filesystem image, and the file e1000.ko will appear as an extra file /lib/modules/e1000.ko within this filesystem.

cmd/imgfetch.1353371835.txt.gz ยท Last modified: 2012/11/20 00:37 by mcb30
Recent changes RSS feed CC Attribution-Share Alike 4.0 International Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL https://ipxe.org
References to "iPXE" may not be altered or removed.