mirror of
https://github.com/bin456789/reinstall.git
synced 2025-12-10 15:37:43 +08:00
windows: 不再写死 boot.wim 的引导卷索引
用于兼容某些精简版系统
This commit is contained in:
8
trans.sh
8
trans.sh
@ -3583,6 +3583,11 @@ install_windows() {
|
||||
fi
|
||||
echo "Image Name: $image_name"
|
||||
|
||||
get_boot_wim_prop() {
|
||||
property=$1
|
||||
wiminfo "/os/boot.wim" | grep -i "^$property:" | cut -d: -f2- | xargs
|
||||
}
|
||||
|
||||
get_selected_image_prop() {
|
||||
property=$1
|
||||
wiminfo "$install_wim" "$image_name" | grep -i "^$property:" | cut -d: -f2- | xargs
|
||||
@ -4074,7 +4079,8 @@ install_windows() {
|
||||
# 挂载 boot.wim
|
||||
info "mount boot.wim"
|
||||
mkdir -p /wim
|
||||
wimmountrw /os/boot.wim 2 /wim/
|
||||
boot_index=$(get_boot_wim_prop 'Boot Index')
|
||||
wimmountrw /os/boot.wim "$boot_index" /wim/
|
||||
|
||||
cp_drivers() {
|
||||
src=$1
|
||||
|
||||
Reference in New Issue
Block a user