搭建PXE服务器
用的镜像是uniontechos-desktop-20-professional-1030-fix_amd64.iso,
首先安装必要软件
apt install isc-dhcp-server tftpd-hpa nfs-kernel-server
创建和复制必要文件(已将UOS镜像挂载到 /mnt/uos 目录)
sudo mkdir -p /tftpboot/pxelinux.cfg
sudo touch /tftpboot/pxelinux.cfg/default
cp -r /mnt/uos/isolinux/. /tftpboot
cp /mnt/uos/live/vmlinuz /tftpboot
cp /mnt/uos/live/initrd.lz /tftpboot
cp ./pxelinux.0 /tftpboot#pxelinux.0文件下载地址在最后
vim /etc/dhcp/dhcpd.conf
vim /tftpboot/pxelinux.cfg/default
vim /etc/default/isc-dhcp-server
vim /etc/default/tftpd-hpa
vim /etc/exports
#/etc/dhcp/dhcpd.conf内容
allow booting;
allow bootp;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.50 192.168.0.150;
option routers 192.168.0.4;
option broadcast-address 192.168.0.255;
option domain-