Skip to content

Commit

Permalink
Merge pull request #5407 from poncovka/rhel-9-rescue_without_root
Browse files Browse the repository at this point in the history
rescue: Don't allow to mount systems without a root device
  • Loading branch information
M4rtinK authored Jan 24, 2024
2 parents cc19258 + c440e7c commit 8684a0f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyanaconda/rescue.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,18 @@ def find_roots(self):
task_proxy = STORAGE.get_proxy(task_path)
sync_run_task(task_proxy)

# Collect existing systems.
roots = OSData.from_structure_list(
self._device_tree_proxy.GetExistingSystems()
)

# Ignore systems without a root device.
roots = [r for r in roots if r.get_root_device()]

if not roots:
self.status = RescueModeStatus.ROOT_NOT_FOUND

log.debug("These systems were found: %s", str(roots))
return roots

# TODO separate running post scripts?
Expand Down

0 comments on commit 8684a0f

Please sign in to comment.