整合 Windows 7 Enterprise SP1 x86/x64 20171031 安裝光碟

為了簡化安裝時間步驟及方便系統安裝測試,順手完成。
主要整合:
1. Internet Explorer 11 
2. .NET Framework 4.7.1 
3. Easy7-Zip  
4. Acrobat Reader DC 及更新到最新版 2017.012.20098 
5. Classic Shell 4.3.1 
6. Oracle Java 8 Update 1511  
7. Microsoft Silverlight  
8. Microsoft Visual C++ 2005/2008/2010/2012/2013/2015 Redistributable  
9. 整合 x86 重要更新 128 個,選擇性更新 65 個  
10. 整合 x64 重要更新 129 個,選擇性更新 66 個  
11. 還有一些個人的習慣性設定(公文系統 ……) 
12. 為減少光碟容量,改用以 Windows 10 x86 為底,使用 ESD 格式
13. 整合 Windows 7 SP1 & Office 2010 x86/x64 版本
14. 採用無人值守自動化安裝

[@more@]整合過程:
x86

x64



測試安裝

安裝 .NET Framework 4.7.1 

安裝 Acrobat Reader DC 及更新到最新版 2017.012.20098 

安裝 Microsoft Visual C++ 2005/2008/2010/2012/2013/2015 Redistributable

終於安裝完成

剩下的更新

重要更新 3 個

選用更新 2 個

使用 PXE Server 來安裝 Windows

參考網站:
Setting Up Prerequisites to ‘Install Windows 7’ over ‘PXE Network Boot Server’ on RHEL/CentOS 7 – Part 1
SANDeploy iSCSI Boot – Diskless Boot of Windows 7 from SANDeploy iSCSI Boot SAN
用Ubuntu建立一個由網路開機「載入WinPE 自動化安裝Windows OS」的環境 | Jerry-Yang’s Log

1. 安裝 Samba Server
# yum install samba samba-winbind

2. 備份 Samba Server 設定檔
# cp /etc/samba/smb.conf /etc/samba/smb.conf.$(date +%F)

[@more@]3. 修改 Samba Server 設定檔 /etc/samba/smb.conf
# vim /etc/samba/smb.conf
[global]
workgroup = PXISSERVER
server string = Samba Server Version %v
log file = /var/log/samba/log.%m
max log size = 50
idmap config * : backend = tdb
cups options = raw
netbios name = pxis
map to guest = bad user
dns proxy = no
public = yes
## For multiple installations the same time – not lock kernel
kernel oplocks = no
nt acl support = no
security = user
guest account = nobody
[install]
comment = Windows 7 Image
path = /Windows
read only = no
browseable = yes
public = yes
printable = no
guest ok = yes
oplocks = no
level2 oplocks = no
locking = no

4. 檢查設定檔
# /usr/bin/testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section “[install]”
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
        netbios name = PXIS
        server string = Samba Server Version %v
        workgroup = PXISSERVER
        log file = /var/log/samba/log.%m
        max log size = 50
        map to guest = Bad User
        security = USER
        dns proxy = No
        idmap config * : backend = tdb
        cups options = raw
        nt acl support = No
        guest ok = Yes

[install]
        comment = Windows 7 Image
        path = /Windows
        level2 oplocks = No
        locking = No
        oplocks = No
        read only = No

5. 建立所須目錄
# mkdir -p /Windows/{7,x86,x64}

6. 將 Windows 7 安裝光碟上傳到 Server,並掛載在 /mnt 目錄
# mount -o loop tw_windows_7_Enterprise_IE11_Update_with_SP1_x86_x64_dvd_20170425.iso /mnt
mount: /dev/loop0 is write-protected, mounting read-only

7. 將檔案複製到 /Windows/7,然後卸載光碟
# cp -rf /mnt/* /Windows/7
# umount /mnt

8. 修改檔案擁有者及權限
# chown -R 755 /Windows
# chown -R nobody:nobody /Windows

