From 0c74b5783d28fd21e1ac1cb05882c18935727455 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Fri, 22 Dec 2023 23:46:22 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E6=94=B9=E7=94=A8=20opensuse=20tumblew?= =?UTF-8?q?eed=20=E7=9A=84=20efi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/reinstall.sh b/reinstall.sh index 49b8d03..b9ecacb 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -1016,7 +1016,6 @@ add_efi_entry_in_linux() { install_grub_linux_efi() { info 'download grub efi' - fedora_ver=39 if [ "$basearch" = aarch64 ]; then grub_efi=grubaa64.efi @@ -1024,13 +1023,32 @@ install_grub_linux_efi() { grub_efi=grubx64.efi fi - if is_in_china; then - mirror=https://mirrors.tuna.tsinghua.edu.cn/fedora + # fedora x86_64 的 efi 无法识别 opensuse tumbleweed 的 btrfs + # 造成找不到启动内核 + if false; then + fedora_ver=39 + + if is_in_china; then + mirror=https://mirrors.tuna.tsinghua.edu.cn/fedora + else + mirror=https://download.fedoraproject.org/pub/fedora/linux + fi + + curl -Lo /tmp/$grub_efi $mirror/releases/$fedora_ver/Everything/$basearch/os/EFI/BOOT/$grub_efi else - mirror=https://download.fedoraproject.org/pub/fedora/linux + if is_in_china; then + mirror=https://mirror.sjtu.edu.cn/opensuse + else + mirror=https://download.opensuse.org + fi + + file=tumbleweed/repo/oss/EFI/BOOT/grub.efi + if [ "$basearch" = aarch64 ]; then + file=ports/aarch64/$file + fi + curl -Lo /tmp/$grub_efi $mirror/$file fi - curl -Lo /tmp/$grub_efi $mirror/releases/$fedora_ver/Everything/$basearch/os/EFI/BOOT/$grub_efi add_efi_entry_in_linux /tmp/$grub_efi }