半自动版本 PXE批量装windows( 二 )

  1. 服务端1搭建tftp服务器
下载tftp
[root@localhost windows]# yum –y install tftp
设置tftp服务器(简单文本传输)
[root@localhost windows]# vim /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             = -s /var/lib/tftpboot
disable                 = yes
per_source              = 11
cps                     = 100 2
flags                   = IPv4
}
将disable=yes改为disable=no 意思是启用tftp启动tftp服务并纳入开机自启
[root@localhost windows]# systemctl enable xinetd && systemctl start xinetd
查询tftp状态:
[root@localhost windows]# netstat -a| grep tftpudp6       0      0 [::]:tftp               [::]:*          [::]:*
  1. 服务端1安装syslinux服务(pxe)
安装
[root@localhost windows]# yum -y install syslinux
将pxelinux0、memdisk、menu.c32复制到tftp默认共享目录
[root@localhost windows]# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/[root@localhost windows]# cp /usr/share/syslinux/menu.c32 /var/lib/tftpboot/[root@localhost windows]# cp /usr/share/syslinux/memdisk /var/lib/tftpboot/创建默认的pxe启动配置菜单,winpe_amd64.iso是windows7_x64的pe镜像
[root@localhost windows]# mkdir /var/lib/tftpboot/pxelinux.cfg[root@localhost windows]# vim /var/lib/tftpboot/pxelinux.cfg/defaultUI menu.c32label 1menu label ^1) Install Windows 7 x64KERNEL memdiskINITRD winpe_amd64.isoAPPEND iso raw将WinPE镜像上传到PXE服务器上
[root@localhost windows]# cd /var/lib/tftpboot[root@localhost tftpboot]# rz[root@localhost tftpboot]# lsmemdisk  menu.c32  pxelinux.0  pxelinux.cfg  winpe_amd64.iso[root@localhost tftpboot]# cd /windows
  1. 服务端1安装samba服务
安装
[root@localhost windows]# yum -y install samba[root@localhost windows]# vim /etc/samba/smb.conf[global]workgroup = PXESERVERserver string = Samba Server Version %vlog file = /var/log/samba/log.%mmax log size = 50idmap config * : backend = tdbcups options = rawnetbios name = pxemap to guest = bad userdns proxy = nopublic = yes## For multiple installations the same time - not lock kernelkernel oplocks = nont acl support = nosecurity = userguest account = nobody[install]comment = Windows 7 Imagepath = /windowsread only = nobrowseable = yespublic = yesprintable = noguest ok = yesoplocks = nolevel2 oplocks = nolocking = no验证配置文件并且启动服务[root@localhost windows]# testparm
[root@localhost windows]# systemctl start smb && systemctl enable start
在服务端2查看服务状态:
半自动版本 PXE批量装windows

文章插图
开始安装
  1. 启动需要安装系统的电脑,delete进入bios设置 , 打开pxe网络引导,并设置优先启动顺序,F10保存并重启
  2. 系统重启后进入网络引导 , 向局域网发送获取广播,寻找dhcp服务器,并获取分配的ip,跳转到tftp服务器,开始pxe引导
  3. 之后一直到安装界面,选择 “Install Windows 7 x64”,加载内核及winpe镜像

    推荐阅读