The PXE configuration file defines the menu displayed to the pxe client host as it boots up and contacts the TFTP server. You need a PXE configuration file for PXE.

The TFTP server is always listening for PXE clients on the network. When it detects that a PXE client is asking for PXE services, it sends the client a network package that contains this boot menu.

Each PXE boot menu selection points to the location of the kernel and ramdisk files for Linux. You can create one PXE configuration file for each pxe client host, or create one PXE configuration file and name it default.

Example: PXELINUX with gPXE

Following is an example of a PXE configuration file that you might use for PXELINUX with gPXE. The important difference between this example and a PXE configuration file without gPXE is the HTTP path to the required files.

default menu.c32
menu title ESX Boot Menu
timeout 30

##PXE boot the installer and perform an interactive installation 
##with local media (RPM files)

label local
menu label Interactive Local Installation
kernel http://<server>/vmlinuz
append initrd=http://<server>/initrd.img vmkopts=debugLogToSerial:1 mem=512M quiet

##PXE boot the installer and perform a scripted installation with
##local or remote media (RPM files), as specified in the installation script

label scripted
menu label Scripted Installation
kernel http://<server>/vmlinuz
append initrd=http://<server>/initrd.img vmkopts=debugLogToSerial:1 mem=512M ks=nfs://xx.xx.xxx.xx/ks.cfg
 

##PXE boot the installer and perform an interactive installation 
##with the media (RPM files) at a remote location

label network_rpm
menu label Interactive Installation with RPM files on the network
kernel http://<server>/vmlinuz
append initrd=http://<server>/initrd.img vmkopts=debugLogToSerial:1 mem=512M askmedia

 

Example: PXELINUX without gPXE

Following is an example of a PXE configuration file that you might use for PXELINUX without gPXE. See also the /isolinux/isolinux.cfg file on the ESX installation DVD.

In this example, the path to the required files test/ is relative to /tftpboot. The actual path is /tftpboot/test/ on the TFTP server.

default menu.c32
menu title ESX Boot Menu
timeout 30

##PXE boot the installer and perform an interactive installation 
##with local media (RPM files)

label local
menu label Interactive Local Installation
kernel test/vmlinuz
append initrd=test/initrd.img vmkopts=debugLogToSerial:1 mem=512M quiet

##PXE boot the installer and perform a scripted installation with
##local or remote media (RPM files), as specified in the installation script

label scripted
menu label Scripted Installation
kernel test/vmlinuz
append initrd=test/initrd.img vmkopts=debugLogToSerial:1 mem=512M ks=nfs://xx.xx.xxx.xx/ks.cfg
 

##PXE boot the installer and perform an interactive installation 
##with the media (RPM files) at a remote location

label network_rpm
menu label Interactive Installation with RPM files on the network
kernel test/vmlinuz
append initrd=test/initrd.img vmkopts=debugLogToSerial:1 mem=512M askmedia 

 

Required Files

In the PXE configuration file, you must include paths to the following files:

■ vmlinuz is the boot loader kernel code.

■ initrd.img is the boot ramdisk.

Installation Mode

ks=nfs://xx.xx.xxx.xx/ks.cfg is the path to the Linux installation script. In a scripted installation, your script includes all the necessary responses to complete the script, including the location of the installation media. All of the responses must be filled for the scripted installation to work.

In an interactive installation, omit the ks= option. If you are performing an interactive installation with the installation media at a remote location, include the askmedia boot option, which causes the installer to prompt you for the location of the installation media.

IPAPPEND

For scripted installations, the IPAPPEND option specifies that the same network adapter the machine boots from is also used for connecting to the network. When you include the IPAPPEND option in the PXE configuration file, omit the --device option to the installation script network command. The IPAPPEND option has no impact on interactive installations. The following snippet shows how to include the IPAPPEND option in the PXE configuration file.

label Installer
menu default
kernel http://<server>/vmlinuz
append initrd=http://<server>/initrd.img mem=512M vmkopts=debugLogToSerial:1 ks=nfs://10.20.118.55/ks.cfg
IPAPPEND 2

For the IPAPPEND flag_val, use IPAPPEND 2. IPAPPEND 1 is not required.

If you omit the network --device option from the installation script, the IPAPPEND option from the PXE configuration file, and the netdevice bootstrap command, the installer uses the first plugged in network adapter.

Filename for the PXE Configuration File

For the filename of the PXE configuration file, choose one of the following:

■ 01-mac_address_of_target_Linux_host. For example, 01-23-45-67-89-0a-bc

■ The target Linux host IP address in hexadecimal notation.

■ default

The initial boot file, pxelinux.0 (or gpxelinux.0) tries to load a PXE configuration file. It tries with the MAC address of the target Linux host, prefixed with its ARP type code (01 for Ethernet). If that fails, it tries with the hexadecimal notation of target Linux system IP address. Ultimately, it tries to load a file named default.

File Location for the PXE Configuration File

Save the file in var/lib/tftpboot/pxelinux.cfg/ on the TFTP server.

For example, you might save the file on the TFTP server at var/lib/tftpboot/pxelinux.cfg/01-00-21-5a-ce-40-f6. The MAC address of the network adapter on the target Linux host is 00-21-5a-ce-40-f6.

