mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-18 20:39:14 +08:00
windows: 支持替换 boot.wim
This commit is contained in:
parent
91a969ae75
commit
0a6b5ba41c
12
reinstall.sh
12
reinstall.sh
@ -330,7 +330,9 @@ fix_file_type() {
|
|||||||
# x86 boot sector; partition 1: ...
|
# x86 boot sector; partition 1: ...
|
||||||
|
|
||||||
sed 's/^# //' | awk '{print $1}' | to_lower |
|
sed 's/^# //' | awk '{print $1}' | to_lower |
|
||||||
sed -e 's,dos/mbr,raw,' -e 's,x86,raw,'
|
sed -e 's,dos/mbr,raw,' \
|
||||||
|
-e 's,x86,raw,' \
|
||||||
|
-e 's,windows,wim,'
|
||||||
}
|
}
|
||||||
|
|
||||||
file_enhanced() {
|
file_enhanced() {
|
||||||
@ -1158,8 +1160,10 @@ Continue?
|
|||||||
# 注意 windows server 2008 r2 serverdatacenter 不用改
|
# 注意 windows server 2008 r2 serverdatacenter 不用改
|
||||||
image_name=${image_name/windows server 2008 server/windows longhorn server}
|
image_name=${image_name/windows server 2008 server/windows longhorn server}
|
||||||
|
|
||||||
test_url $iso 'iso|raw'
|
test_url "$iso" 'iso|raw'
|
||||||
|
[ -n "$boot_wim" ] && test_url "$boot_wim" 'wim'
|
||||||
eval "${step}_iso='$iso'"
|
eval "${step}_iso='$iso'"
|
||||||
|
eval "${step}_boot_wim='$boot_wim'"
|
||||||
eval "${step}_image_name='$image_name'"
|
eval "${step}_image_name='$image_name'"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3161,6 +3165,10 @@ while true; do
|
|||||||
iso=$2
|
iso=$2
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
--boot-wim)
|
||||||
|
boot_wim=$2
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
--image-name)
|
--image-name)
|
||||||
image_name=$(echo "$2" | to_lower)
|
image_name=$(echo "$2" | to_lower)
|
||||||
shift 2
|
shift 2
|
||||||
|
7
trans.sh
7
trans.sh
@ -3606,7 +3606,12 @@ install_windows() {
|
|||||||
mount -o ro /os/windows.iso /iso
|
mount -o ro /os/windows.iso /iso
|
||||||
|
|
||||||
# 复制 boot.wim 到 /os,用于临时编辑
|
# 复制 boot.wim 到 /os,用于临时编辑
|
||||||
cp /iso/sources/boot.wim /os/boot.wim
|
if [ -n "$boot_wim" ]; then
|
||||||
|
# 自定义 boot.wim 链接
|
||||||
|
download "$boot_wim" /os/boot.wim
|
||||||
|
else
|
||||||
|
cp /iso/sources/boot.wim /os/boot.wim
|
||||||
|
fi
|
||||||
|
|
||||||
# 从iso复制文件
|
# 从iso复制文件
|
||||||
# 复制iso全部文件(除了boot.wim)到installer分区
|
# 复制iso全部文件(除了boot.wim)到installer分区
|
||||||
|
Loading…
x
Reference in New Issue
Block a user