windows: win7 或以上删除 boot.wim 卷 1 以优化内存占用
This commit is contained in:
parent
c6898e9d35
commit
619671f77c
25
trans.sh
25
trans.sh
@ -4700,15 +4700,22 @@ install_windows() {
|
|||||||
wimunmount --commit /wim/
|
wimunmount --commit /wim/
|
||||||
|
|
||||||
# 优化 boot.wim 大小
|
# 优化 boot.wim 大小
|
||||||
# vista 删除镜像1 会报错
|
echo "boot.wim size:"
|
||||||
# Windows cannot access the required file Drive:\Sources\Boot.wim.
|
echo "Original: $(du -h /iso/sources/boot.wim | cut -f1)"
|
||||||
# Make sure all files required for installation are available and restart the installation.
|
echo "Original + Drivers: $(du -h /os/boot.wim | cut -f1)"
|
||||||
# Error code: 0x80070491
|
if is_nt_ver_ge 6.1 && [ "$boot_index" = 2 ]; then
|
||||||
du -h /iso/sources/boot.wim
|
# win7 或以上删除 boot.wim 镜像 1 不会报错
|
||||||
du -h /os/boot.wim
|
# 因为 win7 winre 镜像在 install.wim Windows\System32\Recovery\winRE.wim
|
||||||
# wimdelete /os/boot.wim 1
|
wimdelete /os/boot.wim 1
|
||||||
wimoptimize /os/boot.wim
|
else
|
||||||
du -h /os/boot.wim
|
# vista 删除 boot.wim 镜像 1 会报错
|
||||||
|
# Windows cannot access the required file Drive:\Sources\Boot.wim.
|
||||||
|
# Make sure all files required for installation are available and restart the installation.
|
||||||
|
# Error code: 0x80070491
|
||||||
|
# vista install.wim 没有 Windows\System32\Recovery\winRE.wim
|
||||||
|
wimoptimize /os/boot.wim
|
||||||
|
fi
|
||||||
|
echo "Original + Drivers + Optimized: $(du -h /os/boot.wim | cut -f1)"
|
||||||
|
|
||||||
# 将 boot.wim 放到正确的位置
|
# 将 boot.wim 放到正确的位置
|
||||||
if is_efi; then
|
if is_efi; then
|
||||||
|
Loading…
Reference in New Issue
Block a user