下载 https://docs.microsoft.com/zh-cn/windows-hardware/get-started/adk-install#winADK
https://download.microsoft.com/download/6/3/1/631A7F90-E5CE-43AA-AB05-EA82AEAA402A/KB3AIK_CN.iso
下一步
正在安装
安装完成
Windows Kits》Windows ADK》部署和映像工具环境,
执行,copype amd64 C:\winpe
执行imagex /mountrw c:\winpe\winpe.wim 1 c:\winpe\mount
执行echo ping -n 7 -l 192.168.3.253 >> C:\winpe\mount\Windows\System32\startnet.cmd
执行echo net use z: \\192.168.3.253\share >> C:\winpe\mount\Windows\System32\startnet.cmd
执行echo Z: >> C:\winpe\mount\Windows\System32\startnet.cmd
win是包含windows 7 ISO解压文件的父目录
执行echo cd win7 >> C:\winpe\mount\Windows\System32\startnet.cmd
执行echo setup.exe /unattend:Autounattend.xml >> C:\winpe\mount\Windows\System32\startnet.cmd
执行imagex /unmount c:\winpe\mount /commit
执行copy c:\winpe\winpe.wim c:\winpe\ISO\sources\boot.wim
"-bC"中间没有空格,镜像生成在系统在C盘下
执行oscdimg -n -bC:\winpe\etfsboot.com c:\winpe\ISO c:\winpe\winpe_win7_amd64.iso
使用WinScp 等工具,将winpe_win7_amd64.iso 上传到 Cobbler 服务器上
[root@PXE ~]# cobbler distro add --name=windows_7_x64 --kernel=/var/lib/tftpboot/memdisk --initrd=/root/winpe_win7_amd64.iso --kopts="raw iso"
[root@PXE ~]# touch /var/lib/cobbler/kickstarts/win7pe.xml
[root@PXE ~]# cobbler profile add --name=windows_7_x64 --distro=windows_7_x64 --kickstart=/var/lib/cobbler/kickstarts/win7pe.xml
[root@PXE ~]# yum install samba -y
[root@PXE ~]# vi /etc/samba/smb.conf
[global]
log file = /var/log/samba/log.%m
max log size = 5000
security = user
guest account = nobody
map to guest = Bad User
load printers = yes
cups options = raw
[share]
comment = share directory目录
path = /smb/
directory mask = 0755
create mask = 0755
guest ok=yes
writable=yes
[root@PXE ~]# systemctl start smb
[root@PXE ~]# systemctl enable smb
mkdir -p /smb/win7
mkdir -p /mnt/win7
mount -o loop,ro /root/cn_windows_7_enterprise_with_sp1_x64_dvd_u_677685.iso /mnt/win7
mount /dev/cdrom /mnt/win7/
拷贝win7镜像文件到目录
cp -rf /mnt/win7/* /smb/win7
https://www.cnblogs.com/pluse/p/8528122.html
上传自启动文件到服务器Autounattend.xml
vim /smb/win7/Autounattend.xml
OnError
zh-cn
zh-cn
zh-cn
zh-cn
zh-cn
87VT2-FY2XW-F7K39-W3T8R-XMFGF
true
/image/index
1
0
1
0
true
1
3000
Primary
true
false
NTFS
C
1
1
TCSoft
Administrators
john
Work
3
*
China Standard Time
[root@PXE ~]# cobbler sync
[root@PXE ~]# cobbler profile list
登录web页面查看
VMware-Workstation创建一台内存4G,cpu2核,磁盘60G的空盘,win10虚拟机,然后开机。记得选BIOS,别选UEFI。
正在调用自动化安装xml文件
开始安装Windows 7