PXE + KickStart安装的条件
执行 PXE + KickStart安装需要的设备为:
◎带有一个 PXE 支持网卡的将安装的主机
◎DHCP 服务器
◎ Apache
◎TFTP 服务器
◎KickStart所生成的ks.cfg配置文件
* 准备
# yum -y install syslinux
# cp pxelinux.0( 这样无法执行,写在这里表示这个文件从哪里来的而已;下边用到 )
安装的步骤
安装dhcp服务
# rpm -ivh dhcp.i386.rpm
# cp /usr/share/doc/dhcp/dhcpd.conf.sample /etc/dhcpd.conf
修改配置文件,添加一行:filename "/pxelinux.0",其他的修改自己完成就行了。这文件的位置一定要注意,不然会失败,切记
# vim /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
next-server 192.168.1.14; dhcp的地址
filename "/pxelinux.0";( 可以放在下边的花括号里边 )
subnet 192.168.1.0 netmask 255.255.255.0{
# --- default gateway
# option routers192.168.1.254;
# option subnet-mask255.255.255.0;
# option nis-domain"example.com";
# option domain-name"example.com";
# option domain-name-servers192.168.1.254;
# option time-offset-18000;
# Eastern Standard Time
# option ntp-servers192.168.1.1;
# option netbios-name-servers192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don‘t change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.1.128 192.168.1.254;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
#host ns {
# next-server marvin.redhat.com;
# hardware ethernet 12:34:56:78:AB:CD;
# fixed-address 192.168.1.110;
#}
}
安装 tftp-server
# rpm -ivh tftp-server-0.39-1.i386.rpm
# vi /etc/xinetd.d/tftp
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type= dgram
protocol= udp
wait= yes
user= root
server= /usr/sbin/in.tftpd
server_args= -u nobody -s -c /tftpboot
disable= no #disable的直由yes变为no
per_source= 11
cps= 100 2
flags= IPv4
}
# service xinetd restart
# netstat -nlup
配置支持PXE启动
# mkdir /tftpboot
# cp /usr/lib/syslinux/pxelinux.0 /tftpboot( 上面提到了 )
# cp image/pxeboot/initrd.img /tftpboot
# cp image/pxeboot/vmlinux /tftpboot
# cp isolinux/*.msg /tftpboot
# mkdir pxelinux.cfg
# cp isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default
* 环境搭建结束,至于装什么系统,就看^-^得了,把需要的引导替换引导内核。http、nfs、或者其他的装
载安装文件的自己选择,使用windows下的因可以喔(整个过程都可以---本人臆断)。
* 生成ks.cfg也没有介绍。容在下日后详解。
本文出自 “小崔的实验笔记” 博客,谢绝转载!