2
This commit is contained in:
@@ -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, ""
|
||||
|
||||
Reference in New Issue
Block a user