Skip to content

Commit 123c9ae

Browse files
authored
Merge pull request #122 from desultory/dev
improve error message for when the root is on a device mapper deivce
2 parents 4cd83e3 + 1669703 commit 123c9ae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ugrd/fs/mounts.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__author__ = "desultory"
2-
__version__ = "5.6.1"
2+
__version__ = "5.6.2"
33

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

433436
autodetect_mount_kmods(self, slave_source)

0 commit comments

Comments
 (0)