Detect boot partition regardless of boot flags if mounted on /boot (#3303)

This commit is contained in:
mintsuki 2025-03-29 21:17:33 +01:00 committed by GitHub
parent c4bea107b0
commit 9f7c3bab0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -964,8 +964,9 @@ class PartitionModification:
def is_boot(self) -> bool: def is_boot(self) -> bool:
""" """
Returns True if any of the boot indicator flags are found in self.flags Returns True if any of the boot indicator flags are found in self.flags
or if the partition is mounted on /boot
""" """
return any(set(self.flags) & set(self._boot_indicator_flags)) return any(set(self.flags) & set(self._boot_indicator_flags)) or Path('/boot') == self.mountpoint
def is_root(self) -> bool: def is_root(self) -> bool:
if self.mountpoint is not None: if self.mountpoint is not None: