From 48823b4101caca791762194ca01eeeb9b3d44e11 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Sat, 11 Oct 2025 00:01:18 +0800 Subject: [PATCH] =?UTF-8?q?windows:=20=E6=B7=BB=E5=8A=A0=20GCP=20=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E6=80=A7=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 8 ++++++++ README.md | 8 ++++++++ reinstall.sh | 8 ++++---- trans.sh | 4 ++-- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/README.en.md b/README.en.md index bf22936..d9860ce 100644 --- a/README.en.md +++ b/README.en.md @@ -497,6 +497,14 @@ Open File menu > Open Image File, select the iso to be installed to get the imag > > The solution is to update the system patches or manually install the `VCLibs` library . +> [!WARNING] +> When installing Windows ISOs released in `May 2022` or later on GCP, the system may repeatedly reboot during the Windows installation (PE) stage. You can resolve this issue using one of the following two methods: +> +> 1. Add the `--force-boot-mode bios` parameter. The script will install Windows in `BIOS boot + MBR partition table` mode. +>
- (Optional) After installation, you can convert it to `EFI boot + GPT partition table` using the command `MBR2GPT /convert /allowFullOS`. +> +> 2. Create a custom RAW image and install it via DD. + #### Considerations for Installing Windows on ARM Most ARM machines support installing latest Windows 11. diff --git a/README.md b/README.md index 76f0596..f7b730e 100644 --- a/README.md +++ b/README.md @@ -497,6 +497,14 @@ Windows Server 2025 SERVERDATACENTER > > 解决方法是更新系统补丁,或者手动安装 `VCLibs` 库 +> [!WARNING] +> 在 GCP 上安装 `2022年5月` 和之后发布的 Windows ISO,在引导 Windows 安装界面 (PE) 时会不断反复重启。解决方法如下,二选一 +> +> 1. 添加 `--force-boot-mode bios` 参数,脚本将以 `BIOS 引导 + MBR 分区表` 方式安装 Windows +>
- (可选) 安装完成后用 `MBR2GPT /convert /allowFullOS` 命令转为 `EFI 引导 + GPT 分区表` +> +> 2. 自制 RAW 镜像并通过 DD 安装 + #### ARM 安装 Windows 的注意事项 大部分 ARM 机器都支持安装最新版 Windows 11 diff --git a/reinstall.sh b/reinstall.sh index f0da101..cb2c9e9 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -2965,7 +2965,7 @@ build_extra_cmdline() { # 会将 extra.xxx=yyy 写入新系统的 /etc/modprobe.d/local.conf # https://answers.launchpad.net/ubuntu/+question/249456 # https://salsa.debian.org/installer-team/rootskel/-/blob/master/src/lib/debian-installer-startup.d/S02module-params?ref_type=heads - for key in confhome hold force force_cn force_old_windows_setup cloud_image main_disk \ + for key in confhome hold force_boot_mode force_cn force_old_windows_setup cloud_image main_disk \ elts deb_mirror \ ssh_port rdp_port web_port allow_ping; do value=${!key} @@ -3783,7 +3783,7 @@ for o in ci installer debug minimal allow-ping force-cn help \ allow-ping: \ commit: \ frpc-conf: frpc-config: frpc-toml: \ - force: \ + force-boot-mode: \ force-old-windows-setup:; do [ -n "$long_opts" ] && long_opts+=, long_opts+=$o @@ -3858,11 +3858,11 @@ while true; do shift 2 ;; - --force) + --force-boot-mode) if ! { [ "$2" = bios ] || [ "$2" = efi ]; }; then error_and_exit "Invalid $1 value: $2" fi - force=$2 + force_boot_mode=$2 shift 2 ;; --passwd | --password) diff --git a/trans.sh b/trans.sh index e5d68b9..71983b7 100644 --- a/trans.sh +++ b/trans.sh @@ -248,8 +248,8 @@ update_part() { } is_efi() { - if [ -n "$force" ]; then - [ "$force" = efi ] + if [ -n "$force_boot_mode" ]; then + [ "$force_boot_mode" = efi ] else [ -d /sys/firmware/efi/ ] fi