Linux 环境下 PXE 安装 WinXP SP3
实验环境 :
Server: Dell 380 with RHEL5.5_i386
IP address : 10.1.8.60/32
关闭 iptables 和 selinux
Client: Acer 4315 & Dell 360
服务器环境设置 :
1. 安装所需的软件 :
#yum install dhcp dhcp-3.0.5-3.el5
#yum install tftp-server tftp tftp-server-0.49-2 tftp-server-0.49-2
#yum install samba samba-3.0.33-3.28.el5
下载并安装 cabextract, 我这里使用的是 1.3 版本。
2. 设置所有的服务 :
DHCP 服务器 :
#vi /etc/dhcpd.conf
如下 :
authoritative;
ddns-updates on;
ddns-update-style interim;
ddns-domainname "testing.com.";
do-forward-updates on;
key "rndckey" {
algorithm hmac-md5;
secret "ghObXTApKbkkrxhGWmwpR7C5a2zcm9trQ55u8q8iqBkJBuUDdFDyMNMM079z";
};
option wpad-url code 252 = text;
option wpad-url "http://mailbj.testing.com/wpad.dat \n";
ignore client-updates;
zone testing.com. { # Forward zone to be updated
primary 127.0.0.1;
key rndckey;
}
zone 8.1.10.in-addr.arpa. { # Backward zone to be updated
primary 127.0.0.1;
key rndckey;
}
subnet 10.1.8.0 netmask 255.255.255.0 {
option routers 10.1.8.1;
option subnet-mask 255.255.255.0;
option nis-domain "testing.com";
option domain-name "testing.com";
option domain-name-servers 10.1.8.2,220.231.35.70,202.106.0.20;
option time-offset -18000; # Eastern Standard Time
option ntp-servers 10.1.8.2;
option netbios-name-servers 10.1.8.2;
# Dynamic DNS update
ddns-domainname "testing.com";
deny unknown-clients;
range dynamic-bootp 10.1.8.101 10.1.8.249;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host desktopbj-it0 {
hardware ethernet B8:ac:6F:49:a2:c4;
fixed-address 10.1.8.60;
option routers 10.1.8.4;
option domain-name-servers 10.1.8.2,119.53.1.26,220.231.35.70;
}
host notebookbj-acer4315 {
allow booting;
allow bootp;
filename "pxelinux.0";
next-server 10.1.8.60;
option domain-name-servers 10.1.8.2,119.53.1.26,220.231.35.70;
option routers 10.1.8.4;
hardware ethernet 00:1d:72:1b:38:a5;
fixed-address 10.1.8.61;
}
host vm-hq1 {
allow booting;
allow bootp;
filename "pxelinux.0";
next-server 10.1.8.60;
option domain-name-servers 10.1.8.2,119.53.1.26,220.231.35.70;
option routers 10.1.8.4;
hardware ethernet 00:0c:29:9b:e2:70;
fixed-address 10.1.8.62;
}
拷贝 pxelinux.0 到 /tftpboot 下 :
cp /usr/lib/syslinux/pxelinux.0 /tftpboot
pxelinux.0 文件,一般安装了 syslinux 后就会有的