This commit is contained in:
zj
2026-02-12 04:57:02 +08:00
parent dcd2d242b6
commit 5f50d96b07

View File

@@ -1786,6 +1786,11 @@ def restore_bls_entries(mount_point: str, distro_type: str) -> Tuple[bool, str]:
except Exception as e:
log_debug(f"检查 BLS 失败: {e}")
# 对于 CentOS/RHEL/Fedora 8+,强制使用 BLS即使 grub.cfg 不存在或被清空)
if not uses_bls and distro_type in ["centos", "rhel", "fedora", "rocky", "almalinux"]:
log_info(f"{distro_type} 8+ 默认使用 BLS启用 BLS 恢复")
uses_bls = True
if not uses_bls:
log_debug("系统不使用 BLS跳过 BLS 恢复")
return True, ""