mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-19 04:49:13 +08:00
parent
fc12aa67ab
commit
950f4bc45e
14
trans.sh
14
trans.sh
@ -608,7 +608,7 @@ grep_efi_index() {
|
||||
add_fallback_efi_to_nvram() {
|
||||
apk add lsblk efibootmgr
|
||||
|
||||
efi_row=$(lsblk /dev/$xda -ro NAME,PARTTYPE,PARTUUID | grep -i "$EFI_UUID")
|
||||
if efi_row=$(lsblk /dev/$xda -ro NAME,PARTTYPE,PARTUUID | grep -i "$EFI_UUID"); then
|
||||
efi_part_uuid=$(echo "$efi_row" | awk '{print $3}')
|
||||
efi_part_name=$(echo "$efi_row" | awk '{print $1}')
|
||||
efi_part_num=$(get_part_num_by_part "$efi_part_name")
|
||||
@ -632,6 +632,18 @@ add_fallback_efi_to_nvram() {
|
||||
fi
|
||||
efibootmgr --bootorder "$new_order"
|
||||
fi
|
||||
else
|
||||
echo "
|
||||
Warning: This machine is currently using EFI boot, but the main hard drive does not have an EFI partition.
|
||||
If this machine supports Legacy BIOS boot (CSM), you can safely restart into the new system by running the reboot command.
|
||||
If this machine does not support Legacy BIOS boot (CSM), you will not be able to enter the new system after rebooting.
|
||||
|
||||
警告:本机目前使用 EFI 引导,但主硬盘没有 EFI 分区。
|
||||
如果本机支持 Legacy BIOS 引导 (CSM),你可以运行 reboot 命令安全地重启到新系统。
|
||||
如果本机不支持 Legacy BIOS 引导 (CSM),重启后将无法进入新系统。
|
||||
"
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
unix2dos() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user