9. 處理 SELinux
# /usr/sbin/semanage fcontext -a -t samba_share_t ‘/Windows(/.*)?’
# /usr/sbin/restorecon -R -F -v /Windows

10. 防火牆設定
# firewall-cmd –permanent –add-service=samba
success
# firewall-cmd –reload
success

11. 啟用 Samba Server 相關服務
# systemctl enable smb.service
Created symlink from /etc/systemd/system/multi-user.target.wants/smb.service to /usr/lib/systemd/system/smb.service.
# systemctl start smb.service
# systemctl enable nmb.service
Created symlink from /etc/systemd/system/multi-user.target.wants/nmb.service to /usr/lib/systemd/system/nmb.service.
# systemctl start nmb.service
# systemctl enable winbind.service
Created symlink from /etc/systemd/system/multi-user.target.wants/winbind.service to /usr/lib/systemd/system/winbind.service.
# systemctl start winbind.service

12. 測試是否能存取 Samba Server 分享的資源

13. 下載 Windows 7 Automated Installation Kit
下載網頁:https://www.microsoft.com/zh-tw/download/details.aspx?id=5753
請參考 頭城國小資訊組 | 建立 Windows 7 / 10 PE 光碟 完成 Windows PE 的製作

14. 建立目錄
# mkdir /var/lib/tftpboot/Windows

15. 將建立好的 Windows PE ISO 上傳到 /var/lib/tftpboot/Windows 目錄
# ls -l /var/lib/tftpboot/Windows/*.iso
-rw-r–r–. 1 nobody nobody 280020992  5月  2 21:09 /var/lib/tftpboot/Windows/Win10PE_amd64.iso
-rw-r–r–. 1 nobody nobody 226654208  5月  2 21:09 /var/lib/tftpboot/Windows/Win10PE_x86.iso
-rw-r–r–. 1 nobody nobody 217577472  5月  2 12:52 /var/lib/tftpboot/Windows/WinPE_amd64.iso
-rw-r–r–. 1 nobody nobody 192131072  5月  2 12:52 /var/lib/tftpboot/Windows/WinPE_x86.iso

16. 處理 SELinux 設定
# /usr/sbin/restorecon -R -F -v /var/lib/tftpboot/Windows

17. 修改 PXE Server 開機功能表
# vim /var/lib/tftpboot/pxelinux.cfg/default
加入
LABEL Install Windows 7 x86
MENU LABEL Install Windows 7 x86
KERNEL memdisk
INITRD Windows/WinPE_x86.iso
APPEND iso raw

LABEL Install Windows 7 x64
MENU LABEL Install Windows 7 x64
KERNEL memdisk
INITRD Windows/WinPE_amd64.iso
APPEND iso raw

18. 設定使用網路開機,進行 Windows 7 安裝

將 Windows 7 安裝目錄掛載成 z 磁碟機
net use z: 192.168.131.241install7

切換到 z 磁碟機並執行 setup.exe 進行安裝
z:
setup.exe

安裝光碟為縮減容量已改用以 Windows 10 為底,中文字的部份會出現亂碼

終於安裝完成!

建立 Windows 7 / 10 PE 光碟

這裡所謂的 Windows PE 光碟只是用來安裝 Windows 時使用,不是那種包山包海的 Windows 工具光碟。
1. 下載 Windows 7 及 Windows 10 的 Automated Installation Kit
下載 Windows 7 Automated Installation Kit
下載網頁:https://www.microsoft.com/zh-tw/download/details.aspx?id=5753

下載 Windows 10 1703 Automated Installation Kit
下載網頁:https://developer.microsoft.com/zh-tw/windows/hardware/windows-assessment-deployment-kit

[@more@]2. Windows 7 Automated Installation Kit 安裝

3. 製作 Windows 7 PE 光碟

copype x86 C:winPE_x86

copy “C:Program FilesWindows AIKToolsPEToolsx86winpe.wim” C:winpe_x86ISOSourcesBoot.wim
copy “C:Program FilesWindows AIKToolsx86Imagex.exe” C:winpe_x86ISO

