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. Oracle 本地创建多个实例并创建多个监听(只能在服务端弄,不可在客户端)

    注意:监听必须在客户端创建,在客户端创建,会报错. 1.创建监听 通过 Net Configuration Assistant  创建监听,设置端口: 注意:此监听创建完后,服务列表里面并没有此服务的 ...

  2. Python3的编译安装

    Linux环境自带了Python 2.x版本,但是如果要更新到3.x的版本,可以在Python的官方网站下载Python的源代码并通过源代码构建安装的方式进行安装,具体的步骤如下所示. 1. 安装依赖 ...

  3. shell脚本:DNS自检脚本

    host.txt中信息,已配置DNS正反解. bigdata-hive-tidb005.bjthq.vivo.lan 10.20.94.5 bigdata-hive-tidb004.bjthq.viv ...

  4. c# Winform WebBrowser的自动化模拟点击

    https://blog.csdn.net/vs920079469vs/article/details/78459025

  5. android#定制ListView的界面

    内容摘自<第一行代码>——郭霖 只能显示一段文本的ListView实在是太单调了,我们现在就来对ListView的界面进行定制,让它可以显示更加丰富的内容.首先需要准备好一组图片,分别对应 ...

  6. luffycity项目开发

    一. 首页的页脚 子组件Footer.vue文件: <template> <div class="footer"> <ul> <li> ...

  7. 软件测试第4周小组作业:WordCount优化

    一.基本任务:代码编写+单元测试 1.Github地址: https://github.com/Wegnery/New_WordCount 2.PSP2.1表格 PSP2.1 PSP阶段 预估耗时 ( ...

  8. SQL --------JDBC 用用户名查询用户的信息

    package demo; import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; ...

  9. es5实现map/filter

    // ES5循环循环实现filter const selfFilter = function (fn, context) { let arr = Array.prototype.slice.call( ...

  10. Highest Frequency Letters

    Given a list of strings, output the most frequent characters that are in the same group as the lette ...