From af99a3a70f4e41bf6d0065f643661ec3aea7ed9b Mon Sep 17 00:00:00 2001 From: bin456789 Date: Fri, 22 Dec 2023 23:42:12 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=BF=AE=E5=A4=8D=20azure=20win2016=20?= =?UTF-8?q?=E4=B8=8B=E6=97=A0=E6=B3=95=E6=B7=BB=E5=8A=A0=20efi=20=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #35, fixes #43 --- reinstall.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reinstall.sh b/reinstall.sh index 5345f06..c2c9a01 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -938,6 +938,13 @@ add_efi_entry_in_windows() { mkdir -p $dist_dir cp -f "$source" "$dist_dir/$basename" + # 如果 {fwbootmgr} displayorder 为空 + # 执行 bcdedit /copy '{bootmgr}' 会报错 + # 例如 azure windows 2016 模板 + # 要先设置默认的 {fwbootmgr} displayorder + # https://github.com/hakuna-m/wubiuefi/issues/286 + bcdedit /set '{fwbootmgr}' displayorder '{bootmgr}' /addfirst + # 添加启动项 id=$(bcdedit /copy '{bootmgr}' /d "$(get_entry_name)" | grep -o '{.*}') bcdedit /set $id device partition=$x: