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. 使用AOP思想封装JDBC

    看代码 package learning.aop2; import org.springframework.stereotype.Component; import java.sql.SQLExcep ...

  2. oracle数据ORA-03113:通信通道的文件到达结尾的简单处理方式

    <ORA-03113:通信通道的文件结尾>错误处理: 出现的主要原因是由于归档日志空间不够了. 解决办法: --以sysdba方式登录 sqlplus / as sysdba --关闭数据 ...

  3. ceph报错

    [ceph_deploy.mon][ERROR ] RuntimeError: config file /etc/ceph/ceph.conf exists with different conten ...

  4. Linux日常用的命令

    查看一个文件夹是的挂载路径,比如查看opt文件夹挂载在哪:df /opt root@iZ2zedo02x7n4nuc3lb4ueZ:~# df /opt Filesystem 1K-blocks Us ...

  5. Java日志体系(一)发展历程

    一.日志框架的分类 门面型日志框架: JCL: Apache基金会所属的项目,是一套Java日志接口,之前叫Jakarta Commons Logging,后更名为Commons Logging SL ...

  6. 迭代器iterator和traits编程技法

    前言 这段时间研读SGI-STL-v2.91源码,并提炼核心代码自己实现一遍,感觉受益颇深.觉得有必要写一些文章记录下学习过程的思考,行文旨在总结,会大量参考侯捷<STL源码剖析>的内容. ...

  7. #######【Python】【基础知识】【标准库】目录及学习规划 ######

    下述参考Python DOC https://docs.python.org/zh-cn/3/library/index.html 概述 可用性注释 内置函数 内置常量 由 site 模块添加的常量 ...

  8. VC++2017关于项目出现"const char *" 类型的实参与 "char *" 类型的形参不兼容错误的解决方法

    C++项目中经常会定义如下形式的字符串: char *texts[] = { "1. Open Account", "2. To Deposit Money", ...

  9. Elastic Search中filter的理解

    在ES中,请求一旦发起,ES服务器是按照请求参数的顺序依次执行具体的搜索过滤逻辑的.如何定制请求体中的搜索过滤条件顺序,是一个经验活.类似query(指search中的query请求参数),也是搜索的 ...

  10. js 中的 number 为何很怪异

    js 中的 number 为何很怪异 声明:需要读者对二进制有一定的了解 对于 JavaScript 开发者来说,或多或少都遇到过 js 在处理数字上的奇怪现象,比如: > 0.1 + 0.2 ...