网络启动二:之PXE:CentOS7.4/6.9 +TFTP+DHCP+BIOS+UEFI部署操作系统
一、基础环境搭建:CentOS 7.4 Min 172.16.30.59
安装略......。
TFTP+DHCP
yum install tftp-server dhcp xinetd
yum 源修改自行百度。
配置tftp、dhcp
3.1 修改tftp
sed -i '/disable/s/yes/no/' /etc/xinetd.d/tftp
在防火墙中允许tftp服务的进入连接:
firewall-cmd --add-service=tftp
3.2 修改dhcp配置
vi /etc/dhcp/dhcpd.conf
--------------------
option space PXE;
option PXE.mtftp-ip code 1 = ip-address;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option client-system-arch code 93 = unsigned integer 16;
#option domain-name-servers 8.8.8.8, 195.235.96.90;
allow booting;
allow bootp;
default-lease-time 600;
max-lease-time 7200;
#ddns-update-style interim;
subnet 172.16.30.0 netmask 255.255.255.0 {
range 172.16.30.50 172.16.30.70;
option routers 172.16.30.59;
class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
next-server 172.16.30.59;
if option client-system-arch = 00:07 or option client-system-arch = 00:09 {
filename "uefi/shim.efi";
} else {
filename "pxelinux/pxelinux.0";
}
}
#next-server 172.16.30.100;
}
--------------------------
systemctl start dhcp
systemctl start tftp
systemctl start xinetd
二、安装配置PXElinux安装syslinux包
现在需要完整安装 DVD 的 ISO 映像文件中 SYSLINUX 软件包中的 pxelinux.0 文件。
挂载光盘或者通过yum源安装syslinux
wget http://172.16.30.12