跳转至

丢弃镜像

语法

  imgfree [<image>]

示例

丢弃所有镜像

  imgfree

丢弃镜像 "pxelinux.0"

  imgfree pxelinux.0

描述

丢弃指定的镜像。如果没有显式指定镜像,iPXE 会丢弃所有镜像。

用于存放镜像的内存会被释放并可重新使用。

另请参阅

备注

如果你的 iPXE 脚本可能会重试下载,那么通常最好使用 imgfree 命令,以确保不会留下多份已下载的镜像。例如:

  #!ipxe

  :retry
  imgfree  # Discard any already-downloaded images
  kernel vmlinuz-2.6.32 || goto retry
  initrd initrd.img || goto retry
  boot || goto retry