oscdimg -n -bC:winpe_x86etfsboot.com C:winpe_x86ISO C:winpe_x86WinPE_x86.iso

x86_64
copype amd64 C:winPE_amd64
copy “C:Program FilesWindows AIKToolsPEToolsamd64winpe.wim” C:winpe_amd64ISOSourcesBoot.wim
copy “C:Program FilesWindows AIKToolsamd64Imagex.exe” C:winpe_amd64ISO
oscdimg -n -bC:winpe_amd64etfsboot.com C:winpe_amd64ISO C:winpe_amd64WinPE_amd64.iso

4. Windows 10 Automated Installation Kit 安裝

5. 製作 Windows 10 PE 光碟

copype x86 C:Win10PE_x86

MakeWinPEMedia /ISO C:Win10PE_x86 C:Win10PE_x86Win10PE_x86.iso

copype amd64 C:Win10PE_amd64
MakeWinPEMedia /ISO C:Win10PE_amd64 C:Win10PE_amd64Win10PE_amd64.iso

Windows 7 連線 iSCSI 設備

參考網頁:
CentOS 7 安裝 iSCSI Server

1.選擇 開始 / 設定(S) / 控制台(C)

2. 執行 系統管理工具

[@more@]
3. 執行 iSCSI 啟動器

4. 啟動 iSCSI 服務

5. 選擇 設定 / 變更(H)

6. 輸入啟動名稱,然後選擇 確定

7. 選擇 目標 / 輸入 iSCSI Server IP / 快速連線(O)

8. 選擇要連線的名稱,然後選擇 連線

9. 選擇 完成(D)

10. 選擇 確定

11. 執行 控制台 / 系統管理工具 / 電腦管理

12. 選擇 磁碟管理

13. 硬碟分割


14. 已經可以使用了!

解決 Windows 7 SP1 Windows Update 更新時出現 80072EE2 錯誤代碼

Windows 7 SP1 Windows Update 更新時出現 80072EE2 錯誤代碼
[@more@]解決方式:參考 為什麼我的Windows Update無法更新 錯誤代碼:80072EE2

以系統管理員身份執行命令提示字元
輸入下面三行指令
net stop wuauserv
reg delete HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindowsWindowsUpdate
net start wuauserv

可以正常執行 Windows Update 了!

移除 Windows 7/10 install.wim 已封裝的更新

偶然取得一個特殊的版本,但是是別人已經封裝過的版本,可是想要自己重新封裝。
參考網頁:
離線新增或移除封裝

1. 建立掛載目錄
mkdir WIM

2. 進行掛載
DISM /Mount-Wim /WimFile:ImageNx64install.wim /Index:1 /MountDir:WIM
[@more@]3. 列出映像檔中的封裝
DISM /Image:WIM /Get-Packages

如果封裝的記錄很多,也可以輸出成一個文字檔,方便檢視!
DISM /Image:WIM /Get-Packages > c:UsersAdministratorDesktopfeaturelist.txt

4. 移除封裝檔
DISM /Image:WIM /Remove-Package /PackageName:Package_for_RollupFix~31bf3856ad364e35~amd64~~15063.14.1.1

如果有好幾個,可以使用
DISM /Image:WIM /Remove-Package /PackageName:xxxxxx /PackageName:yyyyy /PackageName:zzzzzz

5. 寫回映像檔
DISM /Unmount-Wim /MountDir:WIM /commit

Windows 7 SP1 整合 Microsoft .NET Framework 4.7

整合一些常用軟體
Adobe Acrobat Reader DC

Microsoft Visual C++ 2005/2008/2010/2012/2013/2015 Redistributable

[@more@]Microsoft .NET Framework 4.7

安裝的軟體及更新

整合後剩下的更新

SetupComplete.cmd 中加入
start “” /wait “NDP47NDP47-KB3186497-x86-x64-AllOS-ENU.exe” /passive /norestart
start “” /wait “NDP47NDP47-KB3186497-x86-x64-AllOS-CHT.exe” /q /norestart

整合過程