Debian Linux bullseye
$> cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux bullseye/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
IP 地址 192.168.1.193,安装服务 isc-dhcp-server 用于提供 dhcp 服务, dnsmasq 用户提供 dns 服务。
ISC-DHCP-SERVER
# cat /etc/dhcp/dhcpd.conf
allow booting;
allow bootp;
option domain-name "domain.com";
option domain-name-servers 192.168.14.193;
option option-128 code 128=string;
option option-128 code 129=text;
option rfc3442-classless-static-routes code 121 = array of integer 8;
option ms-classless-static-routes code 249 = array of integer 8;
option space pxelinux;
option pxelinux.magic code 208 = string;
option pxelinux.configfile code 209 = text;
option pxelinux.pathprefix code 210 = text;
option pxelinux.reboottime code 211 = unsigned integer 32;
option architecture-type code 93 = unsigned integer 16;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;
authoritative;
log-facility local7;
option ip-forwarding true;
option mask-supplier false;
subnet 192.168.x.0 netmask 255.255.255.0 {
range 192.168.1.31 192.168.1.64;
option domain-name-servers 192.168.1.193;
default-lease-time 600;
max-lease-time 7200;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
#ping-check true;
# DHCP option 60 PXEClient
option vendor-class-identifier "PXEClient";
option vendor-encapsulated-options 01:04:00:00:00:00:ff;
# DHCP option 66 tftp server
next-server 192.168.1.195;
# DHCP option 67 定义bootfile的文件名
#option bootfile-name "\\boot\\x64\\wdsnbp.com";
#option bootfile-name "\\boot\\x64\\bootmgfw.efi";
#option bootfile-name "\\boot\\x86\\pxelinux.0";
#
class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
next-server 192.168.1.195;
if option architecture-type = 00:07 {
filename "\\boot\\x64\\bootmgfw.efi";
} else {
filename "\\boot\\x64\\wdsnbp.com";
}
}
host client01 {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address 192.168.14.65;
}
......
}
Windows Server 2019 Datacenter
安装 WDS Windows 部署服务,配置好安装映像和启动映像
开始-Windows 管理工具- Windows 部署服务
Windows 部署服务-服务器-Center(主机名)右键单击,选择属性
PXE 响应
响应所有客户端计算机(已知和未知)
启动
已知客户端 继续PXE启动,除非用户按 Esc 键
未知客户端 继续PXE启动,除非用户按 Esc 键
客户端
启动无人参与安装
选择无人参与安装的文件
勾选 安装之后,不要将客户端加入域
DHCP
两项都取消选择
不侦听 DCHP 端口
配置 DCHP 选项以指示此服务器也是 PXE 服务器
PXE 引导
当客户机开机后,启动网络引导,此时有两种情况,一种是旧的 BIOS 引导,一种是新的 UEFI 引导,上面配置的 DHCP 服务器会自行判断,给出不同的引导文件。