在去年初我寫過重做WinRE修復磁碟分區,但當時的情況是執行更新KB5034441失敗,在更新成功後只照著那篇重建,會因為沒有執行Windows Update而導致,這時候就應該要手動去 Microsoft Update Catalog 搜尋最新的 WInRE update手動重新安裝。
目前遇到的狀況是 Windows Server 2022 C: 空間不足,所以在虛擬機直接加大磁碟空間,但是Windows的復原分割區必須要先刪除才易於擴充容量。 若不刪除也可,必須使用 Gparted 等工具,將復原分割區移到磁碟的末端。
所以我就到Microsoft Update Catalog 搜尋KB5034441,發現最新的WinRE更新是KB5034235,所以下載windows10.0-kb5046916-x64_54b85d95f2b5435ee8511f071b20020a23b2cff0.cab 。
接下來照著去年初的方法先用diskpart建立好分割區,再進行以下步驟:
reagentc /disable
mkdir D:\TEMP\install
mkdir D:\TEMP\WinRE
dism /mount-wim /wimfile:"E:\sources\install.wim" /index:1 /mountdir:"D:\Temp\install" /readonly
copy d:\temp\install\Windows\System32\Recovery\Winre.wim D:\temp
dism /Mount-Wim /WimFile:d:\temp\Winre.wim /index:1 /MountDir:D:\TEMP\WinRE
dism /Image:D:\TEMP\WinRE /Add-Package /PackagePath:D:\Temp\windows10.0-kb5046916-x64_54b85d95f2b5435ee8511f071b20020a23b2cff0.cab
dism /Unmount-Wim /MountDir:D:\TEMP\WinRE /Commit
reagentc /enable
reagentc /info
接下來就會看到分割區的Windows RE 位置有內容,若沒有此步驟,則是空白。
留言