Creating a PXE Configuration File的更多相关文章

  1. 解决Scala Play框架在Git Bash运行的异常:Could not find configuration file ../framework/sbt/sbt.boot.properties

    Git Bash+ConEmu可以模拟Linux强大的命令行.不过在结合Scala和Play时,需要注意如下事项: 1. Scala的安装在64位操作系统下,默认会放在“C:\Program File ...

  2. Error: Cannot open main configuration file '//start' for reading! 解决办法

    当执行service nagios start启动nagios时,报错:Error: Cannot open main configuration file '//start' for reading ...

  3. phpmyadmin Wrong permissions on configuration file, should not be world writable!

    巴拉巴拉,实际场景是这样,因为有需要,所以想用django 做个rest服务给其他平台提供服务,发现以前正常的页面都无法运行,奇怪发现有一个页面提示连接不上mysql 难道mysql挂了,打开phpm ...

  4. springMVC+mybatis 进行单元测试时 main SqlSessionFactoryBean - Parsed configuration file: 'class path resource' 无限的读取xml文件

    今天终于写完的Dao层的操作,怀着无比激动的心情,进行单元测试,就在最后一个方法,对的就是最后一个方法,启动单元测试就会报以下错误: [2016-05-11 18:25:01,691] [WARN ] ...

  5. [Bug]IIs Cannot read configuration file due to insufficient permissions

    摘要 在部署站点的时候,遇到这样的问题Cannot read configuration file due to insufficient permissions 解决办法 在服务器上部署站点,浏览的 ...

  6. Nginx - Configuration File Syntax

    Configuration Directives The Nginx configuration file can be described as a list of directives organ ...

  7. How to find configuration file MySQL uses?

    http://www.dbasquare.com/2012/04/01/how-to-find-mysql-configuration-file/ A customer called me today ...

  8. This configuration file was broken by system-config-keyboard

    posts • Page of problem with startx Postby evarie » // :: Normally i can get started with the x wind ...

  9. PHP 5.6启动失败failed to open configuration file '/usr/local/php/etc/php-fpm.conf'

    PHP编译安装完毕,启动失败,提示 [-Jun- ::] ERROR: failed to open configuration ) [-Jun- ::] ERROR: failed to load ...

随机推荐

  1. [CDH] Acquire data: Flume and Kafka

    Flume 基本概念 一.是什么 Ref: http://flume.apache.org/ 数据源获取:Flume.Google Refine.Needlebase.ScraperWiki.Bloo ...

  2. 搭建Kubernetes容器集群管理系统

    1.Kubernetes 概述 Kubernetes 是 Google 开源的容器集群管理系统,基于 Docker 构建一个容器的调度服务,提供资源调度.均衡容灾.服务注册.劢态扩缩容等功能套件. 基 ...

  3. Spring Cloud(0):目录

    Spring Cloud(1):概览 Spring Cloud(2):服务发现(Eureka) Spring Cloud(3):配置服务(Config) Spring Cloud(4):断路器(Hys ...

  4. three.js后期之自定义shader通道实现扫光效果

    如果你还不知道如何在three.js中添加后期渲染通道,请先看一下官方的一个最简单的demo : github. 正如demo中所示的那样,我们的扫光效果,也是一个自定义的ShaderPass. 所以 ...

  5. LeetCode刷题7——数字的补数

    一.要求 补数可以直接通过异或运算进行. 二.背景 最近工作中位运算遇到一个问题,温度有正负两种表示,而且还有小数点.例如用四个16进制字节表示,XXXX,其中第一位是占位符,中间两三位为温度的有效值 ...

  6. element UI实现动态生成多级表头

    一.效果图 二.封装两个组件,分别为DynamicTable.vue和TableColumn.vue,TableColumn.vue主要是使用递归来对表头进行循环生成 DynamicTable.vue ...

  7. IDEA 2019.2破解激活教程(激活到2089年8月,亲测有效,持续更新中...)

    本来笔者这边是有个正版激活码可以使用的,但是,2019.9月3号的时候,一些小伙伴反映这个注册码已经失效了,于是拿着自己的 IDEA, 赶快测试了一下,果不其然,已然是不能用了. 好在,笔者又找到了新 ...

  8. SQL介绍、语句之增删改查大全

    数据库概念 文件作为数据库,数据格式千差万别 将保存数据的地方统一起来 MySQL一款应用软件 用来帮你操作文件的 只要是基于网络通信,底层都是socket!!! 服务端 -socket通信 -收发消 ...

  9. [转帖]服务器备份工具:Amanda,Bakula,Clonezilla,Rsnapshot,Mondo Rescue

    服务器备份工具:Amanda,Bakula,Clonezilla,Rsnapshot,Mondo Rescue https://ywnz.com/linuxyffq/5270.html 改天试用一下. ...

  10. 【Python】【demo实验21】【练习实例】【求球反弹高度】

    原题: 一球从100米高度自由落下,每次落地后反跳回原高度的一半:再落下,求它在第10次落地时,共经过多少米?第10次反弹多高? 我的源码: #!/usr/bin/python # encoding= ...