跳转至

下载并选择可执行镜像

语法

  kernel [--name <name>] [--timeout <timeout>] <uri|image> [<arguments>...]

  imgselect [--name <name>] [--timeout <timeout>] <uri|image> [<arguments>...]

  imgload [--name <name>] [--timeout <timeout>] <uri|image> [<arguments>...]

示例

下载并选择 iPXE 演示镜像

  kernel http://boot.ipxe.org/demo/boot.php

下载并引导一个带 initrd 的 Linux 内核

  kernel http://192.168.0.1/vmlinuz
  initrd http://192.168.0.1/initrd.img
  boot

下载并引导 Multiboot 内核和模块

  kernel http://192.168.0.1/boot/mbkernel
  module http://192.168.0.1/modules/busybox
  module init.sh
  boot

描述

从指定的 URI 下载并选择一个可执行镜像。可以使用 --name 选项为下载的镜像指定名称。可以使用 --timeout 选项指定下载进度超时时间(毫秒)。其余参数将直接传递给镜像。

该镜像会成为被选中的镜像,作为 boot 命令的默认镜像。

如果该命令在 iPXE 脚本中执行,URI 会被解释为相对于脚本自身的 URI。例如,如果脚本 http://boot.ipxe.org/demo/boot.php 包含这样一行:

  kernel pxelinux.0

那么 iPXE 会下载并选择 http://boot.ipxe.org/demo/pxelinux.0

命令状态

成功 镜像成功下载并被选中
失败 镜像未能成功下载并被选中

另请参阅

备注

kernelimgselectimgload 三个命令之间没有任何区别。

使用 kernel 命令下载并选择镜像之后,你可以使用 imgstat 命令检查镜像是否已被自动检测为正确的镜像类型。

向后兼容性

在非常旧的 iPXE 版本中,从 URI 下载并选择新镜像时必须使用 kernel,选择已下载的镜像时必须使用 imgselectimgload