mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-19 04:49:13 +08:00
windows: 使用阿里云新版驱动
This commit is contained in:
parent
75e5a04d41
commit
1b0667a271
74
trans.sh
74
trans.sh
@ -3879,35 +3879,59 @@ install_windows() {
|
|||||||
add_driver_aliyun_kvm() {
|
add_driver_aliyun_kvm() {
|
||||||
info "Add drivers: Aliyun KVM"
|
info "Add drivers: Aliyun KVM"
|
||||||
|
|
||||||
aliyun_sys=$(
|
# win7 旧驱动是 sha1 签名
|
||||||
case "$nt_ver" in
|
if [ "$nt_ver" = 6.1 ]; then
|
||||||
6.1) echo 7 ;;
|
# 旧驱动
|
||||||
6.2 | 6.3) echo 8 ;;
|
aliyun_sys=$(
|
||||||
*) echo 10 ;;
|
case "$nt_ver" in
|
||||||
esac
|
6.1) echo 7 ;;
|
||||||
)
|
6.2 | 6.3) echo 8 ;;
|
||||||
|
*) echo 10 ;;
|
||||||
|
esac
|
||||||
|
)
|
||||||
|
|
||||||
filename=$(
|
filename=$(
|
||||||
case "$nt_ver" in
|
case "$nt_ver" in
|
||||||
6.1) echo 210408.1454.1459_bin.zip ;; # sha1
|
6.1) echo 210408.1454.1459_bin.zip ;; # sha1
|
||||||
*) echo 220915.0953.0953_bin.zip ;; # sha256
|
*) echo 220915.0953.0953_bin.zip ;; # sha256
|
||||||
# *) echo new_virtio.zip ;;
|
# *) echo new_virtio.zip ;;
|
||||||
esac
|
esac
|
||||||
)
|
)
|
||||||
|
|
||||||
region=$(
|
region=$(
|
||||||
if is_in_china; then
|
if is_in_china; then
|
||||||
echo cn-beijing
|
echo cn-beijing
|
||||||
else
|
else
|
||||||
echo us-west-1
|
echo us-west-1
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
|
|
||||||
download https://windows-driver-$region.oss-$region.aliyuncs.com/virtio/$filename $drv/aliyun.zip
|
download https://windows-driver-$region.oss-$region.aliyuncs.com/virtio/$filename $drv/aliyun.zip
|
||||||
unzip -o -d $drv/aliyun/ $drv/aliyun.zip
|
unzip -o -d $drv/aliyun/ $drv/aliyun.zip
|
||||||
|
|
||||||
# 注意文件夹是 win7 Win8 win10 大小写不一致
|
# 注意文件夹是 win7 Win8 win10 大小写不一致
|
||||||
cp_drivers $drv/aliyun -ipath "*/win${aliyun_sys}/${arch}/*"
|
cp_drivers $drv/aliyun -ipath "*/win${aliyun_sys}/${arch}/*"
|
||||||
|
else
|
||||||
|
# 新驱动
|
||||||
|
aliyun_sys=$(
|
||||||
|
case "$nt_ver" in
|
||||||
|
6.1) echo 2008R2 ;; # sha256
|
||||||
|
6.2 | 6.3) echo 2012R2 ;; # 实际上是 2012 的驱动
|
||||||
|
*) echo 2016 ;;
|
||||||
|
esac
|
||||||
|
)
|
||||||
|
|
||||||
|
region=cn-hangzhou
|
||||||
|
|
||||||
|
download https://windows-driver-$region.oss-$region.aliyuncs.com/virtio/AliyunVirtio_WIN$aliyun_sys.zip $drv/AliyunVirtio.zip
|
||||||
|
unzip -o -d $drv $drv/AliyunVirtio.zip
|
||||||
|
|
||||||
|
apk add innoextract
|
||||||
|
innoextract -d $drv/aliyun/ $drv/AliyunVirtio_*_WIN${aliyun_sys}_$arch_xdd.exe
|
||||||
|
apk del innoextract
|
||||||
|
|
||||||
|
cp_drivers $drv/aliyun -ipath "*/C$/Program Files/AliyunVirtio/*/drivers/*"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# gcp
|
# gcp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user