Skip to content

Commit

Permalink
Merge pull request #122 from desultory/dev
Browse files Browse the repository at this point in the history
improve error message for when the root is on a device mapper deivce
  • Loading branch information
desultory authored Nov 17, 2024
2 parents 4cd83e3 + 1669703 commit 123c9ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ugrd/fs/mounts.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = "desultory"
__version__ = "5.6.1"
__version__ = "5.6.2"

from pathlib import Path
from typing import Union
Expand Down Expand Up @@ -428,6 +428,9 @@ def _autodetect_dm(self, mountpoint, device=None) -> None:
elif blkid_info.get("type") == "linux_raid_member":
autodetect_raid(self, source_device, dev_name, blkid_info)
else:
if "type" not in blkid_info:
self.logger.error("If LUKS headers are detached, they must be configured with the corresponding mapped device name.")
raise RuntimeError("[%s] No type found for device mapper device: %s" % (dev_name, source_device))
raise RuntimeError("Unknown device mapper device type: %s" % blkid_info.get("type"))

autodetect_mount_kmods(self, slave_source)
Expand Down

0 comments on commit 123c9ae

Please sign in to comment.